PyTorch v.2.3.1 unable to configure

Hello,

Im trying to build pytorch v.2.3.1 with HIP. Im configure the project with:

cmake \
-DCMAKE_C_FLAGS:STRING="-O2 -fPIC" \
-DCMAKE_CXX_FLAGS:STRING="-O2 -fPIC" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_CXX_STANDARD=17 \
-DLIBSHM_INSTALL_LIB_SUBDIR="lib64" \
-DTORCH_INSTALL_LIB_DIR="lib64" \
-DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_TEST=OFF \
-DWITH_BLAS=open \
-DBUILD_PYTHON=ON \
-DBUILD_CUSTOM_PROTOBUF=OFF \
-DUSE_GOLD_LINKER=ON \
-DONNX_ML=OFF \
-DONNX_GEN_PB_TYPE_STUBS=OFF \
-DUSE_CUDA=OFF \
-DUSE_CUDNN=OFF \
-DUSE_FFMPEG=ON \
-DUSE_KINETO=OFF \
-DUSE_MAGMA=ON \
-DUSE_NNPACK=OFF \
-DUSE_OPENMP=OFF \
-DUSE_OPENCL=ON \
-DUSE_OPENCV=ON \
-DUSE_NUMA=ON \
-DUSE_NUMPY=OFF \
-DUSE_ROCM=ON \
-DUSE_ROCM_KERNEL_ASSERT=ON \
-Wno-dev \
-GNinja \
-DCMAKE_BUILD_TYPE=Release ..

And receive 4 error for now.

CMake Error: File /root/tour/pytorch/pytorch-v2.3.1/c10/hip/impl/hip_cmake_macros.h.in does not exist.
CMake Error at c10/hip/CMakeLists.txt:10 (configure_file):
  configure_file Problem configuring file


CMake Error at c10/hip/CMakeLists.txt:55 (add_subdirectory):
  add_subdirectory given source "test" which is not an existing directory.

...
HIP is using new type enums
CMake Error at aten/CMakeLists.txt:79 (add_subdirectory):
  add_subdirectory given source "src/THH" which is not an existing directory.


ROCm is enabled.
CMake Error: File /root/tour/pytorch/pytorch-v2.3.1/aten/src/ATen/hip/HIPConfig.h.in does not exist.
CMake Error at aten/src/ATen/CMakeLists.txt:45 (configure_file):
  configure_file Problem configuring file

-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.3.1")

Any one could help ?

Thanks