SYCLomatic
SYCLomatic copied to clipboard
Value type must be arithmetic type
When building the DPCT codes from the CUDA codes (https://github.com/zjin-lcf/HeCBench/blob/master/src/atomicAggregate-cuda/main.cu) with an Intel LLVM compiler, the compile reports the following message. Could you reproduce the issue ? Thanks.
static assertion failed due to requirement 'std::is_arithmetic_v<int *>': Value type must be arithmetic type.
303 | static_assert(std::is_arithmetic_v<T>, "Value type must be arithmetic type.");
main.cpp:15:18: note: in instantiation of function template specialization 'dpct::match_any_over_sub_group<int *>' requested here
15 | mask = dpct::match_any_over_sub_group(item_ct1.get_sub_group(), tmask, ptr);
Is there a SYCL version for match_any (i.e. sycl::match_any_over_sub_group) ?
After updating the DPCT codes, I ran the CUDA and DPCT programs on a V100 GPU:
CUDA
./main 1000
Total kernel time (32 locations): 1.842957 (s)
PASS
Total kernel time (16 locations): 1.088788 (s)
PASS
Total kernel time (8 locations): 0.726234 (s)
PASS
Total kernel time (4 locations): 0.726321 (s)
PASS
Total kernel time (2 locations): 0.726336 (s)
PASS
Total kernel time (1 locations): 0.363953 (s)
PASS
DPCT
Total kernel time (32 locations): 2.635029 (s)
PASS
Total kernel time (16 locations): 1.359202 (s)
PASS
Total kernel time (8 locations): 0.744090 (s)
PASS
Total kernel time (4 locations): 0.727971 (s)
PASS
Total kernel time (2 locations): 0.727246 (s)
PASS
Total kernel time (1 locations): 0.364698 (s)
PASS
@jinz2014 There is no SYCL version for match_any, but we may could replace the arithmetic type check with trivially copyable type check.
I see. Could we propose adding "match_any" in the SYCL standard ? Thanks.
@jinz2014 I think so. You can file an extension feature request on https://github.com/intel/llvm/issues, like https://github.com/intel/llvm/tree/sycl/sycl/doc/extensions shows, it should be added to https://github.com/intel/llvm/tree/sycl/sycl/doc/extensions/proposed first.
Hi! There have been no updates for at least the last 60 days, though the issue has assignee(s).
@intwanghao, could you please take one of the following actions:
- provide an update if you have any
- unassign yourself if you're not looking / going to look into this issue
- mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it
- close the issue if it has been resolved
- take any other suitable action.
Thanks!