Did you actually build pytorch from source? or just used the prebuilt libtorch? It should be as simple as having that amd-blas library within your main directory for libs, and running the build process. Pytorch will find the BLAS package as long as it is there in the main usr libs.
Follow the build process here to build from source
Thanks for your answer.
I was able to make the build system detect BLIS (AMD-BLAS) installation based on the following message that it prints while building from source:
-- Checking for [blis]
-- Library blis: /usr/local/lib/libblis.so
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Performing Test BLAS_F2C_DOUBLE_WORKS
-- Performing Test BLAS_F2C_DOUBLE_WORKS - Failed
-- Performing Test BLAS_F2C_FLOAT_WORKS
-- Performing Test BLAS_F2C_FLOAT_WORKS - Success
-- Performing Test BLAS_USE_CBLAS_DOT
-- Performing Test BLAS_USE_CBLAS_DOT - Failed
-- Found a library with BLAS API (FLAME).