Quantcast
Channel: Intel® Many Integrated Core Architecture
Viewing all articles
Browse latest Browse all 1347

Compiler error with some MIC intrinsics

$
0
0

I'm currently trying to use intrinsics to speed up my application. However I'm having problems with some intrinsics that won't compile. This is some test code:

#pragma offload_attribute(push, target(mic))
#include "immintrin.h"
void foo()
{
  //_mm_clevict(0, _MM_HINT_T0);
  //_mm_prefetch(0, _MM_HINT_ET1);
}
#pragma offload_attribute(pop)

int main()
{
  #pragma offload target(mic:0)
  {
    foo();
  }
}

If I compile this with the commandline "icc test.cpp" and comment out the _mm_clevict line I'm getting a "undefined reference to `_mm_clevict'" error. If I comment out the _mm_prefetch I'm getting an "internal error: 04010002_1809". However if I compile this as a native application using "icc test.cpp -mmic" everything compiles fine. Also if I move the call to _mm_clevict or _mm_prefetch into the offload region in the main function everything compiles fine. How do I use these intrinsics correctly? My compiler version is: icc version 15.0.0 (gcc version 4.4.7 compatibility)


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>