This is more of a FYI, but I’ve recently started working on the JavaCPP Presets for PyTorch and that takes care of all those linking issues with MKL and what not by bundling everything in JAR files (actually Maven artifacts):
  
      
      github.com
  
  
    

bytedeco/javacpp-presets 13

master/pytorch

  The missing Java distribution of native C++ libraries