You can use my Docker image to build libtorch C++ only files with MKL support.

  
      
      GitHub
  
  
    

freemanix/torchbuilder 31

Docker to build libtorch C++ libraries with modern ABI - freemanix/torchbuilder


  
  
    
    
  
  


Build the image and then use package.sh to create libtorch binary redistributable with similar structure as official nightly Torch builds.