LibTorch (nightly) build error with a file from the submodule iDeep


I’m not 100% certain that this is the best place to ask, but I’ve seen a coupe of other similar questions, so I thought why not.

Recently, when attempting to build the C++ libraries on Linux using CMake, I receive the following error:

/home/user/Build/pytorch-nightly/third_party/ideep/include/ideep/attributes.hpp:23:10: error: unknown type name 'dnnl_fpmath_mode_t'
  attr_t(dnnl_fpmath_mode_t fpmath_mode,
/home/user/Build/pytorch-nightly/third_party/ideep/include/ideep/attributes.hpp:29:27: error: unknown type name 'dnnl_fpmath_mode_t'
  attr_t& set_fpmath_mode(dnnl_fpmath_mode_t mode) {

The strange thing is, that the above mentioned type is in fact declared in another file that’s part of another submodule, more precisely in third_party/ideep/mkl-dnn/third_party/oneDNN/include/oneapi/dnnl/dnnl_types.h.

The reason I’d like to build it myself from source is, because CUDA 12 support as per this issue on GitHub [CUDA][CUDA 12] CUDA 12 Support Tracking Issue has been somewhat finalized already, and I would like to experiment with that.

If anyone else came across this or happens to know of a solution, please do share.