Build pytorch-rocm without AVX2

Hello, I am trying to build PyTorch-Rocm without AVX2.

Clone PyTorch with submodules

git clone --recursive GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration
cd pytorch

Set environment variables to disable AVX2 and enable ROCm

export NO_AVX2=1
export USE_ROCM=1
export ROCM_PATH=/opt/rocm
export PATH=$PATH:/opt/rocm/bin:/opt/rocm/hip/bin

Install Python dependencies

pip install -r requirements.txt

Run AMD build script for ROCm

python tools/amd_build/build_amd.py

Build PyTorch

python setup.py install

But every time I receive an error:

1 error generated when compiling for gfx900.
make: *** [Makefile.shim:27: flash/autotune.attn_fwd/FONLY__^fp16@16,1,16,False,True,True___MI200.o] Error 1
make: *** Waiting for unfinished jobs…
1 error generated when compiling for gfx900.
1 error generated when compiling for gfx900.
make: *** [Makefile.shim:23: flash/autotune.attn_fwd/FONLY__^fp16@16,1,16,True,False,False___MI200.o] Error 1
make: *** [Makefile.shim:11: flash/autotune.attn_fwd/FONLY__^fp16@16,1,16,True,True,True___MI200.o] Error 1
1 error generated when compiling for gfx900.
1 error generated when compiling for gfx900.
make: *** [Makefile.shim:15: flash/autotune.attn_fwd/FONLY__^fp16@16,1,16,True,True,False___MI200.o] Error 1
make: *** [Makefile.shim:19: flash/autotune.attn_fwd/FONLY__^fp16@16,1,16,True,False,True___MI200.o] Error 1
1 error generated when compiling for gfx900.
make: *** [Makefile.shim:1290: flash/shim.attn_fwd.o] Error 1
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.

My hardware:
CPU: Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
GPU: 5 x WX9100

Could you help me with this problem?