FIAS . Impressum . Privacy

Vc issue

Duhem, Laurent [please enable javascript to see the address]
Thu Sep 10 16:15:02 CEST 2015


Hello Matthias



I had a look at your ./mic/intrinsics.h file.

This looks a bit blurry to me:



Machine instruction for those kind of intrinsic have a field of 3 bits in the mnemonic to specify the conversion argument (so called MVEX.SSS field) – same for the memory hint: the hint is represented by one bit ( MVEX.EH).

Hence the compiler can’t generate the final machine instruction unless the conversion and hit are a fixed compile time constant. In case it would want to do so, it would have to enable some kind of ‘text segment editing’ at run time: You would need to change the instruction just before it is being executed.

This would be difficult to do but even worse: It would be a disaster for performance since changing the text segment is something requiring a total stall of the pipeline, a wait on all ongoing operations to complete ( like writes to memory) etc  Not to mention, that you would have to make the text segment ‘writeable’ before etc

I just tried to compile the below code. None of the below instantiation could work, but maybe this is not really representative of your current implementation ?
Feel free to ping me ..

#include <immintrin.h>

template<typename DownConv>
void scatter(void *m, __m512i i, __m512i v, DownConv downconv, int scale)
{
    _mm512_i32extscatter_epi32(m, i, v, downconv, scale, _MM_HINT_NONE);
}

void foo()
{
   void *m;
   __m512i i, v;
   int scale, downconv;

   // Should instanciate scatter<_MM_DOWNCONV_EPI32_ENUM>
   void  (*ptr) (void *, __m512i , __m512i , _MM_DOWNCONV_EPI32_ENUM, int) = scatter;

   scatter<int>(m,i,v,downconv,scale);
   scatter<_MM_DOWNCONV_EPI32_ENUM>(m,i,v,_MM_DOWNCONV_EPI32_NONE,scale);

}



Regards;


[image001]
[please enable javascript to see the address][please enable javascript to see the address]>
• Office:        +33 158877271
• Mobile:       +33 621415972
________________________________

-----Original Message-----
[please enable javascript to see the address]]
Sent: Tuesday, September 8, 2015 9:03 PM
To: Duhem, Laurent; Oertel, Klaus-Dieter
[please enable javascript to see the address]
Subject: Re: Vc issue



I had a chance today to try ICC 16 and it looks like a mess.



Most puzzling issue at this point:



extern void __cdecl _mm512_i32extscatter_epi32(void* mv, __m512i index, __m512i v1, _MM_DOWNCONV_EPI32_ENUM conv, int scale, int hint); (cf. https://software.intel.com/en-us/node/582418)



The intrinsic is still declared with the enum for the conv parameter in zmmintrin.h, but the compiler actually thinks conv is of type unsigned int.

I.e. if I pass an int it compiles without error or even a warning. If I pass a type that is implicitly convertible to either _MM_DOWNCONV_EPI32_ENUM or _MM_UPCONV_EPI32_ENUM, the compiler stops, saying both are equally good candidates for conversion to unsigned int. Did you really just release a source incompatible change to the MIC intrinsics? Without even adjusting the documentation?



Seems like I have to rewrite a significant part of my code once more. The MIC implementation has been the most frustrating experience in that regard. :(



Cheers,

  Matthias



On Monday 07 September 2015 12:24:44 Matthias Kretz wrote:

> I applied your FindMIC.cmake patch. Is there anything else missing?

>

> I just installed ICC 16 on a test system and I hope I can find some

> time to look at it myself soon. But please keep the patches coming in

> - though feel free to post it as a pull request on Github, which makes

> it easier to comment on the changes if necessary.

>

> Cheers,

>  Matthias

>

> On Friday 04 September 2015 11:15:47 Duhem, Laurent wrote:

> > Thx Matthias.

> >

> >

> >

> > I guess detection of newest Intel compiler 16 is also broken, as we

> > heavily changed installation layout.

> >

> > Can you also look at fixing related Findxxx.cmake script pls ?

> >

> >

> >

> > Regards

>

> _______________________________________________

> Vc mailing list

>[please enable javascript to see the address][please enable javascript to see the address]>

> https://compeng.uni-frankfurt.de/mailman/listinfo/vc


---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20150910/cf211897/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3299 bytes
Desc: image001.gif
URL: <http://compeng.uni-frankfurt.de/pipermail/vc/attachments/20150910/cf211897/attachment-0001.gif>


More information about the Vc mailing list
FIAS . Impressum . Privacy