acts-project / vecmem

Vectorised data model base and helper classes.
https://acts-project.github.io/vecmem/
Mozilla Public License 2.0
19 stars 13 forks source link

Separate SYCL compilation details from vecmem core #283

Closed stephenswat closed 1 month ago

stephenswat commented 4 months ago

The SYCL build system for vecmem suffers from a pretty nasty problem where it has to be compiled using a SYCL-capable compiler. This means that an installation of SYCL cannot be conveniently classified by the single compiler used to build it. Fixing this will take a few more PR's but a more pressing issue is that the vecmem core library is actually infected with compilation details from the SYCL library. More specifically, the core library carries information about the function used to print in SYCL code, leading to the fact that the core library can change if the SYCL library is enabled, disabled, or is compiled with a different compiler which is very undesirable. This commit migrates all the SYCL-related logic from the core library to the SYCL library to resolve this issue.

stephenswat commented 4 months ago

Actually, as is usually the case, the best solution would be to minimize the role of CMake in all of this and just rely on the preprocessor to solve this problem for us. I'll update the PR later.

krasznaa commented 4 months ago

Selecting the correct print function via preprocessor logic is going to result in much more fragile code unfortunately. :frowning: No, I'm not in favour of that.

krasznaa commented 1 month ago

Replaced by #294.