Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6534 Discussions

[oneMKL] declaration of layout changes meaning of layout

Kurtaev__Dmitry
296 Views

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 {

 

0 Kudos
1 Solution
Kurtaev__Dmitry
241 Views

Workarounded issue by changing compiler to dpcpp:

 

1. Detect oneMKL in CMake:

find_package(LAPACK REQUIRED)

 

2. Use -DCMAKE_CXX_COMPILER=dpcpp

View solution in original post

3 Replies
RahulV_intel
Moderator
277 Views

Hi,


We are redirecting your query to the MKL/oneMKL forum since your question is specific to oneMKL.


Thanks,

Rahul


GouthamK_Intel
Moderator
262 Views

Hi,

Thanks for reaching out to us!

We have escalated your thread to the concerned internal team who will guide you further,


Regards

Goutham


Kurtaev__Dmitry
242 Views

Workarounded issue by changing compiler to dpcpp:

 

1. Detect oneMKL in CMake:

find_package(LAPACK REQUIRED)

 

2. Use -DCMAKE_CXX_COMPILER=dpcpp

Reply