I've read a few older articles about SIMD support in PyPy, what is the status of this? If I wanted to add something like a Vector3 type to my language (like mono did here http://tirania.org/blog/archive/2008/Nov-03.html) and wanted to take advantage of SSE are there primitives for this? Thanks, Timothy -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)
There aren't any primitives for this right now, no. I'd say it would be medium level of difficult to add support to the JIT for this, probably a day of work for someone who knew the codebase, a few days for someone learning it. On Tue, Oct 14, 2014 at 7:05 AM, Timothy Baldridge <tbaldridge@gmail.com> wrote:
I've read a few older articles about SIMD support in PyPy, what is the status of this? If I wanted to add something like a Vector3 type to my language (like mono did here http://tirania.org/blog/archive/2008/Nov-03.html) and wanted to take advantage of SSE are there primitives for this?
Thanks,
Timothy
-- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
i would say a bit more than that :-) On Tue, Oct 14, 2014 at 4:15 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
There aren't any primitives for this right now, no. I'd say it would be medium level of difficult to add support to the JIT for this, probably a day of work for someone who knew the codebase, a few days for someone learning it.
On Tue, Oct 14, 2014 at 7:05 AM, Timothy Baldridge <tbaldridge@gmail.com> wrote:
I've read a few older articles about SIMD support in PyPy, what is the status of this? If I wanted to add something like a Vector3 type to my language (like mono did here http://tirania.org/blog/archive/2008/Nov-03.html) and wanted to take advantage of SSE are there primitives for this?
Thanks,
Timothy
-- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
I'm talking about an explicit "vector_3f_add()" primitive, would be pretty straightforward to do the mapping. IIRC it took us less than a day to add READ_TIMESTAMP instruction. Alex On Tue, Oct 14, 2014 at 9:41 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
i would say a bit more than that :-)
On Tue, Oct 14, 2014 at 4:15 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
There aren't any primitives for this right now, no. I'd say it would be medium level of difficult to add support to the JIT for this, probably a day of work for someone who knew the codebase, a few days for someone learning it.
On Tue, Oct 14, 2014 at 7:05 AM, Timothy Baldridge <tbaldridge@gmail.com
wrote:
I've read a few older articles about SIMD support in PyPy, what is the status of this? If I wanted to add something like a Vector3 type to my language (like mono did here http://tirania.org/blog/archive/2008/Nov-03.html) and wanted to take advantage of SSE are there primitives for this?
Thanks,
Timothy
-- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
I think that part can be resurrected from some branch, I added it at some point. The problem is that you need aligned data access and the responsibility is on the user of this primitive On Tue, Oct 14, 2014 at 6:42 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
I'm talking about an explicit "vector_3f_add()" primitive, would be pretty straightforward to do the mapping. IIRC it took us less than a day to add READ_TIMESTAMP instruction.
Alex
On Tue, Oct 14, 2014 at 9:41 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
i would say a bit more than that :-)
On Tue, Oct 14, 2014 at 4:15 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
There aren't any primitives for this right now, no. I'd say it would be medium level of difficult to add support to the JIT for this, probably a day of work for someone who knew the codebase, a few days for someone learning it.
On Tue, Oct 14, 2014 at 7:05 AM, Timothy Baldridge <tbaldridge@gmail.com> wrote:
I've read a few older articles about SIMD support in PyPy, what is the status of this? If I wanted to add something like a Vector3 type to my language (like mono did here http://tirania.org/blog/archive/2008/Nov-03.html) and wanted to take advantage of SSE are there primitives for this?
Thanks,
Timothy
-- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth)
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero GPG Key fingerprint: 125F 5C67 DFE9 4084
Hi Alex, On 14 October 2014 18:42, Alex Gaynor <alex.gaynor@gmail.com> wrote:
I'm talking about an explicit "vector_3f_add()" primitive, would be pretty straightforward to do the mapping. IIRC it took us less than a day to add READ_TIMESTAMP instruction.
I agree with Maciej on this point. The problem with "vector_3f_add()" is that it needs to use more than the lower 8 bytes of xmm registers. We currently have no support for initializing/allocating/saving/restoring such special xmm registers. The alternative would be to have a "vector_3f_add()" that takes 4 xmm registers, combine them into two, add them, and re-split the result. It's unclear if that's really faster than doing two separate additions though. A bientôt, Armin.
On 14 October 2014 18:46, Armin Rigo <arigo@tunes.org> wrote:
The alternative would be to have a "vector_3f_add()" that takes 4 xmm registers, combine them into two, add them, and re-split the result.
...or, as Maciej says, have only the ability to operate on memory data. But even ignoring the alignment mess, that's even worse in this case, because what you have here is vectors of 3 numbers, not big arrays of numbers. A bientôt, Armin.
participants (4)
-
Alex Gaynor
-
Armin Rigo
-
Maciej Fijalkowski
-
Timothy Baldridge