unisa-hpc / sycl-bench

SYCL Benchmark Suite
BSD 3-Clause "New" or "Revised" License
56 stars 31 forks source link

Add AdaptiveCPP `sycl::specialized` support for specialization constant benchmark #78

Closed Luigi-Crisci closed 6 months ago

Luigi-Crisci commented 7 months ago

This PR adds support for AdaptiveCpp sycl::specialized to the specialization constant benchmark. While the AdaptiveCpp extension is not technically a spec constant implementation, it serves the same purpose therefore I think it's correct to include it in SYCL-Bench.

illuhad commented 7 months ago

@PeterTh We have this macro: https://github.com/AdaptiveCpp/AdaptiveCpp/blob/0359cac9e08d44c48c586ef3ec88e95ac64a4d44/include/hipSYCL/sycl/extensions.hpp#L58

Luigi-Crisci commented 7 months ago

@PeterTh Yeah not a fan of #ifdef but I tried to minimize the impact on performance and avoid code duplication. I will substitute the macro with the sycl::specialized specific one, but I don't think it will the problem as older AdaptiveCpp versions will still fail to compile the spec constant benchmark. IMO the best idea would be to have Cmake checks for SYCL2020 features and selectively enable the benchmarks.

Luigi-Crisci commented 6 months ago

Gonna merge this as it blocks other PRs. Thanks to all of you!