I want to build PyTorch from source with TBB and MKL support. For other projects of mine, I have very recent versions of Intel MKL/TBB/MPI and so on. They are located in /mnt/sdb/intel/oneapi/. In order for CMake to find MKL I had to slightly adjust pytorch/cmake/Modules/FindMKL.cmake, but in the end everything compiled. However, I unpleasently found that PyTorch ships its own version of TBB, but doesn’t ship MKL. I guess, I’m missing something here, but this doesn’t make a lot of sense to me. In my case, MKL needs libtbb.so.12 (as determined with readelf -d libmkl_tbb_thread.so.1), which is readily available in /mnt/sdb/intel/oneapi/. However, the TBB version shipped with PyTorch seems to be outdated and libtbb.so (shipped with PyTorch) and libtbb.so.12 do not provide the same symbols. I am wondering now, what version of MKL are you supposed to use when building from source? I should note at this point, that I’m using Ubuntu 18.04. Also, I fear there is no way, that I could use the most recent version of TBB for PyTorch, is that correct?