acts-project / algebra-plugins

Mozilla Public License 2.0
3 stars 10 forks source link

oneAPI 2024.1.0 Support, main branch (2024.04.11.) #115

Closed krasznaa closed 5 months ago

krasznaa commented 5 months ago

As one might guess, #113 and #114 were just collateral updates for this PR. :stuck_out_tongue:

With oneAPI 2024.1.0 Intel switched to enforcing SYCL 2020 rules more strictly than it did earlier. And as it turns out, using std::abs with floating point numbers is no longer okay in SYCL device code. :thinking: Leading to the following, very non-descriptive linker error:

[build] ptxas fatal   : Unresolved extern function 'fabs'
[build] llvm-foreach: 
[build] ptxas fatal   : Unresolved extern function 'fabsf'
[build] llvm-foreach: 
[build] clang++: error: ptxas command failed with exit code 255 (use -v to see invocation)
[build] Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
[build] Target: x86_64-unknown-linux-gnu
[build] Thread model: posix
[build] InstalledDir: /software/intel/oneapi-2024.1.0/compiler/2024.1/bin/compiler
[build] clang++: note: diagnostic msg: Error generating preprocessed source(s).
[build] gmake[2]: *** [tests/accelerator/sycl/CMakeFiles/algebra_test_vecmem_sycl.dir/build.make:93: bin/algebra_test_vecmem_sycl] Error 1
[build] gmake[1]: *** [CMakeFiles/Makefile2:14540: tests/accelerator/sycl/CMakeFiles/algebra_test_vecmem_sycl.dir/all] Error 2

Switching to sycl::fabs solves the issue.

Note that one must not even use sycl::abs on floating point numbers. :confused: So I'll have some further fixes to do in the higher level projects as well... :thinking: