-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Add support for assuming SYCL queries fit in int #2215
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
[SYCL] Add support for assuming SYCL queries fit in int #2215
Conversation
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.
LGTM!
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.
@mdtoguchi should it also be enabled for https://github.com/intel/llvm/blob/sycl/sycl/test/check_device_code/id_queries_fit_int.cpp?
@alexbatashev, looks like the test can be updated to use the formal option instead of the predefine directly. I can make that adjustment. |
72560ad
to
ddc0934
Compare
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.
sycl/test/basic_tests/range_offset_fit_in_int.cpp should be updated also.
Made updates to not have this behavior on by default. |
1741eed
to
fbf863a
Compare
47fdcb2
to
0e323c7
Compare
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.
RT changes LGTM.
@AGindinson , @premanandrao , could I get reviews? |
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.
LGTM
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.
RT changes LGTM.
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.
Last question I promise :) Sorry I didn't notice this before. Otherwise LGTM
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.
LGTM. Thanks!
For good default performance, compiler needs to set -D_SYCL_ID_QUERIES_FIT_IN_INT_. This will add __builtin_assume() that says global_id/linear_id fits within MAX_INT. We also need to have an ability to override where programmer needs 31+bit in global_id/linear_id. This is provided via -f[no-]sycl-id-queries-fit-in-int
25298d9
to
fe2ab8c
Compare
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179 is being implemented, and some tests become obsolete. Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@2075517
For good default performance, compiler needs to set
-D_SYCL_ID_QUERIES_FIT_IN_INT_ by default. This will add
__builtin_assume() that says global_id/linear_id fits within
MAX_INT. We also need to have an ability to override where
programmer needs 31+bit in global_id/linear_id. This is
provided via -f[no-]sycl-id-queries-fit-in-int