-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Implement SYCL-2020 reductions with read_write to reduction va… #3315
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] Implement SYCL-2020 reductions with read_write to reduction va… #3315
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.
I might have missed it, but I don't see any support here for the new interface that accepts a sycl::span
. I assume that's because we haven't implemented sycl::span
yet, but I think it would be good to note that this feature isn't implemented in the commit message.
…riable LIT tests: intel/llvm-test-suite#170 This patch: - adds SYCL-2020 property::reduction::initialize_to_identity - implements support for SYCL-2020 reductions for which initialize_to_identity is NOT used (corresponds to read_write and USM ONEAPI::reductions). sycl::reduction re-uses ONEAPI::reduction implementation/classes and automatically creates placeholder accessors for sycl::reduction called with sycl::buffer argument. - adds operator++ for reducer class defined in SYCL-2020 - fixes 2 errors in an ONEAPI::reduction used with placeholder accessors. The attribute "initialize_to_identity" is NOT supported yet. The multi-dimensional reductions are NOT supported yet. Reductions accepting sycl::span are not supported yet. Reductions cannot be yet used in parallel_for() accepting sycl::range Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
f0ada1b
to
9bc6e86
Compare
…var) Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Adding the new bool property property::reduction::initialize_to_identity caused creation of new exported symbols, which is not ABI-breaking change and thus requires changin the MINOR component of the version. Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Adding the new bool property property::reduction::initialize_to_identity Adding @romanovvlad and @alexbatashev to review this aspect of the patch. |
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.
Otherwise LGTM
Having trouble using the version with exiting SYCL 1.2.1 and newer SYCL 2020 codes. Similar errors occur for BabelStream I followed the instructions for building this LLVM with the Python scripts which worked. Exported the environment variables, and have the runtimes in place. Build the BabelStream code as below:
The errors I get are below, which look like a load of missing libraries.
|
I was missing the hidden flags normally provided by the It's a shame there is no |
…of SYCL version Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
Jenkins/Precommit testing reported only 1 test fail - SYCL/Reduction/reduction_reducer_op_eq.cpp |
@alexbatashev thank you for the review. I reverted the update of MINOR component of the VERSION. The fail on only 1 LIT test (SYCL/Reduction/reduction_reducer_op_eq.cpp) is expected and is fixed by intel/llvm-test-suite#170 |
This test failed due to usage of cl::sycl::ONEAPI and cl::sycl namespaces, which caused error after adding sycl::reduction in intel/llvm#3315 Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
BTW, I uploaded an additional NFC fix for failed LIT test: intel/llvm-test-suite#177 |
This test failed due to usage of cl::sycl::ONEAPI and cl::sycl namespaces, which caused error after adding sycl::reduction in intel/llvm#3315 Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
These changes verify intel/llvm#3315 Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
…el/llvm-test-suite#177) This test failed due to usage of cl::sycl::ONEAPI and cl::sycl namespaces, which caused error after adding sycl::reduction in intel#3315 Signed-off-by: Vyacheslav N Klochkov <vyacheslav.n.klochkov@intel.com>
…riable
LIT tests: intel/llvm-test-suite#170
The patch has ABI non-breaking change requiring up-lifting the MINOR component
of the SYCL version.
This patch:
is NOT used (corresponds to read_write and USM ONEAPI::reductions).
sycl::reduction re-uses ONEAPI::reduction implementation/classes and
automatically creates placeholder accessors for sycl::reduction called
with sycl::buffer argument.
The attribute "initialize_to_identity" is NOT supported yet.
The multi-dimensional reductions are NOT supported yet.
Reductions accepting sycl::span are not supported yet.
Reductions cannot be yet used in parallel_for() accepting sycl::range
Signed-off-by: Vyacheslav N Klochkov vyacheslav.n.klochkov@intel.com