cbalint13 commented on PR #15685:
URL: https://github.com/apache/tvm/pull/15685#issuecomment-1714241667

   > Hello @cbalint13! Very hard work! One note I should say TVM needs three 
avx512 intrinsics: vpmaddwd, vpmaddubsw and **vpaddd**. For the latter "+" is 
used but it is automatically replaced by intrinsics by llvm, and it is in 
**avx512f** set (I checked it 
[here](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#techs=AVX_512&text=vpaddd&ig_expand=113)).
   
   @vvchernov ,
   
   See now, very good point !
   
   Let's ask for booth, will change with these comments:
   
   ```
   // avx512f:  llvm.x86.avx512.addpd.w.512 (LLVM auto, added)
   // avx512bw: llvm.x86.avx512.pmaddubs.w.512" (TVM required)
                llvm.x86.avx512.pmaddw.d.512"
   if ( target_has_feature("avx512bw")
      && target_has_feature("avx512f")):
   ```
   ---
   
   Just as side note (curiosity) on this topic:
   
   Maybe one day someone can add separate  _compute(), _update() for topi (more 
precise one) not letting LLVM itself.
   I would be curious of outcome, in the first (i.) LLVM would ommit 
```addpd.w.512```  by adding something suboptimal.
     *   i. "llvm -mcpu=x86-64 -mattr=+avx512bw"
      *  ii. "llvm -mcpu=x86-64 -mattr=+avx512bw,+avx512f"
   As ```i.``` versus ```ii.``` ,  "x86-64" is the plainest configuration for 
llvm, allowing only explicit flags.
   
   Anyway, let's go now with ```avx512bw``` && ```avx512f```.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to