Repository: pytorch
Issue: error: ‘_mm512_set_epi8’ was not declared in this scope when build from source on AMD 3600 CPU
Labels: module: build,triaged,module: vectorization

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
../aten/src/ATen/cpu/vec/vec512/vec512_qint.h:117:56: error: ‘_mm512_set_epi8’ was not declared in this scope
   static const __m512i shuffle_mask_v = _mm512_set_epi8(
                                         ~~~~~~~~~~~~~~~^
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0x0c, 0x08, 0x04, 0x00,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0x0c, 0x08, 0x04, 0x00,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0x0c, 0x08, 0x04, 0x00,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0xff, 0xff, 0xff, 0xff,
       ~~~~~~~~~~~~~~~~~~~~~~~                           
       0x0c, 0x08, 0x04, 0x00);
       ~~~~~~~~~~~~~~~~~~~~~~~

## To Reproduce

Steps to reproduce the behavior:

1. python setup.py install
1.
1.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

build successfully

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.2 LTS (x86_64)
GCC version: (Ubuntu 8.4.0-3ubuntu2) 8.4.0
Clang version: Could not collect
CMake version: version 3.19.6
Libc version: glibc-2.31

Python version: 3.9.6 (default, Aug 18 2021, 19:38:01)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.31
Is CUDA available: N/A
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1650
Nvidia driver version: 470.63.01
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.4
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.3
[conda] blas                      1.0                         mkl    defaults
[conda] magma-cuda101             2.5.2                         1    pytorch
[conda] mkl                       2021.3.0           h06a4308_520    defaults
[conda] mkl-include               2021.3.0           h06a4308_520    defaults
[conda] mkl-service               2.4.0            py39h7f8727e_0    defaults
[conda] mkl_fft                   1.3.0            py39h42c9631_2    defaults
[conda] mkl_random                1.2.2            py39h51133e4_0    defaults
[conda] numpy                     1.20.3           py39hf144106_0    defaults
[conda] numpy-base                1.20.3           py39h74d4b33_0    defaults


## Additional context

<!-- Add any other context about the problem here. -->
the CPU of the build machine is AMD ryzen 3600x. it doesn't support avx512

cc @malfet @seemethere