I am trying to build pytorch from source 7. I keep getting the following error:
-- Found a library with BLAS API (mkl).
CMake Error at CMakeLists.txt:446 (MESSAGE):
  MKL is used, but MKL header files are not found.  You can get them by
  `conda install mkl-include` if using conda (if it is missing, run `conda
  upgrade -n root conda` first), and `pip install mkl-devel` if using pip.
  If build fails with header files available in the system, please make sure
  that CMake will search the directory containing them, e.g., by setting
  CMAKE_INCLUDE_PATH.

I tried exporting NO_MKLDNN=0, and I still get the above error.
Then I tried installing intel mkl from arch AUR. Exported MKLDNN_LIB_DIR, MKLDNN_LIBRARY, MKLDNN_INCLUDE_DIR, added the library path to PATH and still get the error.
How do I build without MKL?
How do I build with MKL?