Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mohammad_A_
Beginner
94 Views

AVX512 On Xeon Phi KNL using Intel Intrinsics

Hi,

I am a newbie to AVX512 Intrinsics, I tried this simple test code on Intel Xeon Phi 7210. I compiled using xMIC_AVX512.

I get an illegal instruction. This is the peice of code I am using

	__m512d src = _mm512_set1_pd(0.0); //passes successfully
	__m256i zerosInt = _mm256_set1_epi32(0);//passes successfully
	__m256i vIndex =  _mm256_set1_epi32(-1);//passes successfully
	int start = 0
	int end   = 16;
	int j;
	__m512d result_vector = _mm512_set1_pd(0.0); //passes successfully

	int rem = end - j;
	__mmask8 m = (rem > 8 ? 0xff : (0xff >> (8 - rem))); //passes successfully
	 printf("passed 3 mask = %d\n",  m);

	 __m512d valuesVector  = _mm512_mask_loadu_pd (src, m, &values[0]); //passes successfully
	 printf("passed 4\n");

          //This instruction fails :Illegal Instruction
	  __m256i columnsVector = _mm256_mask_loadu_epi32 (zerosInt, m, &columns[0]); //FAILS !!

	  printf("passed 5\n");

Please help,

Thanks.

0 Kudos
3 Replies
andysem
New Contributor III
94 Views

_mm256_mask_loadu_epi32 generates vmovdqu32 instruction from AVX-512VL instruction set, which I don't think is supported in Xeon Phi Knights Landing.

https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_mask_loadu_epi32&expand=30...

 

Mohammad_A_
Beginner
94 Views

Also I tried to use this one : __m512d xVector = _mm512_mask_i32gather_pd (src, m, columnsVectorMinusOne, &x[0], 1); And I get the same error (Illegal instruction on KNL 64-Core). This function belongs to AVX512F and generates vgatherdpd.
Mohammad_A_
Beginner
94 Views

the error is "Illegal instruction" I tried this code on KNL 64-Core
Reply