Hi! Trying to link against oneMKL and got the following compilation error:
In file included from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl.h:20:0,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl_ext_intel.h:44,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/detail/common.hpp:11,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/access/access.hpp:10,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic_enums.hpp:12,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic_accessor.hpp:11,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl/ONEAPI/atomic.hpp:11,
from /opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/sycl.hpp:11,
from /home/dkurt/openvino_pytorch_unpool/user_ie_extensions/fft_impl.cpp:15:
/opt/intel/oneapi/compiler/latest/linux/include/sycl/CL/cl_version.h:22:104: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
#pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
^
In file included from /opt/intel/oneapi/mkl/latest/include/oneapi/mkl.hpp:32:0,
from /home/dkurt/openvino_pytorch_unpool/user_ie_extensions/fft_impl.cpp:16:
/opt/intel/oneapi/mkl/latest/include/oneapi/mkl/stats.hpp:70:38: error: declaration of ‘constexpr const oneapi::mkl::stats::layout layout’ [-fpermissive]
static constexpr layout layout = ObservationsLayout;
^~~~~~~~~~~~~~~~~~
/opt/intel/oneapi/mkl/latest/include/oneapi/mkl/stats.hpp:35:12: error: changes meaning of ‘layout’ from ‘enum class oneapi::mkl::stats::layout’ [-fpermissive]
enum class layout : std::int64_t {
^~~~~~
/opt/intel/oneapi/mkl/latest/include/oneapi/mkl/stats.hpp:101:38: error: declaration of ‘constexpr const oneapi::mkl::stats::layout layout’ [-fpermissive]
static constexpr layout layout = ObservationsLayout;
^~~~~~~~~~~~~~~~~~
/opt/intel/oneapi/mkl/latest/include/oneapi/mkl/stats.hpp:35:12: error: changes meaning of ‘layout’ from ‘enum class oneapi::mkl::stats::layout’ [-fpermissive]
enum class layout : std::int64_t {
Link Copied
Workarounded issue by changing compiler to dpcpp:
1. Detect oneMKL in CMake:
find_package(LAPACK REQUIRED)
2. Use -DCMAKE_CXX_COMPILER=dpcpp
Hi,
We are redirecting your query to the MKL/oneMKL forum since your question is specific to oneMKL.
Thanks,
Rahul
Hi,
Thanks for reaching out to us!
We have escalated your thread to the concerned internal team who will guide you further,
Regards
Goutham
Workarounded issue by changing compiler to dpcpp:
1. Detect oneMKL in CMake:
find_package(LAPACK REQUIRED)
2. Use -DCMAKE_CXX_COMPILER=dpcpp
For more complete information about compiler optimizations, see our Optimization Notice.