[SPIRV] Add convergent attribute to SPIR-V built-ins#1373
Conversation
Optimizations can't preserve SPIR-V built-in semantics w/o additional attribute. Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Fznamznon
left a comment
There was a problem hiding this comment.
Just wondering, is it possible to test it somehow?
How to make sure that we didn't forget to mark some function?
|
|
||
| // Convergent attribute | ||
| #ifdef __SYCL_DEVICE_ONLY__ | ||
| #define __SYCL_CONVERGENT__ __attribute__((convergent)) |
There was a problem hiding this comment.
I wonder, why SYCL? AFAIK convergent is a non-sycl-specific clang attribute.
There was a problem hiding this comment.
Clang attribute is not SYCL specific, but macro is.
Do you have better name in mind?
There was a problem hiding this comment.
Not sure. I'd probably just named it as CONVERGENT. I also don't see why this macro is SYCL specific. We, for example, have ALWAYS_INLINE macro which somehow is not SYCL specific. So, I'll leave final naming up to you.
This is non-functional change for the current design, so I wasn't able to come-up with a good approach to validate observable behavior change. Let me know if you have any ideas.
Code review :). |
Yep, I also do not have other options except trying to run something with fe optimizations enabled.
Reviewers also can easy miss something. |
|
This code is supposed to be replaced by #1374, eventually. |
…hinx * upstream/sycl: (357 commits) [Support] Implement a simple tabular data management library (intel#1358) [Support] Implement a property set I/O library (intel#1357) [SYCL] Fix buffer constructor using iterators (intel#1386) [SYCL][FPGA] Enable a set of loop attributes (intel#1312) [Driver][SYCL][FPGA] Proper dependency output location when given /Fo<dir> (intel#1346) [SPIR-V] Enabling SPIR-V builtin lookup in device SYCL mode (intel#1384) [SYCL][NFC] Unify setting kernel arguments (intel#1379) [SYCL][Doc] First revision of standard layout relaxation extension (intel#1344) [SYCL] Fixed sub-buffer alloca search (intel#1385) [SYCL][FPGA] Emit multiple IR variants for the IVDep attribute (intel#1383) [SYCL] Add experimental flag to enable front-end optimizations (intel#1376) [SYCL] Remove unexpected double in complex SPIR-V for float support (intel#1381) [SYCL] Default work-group sizes based on max (intel#952) [SYCL][CUDA] Fix usage of multiple backends in the same program (intel#1252) [SPIR-V] Add SPIR-V builtin definitions to the builtin lookup. [SPIR-V] Add macro definition when -fdeclare-spirv-builtins is activated [SYCL] Fix sycl_generic printing [SYCL] Support intel::reqd_work_group_size (intel#1328) [SYCL][NFC] Make the RT::PiPlugin object private (intel#1375) [SPIRV] Add convergent attribute to SPIR-V built-ins (intel#1373) ...
The attribute sets SPIR-V built-in semantics for the compiler.
Signed-off-by: Alexey Bader alexey.bader@intel.com