diff --git a/CHANGELOG.md b/CHANGELOG.md index 8256774..ed2813f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - Ensure all OpenCL kernels are present in destructor. - Unified run function in driver code to reduce code duplication, output should be uneffected. - Normalise sum result by expected value to help false negative errors. +- Update SYCL version to SYCL 2020. ### Removed - Pre-building of kernels in SYCL version to ensure compatibility with SYCL 1.2.1. diff --git a/SYCL.make b/SYCL.make index 58df8d0..4e7648d 100644 --- a/SYCL.make +++ b/SYCL.make @@ -7,6 +7,9 @@ Available compilers are: For HIPSYCL and COMPUTECPP, SYCL_SDK_DIR must be specified, the directory should contain [/lib, /bin, ...] For DPCPP, the compiler must be on path + + You may need to use the following if running old glibc: + EXTRA_FLAGS="--gcc-toolchain=$(realpath "$(dirname "$(which gcc)")"/..)" endef $(info $(compiler_help)) COMPILER=HIPSYCL diff --git a/SYCLStream.cpp b/SYCLStream.cpp index f3dd55f..b4fa514 100644 --- a/SYCLStream.cpp +++ b/SYCLStream.cpp @@ -156,7 +156,7 @@ T SYCLStream::dot() cgh.parallel_for(sycl::range<1>{array_size}, // Reduction object, to perform summation - initialises the result to zero - sycl::reduction(d_sum, cgh, std::plus(), sycl::property::reduction::initialize_to_identity); + sycl::reduction(d_sum, cgh, std::plus(), sycl::property::reduction::initialize_to_identity), [=](sycl::id<1> idx, auto& sum) { sum += ka[idx] * kb[idx];