-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated the DPCTLKernelArgType enum values to be aligned with C++11 types #1581
Conversation
481448d
to
1d9c7a9
Compare
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_60 ran successfully. |
6702b3b
to
3041dad
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_62 ran successfully. |
3041dad
to
27be69f
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_62 ran successfully. |
27be69f
to
56374ee
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_62 ran successfully. |
rm -rf ${INSTALL_PREFIX} | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_C_COMPILER=icx \ | ||
-DCMAKE_CXX_COMPILER=dpcpp \ | ||
-DCMAKE_CXX_COMPILER=icpx \ | ||
-DCMAKE_CXX_FLAGS=-fsycl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the right way of integrating SYCL and cmake would be to use find_package(IntelSycl)
, but this could be done in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are in the helper script, let us fix in separate PR. I just needed to get the helper script working once more to develop on libsyclinterface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @diptorupd
It would also be useful to document in the comment how multiple SPVs are compiled into a single one.
Also, if one is on a machine without support for double
type, IGC route of generation of the kernel for double
won't work, how does one generate the kernel then?
Clarifying my own misunderstanding. When C++ is compiled with default This way, JIT-ting the generic bundle would work for all devices, regardless of the aspect supported. Hence no manual bundling of multiple SPV files is required. The recipe to extract SPV from executable produced by DPC++ assumes IGC is available. An alternative approach is to use With these clarified, the PR is good to go in, although I'd still prefer if these notes were copied into the source of the test file. |
I have updated the comment in the test file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @diptorupd , LTGM!
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_67 ran successfully. |
kargty[idx] = _arg_data_type._UNSIGNED_INT | ||
elif isinstance(arg, ctypes.c_uint8): | ||
kargty[idx] = _arg_data_type._INT16_T | ||
elif isinstance(arg, ctypes.c_ushort): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late, but why if instance(arg, ....)
still uses old style types?
Backport gh-1581 to 0.16.x maintenance branch
Previously, the
DPCTLKernelArgType
had a mix of C99 types (long
,long long
, etc.) and C++ types (size_t
,int8_t
). After these changes the enum values have been updated to only include the C++11 integer types:[u]int[8|16|32|64]_t
,float
anddouble
.A Python enum corresponding to the libsyclinterface C++ enum was also added to make it simpler to get the types from Python. It will help numba-dpex not have to hard code magic values in its code base.
The
DPCTLQueue_SubmitRange
andDPCTLQueue_SubmitNdRange
functions were updated to silence compiler warnings.Unit tests were added for verifying the submission of one-dimensional range kernels each with a different kernel argument type.
NOTE:
DPCTLQueue_SubmitNdRange
will not be tested as part of this PR. I will be be adding those tests as part of the local accessor support as a kernel argument PR.New libsyclinterfrace unit tests to test for all possible kernel argument types, including a negative test.