You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Datashader we recently ran into an issue with a function that uses tuple expansion, which would compile for CPU targets but not on CUDA. This seemed to be because it didn't expand out the tuple and would then perform the wrong operation. Specifically this was this function:
This would fail during compilation with this error:
>>> add(Tuple(int32, int64, int64), array(uint32, 2d, C))
There are 12 candidate implementations:
- Of which 2 did not match due to:
Operator Overload in function 'add': File: unknown: Line unknown.
With argument(s): '(Tuple(int32, int64, int64), array(uint32, 2d, C))':
No match for registered cases:
* (int64, int64) -> int64
* (int64, uint64) -> int64
* (uint64, int64) -> int64
* (uint64, uint64) -> uint64
* (float32, float32) -> float32
* (float64, float64) -> float64
* (complex64, complex64) -> complex64
* (complex128, complex128) -> complex128
- Of which 10 did not match due to:
Overload of function 'add': File: <numerous>: Line N/A.
With argument(s): '(Tuple(int32, int64, int64), array(uint32, 2d, C))':
No match.
During: typing of intrinsic-call at /home/philippjfr/development/datashader/datashader/glyphs/line.py (736)
Presumably because the aggs_and_cols tuple was not being unpacked causing append to try to add the whole tuple to 2D array, which would fail the type check. If CUDA could support tuple unpacking that would be great although not hugely important for datashader since we have a macro that automatically expands out functions using tuple unpacking by manipulating the AST and recompiling a fully expanded function (which we implemented for optimization reasons).
The text was updated successfully, but these errors were encountered:
philippjfr
changed the title
CUDA functions do not expand tuples
CUDA functions do not support tuple expansion
Dec 1, 2020
Thanks for the report - I'll mark this as a feature request for CUDA. I think this is something that could be looked at once the work on making the CUDA dispatcher share more infrastructure with the CPU dispatcher is more complete (e.g. #6432).
In Datashader we recently ran into an issue with a function that uses tuple expansion, which would compile for CPU targets but not on CUDA. This seemed to be because it didn't expand out the tuple and would then perform the wrong operation. Specifically this was this function:
This would fail during compilation with this error:
Presumably because the
aggs_and_cols
tuple was not being unpacked causingappend
to try to add the whole tuple to 2D array, which would fail the type check. If CUDA could support tuple unpacking that would be great although not hugely important for datashader since we have a macro that automatically expands out functions using tuple unpacking by manipulating the AST and recompiling a fully expanded function (which we implemented for optimization reasons).The text was updated successfully, but these errors were encountered: