- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I compile this program for test Xeon Phi:
#pragma offload_attribute(push,target(mic))
#include <stdio.h>
#include "immintrin.h"
void sub()
{
__m512 v1 = _mm512_set1_ps(1.2);
__m512 v2 = _mm512_set1_ps(1.1);
v1 = _mm512_add_ps(v1, v2);
float out[16];
_mm512_store_ps(&out[0], v1);
printf("%.1f %.f %.f %.f\n", out[0], out[1], out[2], out[3]);
fflush(0);
}
#pragma offload_attribute(pop)
int main(int argc, char* argv[])
{
printf("hello from main\n");
#pragma offload target(mic)
sub();
}
I get error of compile:
icc tbo_sort.o -openmp -o tbo_sort.out
tbo_sort.o: In function `main':
tbo_sort.c:(.text+0x53): undefined reference to `_mm512_set1_ps'
tbo_sort.c:(.text+0x68): undefined reference to `_mm512_set1_ps'
tbo_sort.c:(.text+0xee): undefined reference to `_mm512_add_ps'
tbo_sort.c:(.text+0x132): undefined reference to `_mm512_store_ps'
tbo_sort.o: In function `sub':
tbo_sort.c:(.text+0x1b2): undefined reference to `_mm512_set1_ps'
tbo_sort.c:(.text+0x1c7): undefined reference to `_mm512_set1_ps'
tbo_sort.c:(.text+0x24d): undefined reference to `_mm512_add_ps'
tbo_sort.c:(.text+0x291): undefined reference to `_mm512_store_ps'
make: *** [tbo_sort.out] Error 1
Thanks,
Alexander
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You must protect the compilation of the intrinsics using __MIC__ in sub(). Have a look at this earlier thread http://software.intel.com/en-us/comment/1726413#comment-1726413
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page