cbalint13 commented on PR #15685:
URL: https://github.com/apache/tvm/pull/15685#issuecomment-1714514112
>"F" would stand for foundation, probably avx512bw implies that CPU also
have avx512f (but not vice-versa)
>One example of partial avx512 is the "knl" having the avx512f (foundation)
part but not having the avx512bw part.
@vvchernov ,
One more informal expreriment:
* I made this experiment below, and results disprove that ```avx512bw```
implies ```avx512f``` (aka "foundation part").
* The ```x86-64-v4``` popping up is kind of "arch-generic", so let's enforce
```avx512bw``` && ```avx512f``` presence.
* For this ODD case, something like ```llvm -mcpu=x86-64-v4
-mattr=+avx512f``` passes the test below (checked).
```
$ cat ./tvm-check-avx512bw.py
#!/usr/bin/python3
import tvm
from tvm.target import codegen
from tvm.target.x86 import target_has_features
for mcpu in codegen.llvm_x86_get_archlist():
with tvm.target.Target("llvm -mcpu=%s" % mcpu):
if target_has_features("avx512bw"):
has_avx512f = target_has_features("avx512f")
print("ARCH [%s] having `avx512bw` has avx512f=[%i]" % (mcpu,
has_avx512f))
$ ./tvm-check-avx512bw.py
ARCH [skylake-avx512] having `avx512bw` has avx512f=[1]
ARCH [skx] having `avx512bw` has avx512f=[1]
ARCH [cascadelake] having `avx512bw` has avx512f=[1]
ARCH [cooperlake] having `avx512bw` has avx512f=[1]
ARCH [cannonlake] having `avx512bw` has avx512f=[1]
ARCH [icelake-client] having `avx512bw` has avx512f=[1]
ARCH [rocketlake] having `avx512bw` has avx512f=[1]
ARCH [icelake-server] having `avx512bw` has avx512f=[1]
ARCH [tigerlake] having `avx512bw` has avx512f=[1]
ARCH [sapphirerapids] having `avx512bw` has avx512f=[1]
ARCH [graniterapids] having `avx512bw` has avx512f=[1]
ARCH [graniterapids-d] having `avx512bw` has avx512f=[1]
ARCH [emeraldrapids] having `avx512bw` has avx512f=[1]
ARCH [znver4] having `avx512bw` has avx512f=[1]
ARCH [x86-64-v4] having `avx512bw` has avx512f=[0] <--- ODD !!! (but pass
with -mattr=+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]