- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am a new developer for mic. Rencent I met a problem confused me a lot.
the code like that:
__declspec (aligned(128)) float farray[] = {0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0}; F32vec16 vecConst; vecConst = *(F32vec16*)&farray[0];
first I compile in native mode like:
icpc -mmic -openmp......
it work well and run well in mic.
but when I want to use a offload mode (the code is in a #pragma offload region) and I compile with:
icpc -openmp ......
it report compile error: "error #13393: *MIC* Opcode unsupported on target architecture: movaps" in the line "vecConst = *(SIMDType*)&farray[0];"
I can not figure it out why?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That problem sounded familiar so I search in the User and Reference Guide for the Intel® C++ Compiler and found in the section "Use of C++ Classes for SIMD Operations on Intel® Many Integrated Core Architecture (Intel® MIC Architecture)":
"You can enable these classes within native code or within offloaded code that is written to contain target-specific code typically protected by the __MIC__ macro."
You might want to do something like what it says in the section "Writing Target-Specific Code Using a Pragma" in the User and Reference Guide.
You can find the software documentation at: https://software.intel.com/en-us/intel-software-technical-documentation. The section "Writing Target-Specific Code Using a Pragma", in the 14.0 version of the manual is at https://software.intel.com/en-us/node/512551
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That problem sounded familiar so I search in the User and Reference Guide for the Intel® C++ Compiler and found in the section "Use of C++ Classes for SIMD Operations on Intel® Many Integrated Core Architecture (Intel® MIC Architecture)":
"You can enable these classes within native code or within offloaded code that is written to contain target-specific code typically protected by the __MIC__ macro."
You might want to do something like what it says in the section "Writing Target-Specific Code Using a Pragma" in the User and Reference Guide.
You can find the software documentation at: https://software.intel.com/en-us/intel-software-technical-documentation. The section "Writing Target-Specific Code Using a Pragma", in the 14.0 version of the manual is at https://software.intel.com/en-us/node/512551
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Frances Roth (Intel) wrote:
That problem sounded familiar so I search in the User and Reference Guide for the Intel® C++ Compiler and found in the section "Use of C++ Classes for SIMD Operations on Intel® Many Integrated Core Architecture (Intel® MIC Architecture)":
"You can enable these classes within native code or within offloaded code that is written to contain target-specific code typically protected by the __MIC__ macro."
You might want to do something like what it says in the section "Writing Target-Specific Code Using a Pragma" in the User and Reference Guide.
You can find the software documentation at: https://software.intel.com/en-us/intel-software-technical-documentation. The section "Writing Target-Specific Code Using a Pragma", in the 14.0 version of the manual is at https://software.intel.com/en-us/node/512551
Thanks! You reply is very helpful! I rewrite the code in the AVX immintrin form and add comment "ifdef __MIC__" and it work well.In offload mode it need the annotation "__MIC__" to tell the compiler that the code will be run on the mic.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page