Hello
I am encountering a compile error if I use the intel include file <sycl/ext/intel/math.hpp> when compiling for an NVIDIA GPU target using “-fsycl-targets=nvptx64-nvidia-cuda”. I wish to use this include file to get access to bessel function maths, which I have tested on Intel GPUs using oneAPI…
I have installed the NVIDIA GPU plugin for oneAPI and have successfully run the sample program simple-sycl-app.cpp supplied by Codeplay.
This is my sycl-ls output
sycl-ls
[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2024.18.7.0.11_160000]
[cuda:gpu][cuda:0] NVIDIA CUDA BACKEND, Tesla T4 7.5 [CUDA 12.4]
if I include <sycl/ext/intel/math.hpp>, but do NOT use the “-fsycl-targets=nvptx64-nvidia-cuda” option, the program compiles and runs, but of course it does NOT use the NVIDIA GPU.
However as soon as I include <sycl/ext/intel/math.hpp> I get lots of errors implying that some functions have been declared with conflicting types. For example;
==================
In file included from /opt/intel/oneapi/compiler/2024.2/bin/compiler/…/…/include/sycl/ext/intel/math.hpp:37:
/opt/intel/oneapi/compiler/2024.2/bin/compiler/…/…/include/sycl/ext/intel/math/imf_fp_conversions.hpp:52:7: error: conflicting types for ‘__imf_half2float’
52 | float __imf_half2float(_iml_half_internal);
| ^
/opt/intel/oneapi/compiler/2024.2/bin/compiler/…/…/include/sycl/builtins.hpp:178:36: note: previous declaration is here
178 | extern __DPCPP_SYCL_EXTERNAL float __imf_half2float(_Float16 x);
| ^
Could you please advise if it possible to use this include file <sycl/ext/intel/math.hpp> as I use it for the function
e.g. float b1 = sycl::ext::intel::math::jn(0, 1.0f);
Thank you.
RCB