-
Notifications
You must be signed in to change notification settings - Fork 245
Description
The macros at [1] assume that if SYCL_LANGUAGE_VERSION is defined then the user wants to use boost math with SYCL. However this macro is defined by the SYCL compiler even when it is compiling host only code.
- The user may only want to use boost::math on the host and never the device. For example consider test code which uses boost::math as an alternative implementation to test against.
- The user may use a intermediate library on the host which transitively includes boost::math.
These macros also assume that SYCL_EXTERNAL is defined [2]. However SYCL_EXTERNAL is optionally defined by the SYCL implementation if it is supported [3].
These macros define BOOST_MATH_NO_EXCEPTIONS which in turn triggers this bug [4]? This might be fixed as of 1.89.0?
Please can boost::math SYCL support be opt-in or at least opt-out?
Many thanks,
Will
[1]
math/include/boost/math/tools/config.hpp
Line 705 in 5e088ff
| #elif defined(SYCL_LANGUAGE_VERSION) |
[2]
math/include/boost/math/tools/config.hpp
Line 707 in 5e088ff
| # define BOOST_MATH_SYCL_ENABLED SYCL_EXTERNAL |
[3] https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_preprocessor_directives_and_macros
[4] #1285