intel / ideep

Intel® Optimization for Chainer*, a Chainer module providing numpy like API and DNN acceleration using MKL-DNN.
MIT License
162 stars 86 forks source link

Move oneDNN Graph python bindings #314

Closed sanchitintel closed 3 months ago

sanchitintel commented 3 months ago

Move oneDNN Graph python bindings to avoid CMake changes. And pass PyObject module pointer to bindings instead of pybind11::module for fewer changes in stock PT

sanchitintel commented 3 months ago

Hi @jgong5, can you please help review this PR? Thanks!

sanchitintel commented 3 months ago

Thanks for reviewing this PR, @jgong5! :)

@chunyuan-w @Xia-Weiwen, can you please help land this PR? Thanks!

chunyuan-w commented 3 months ago

@sanchitintel is this API used in stock now? May I know if IDEEP_VERSION_REVISION needs to be updated similar to https://github.com/intel/ideep/pull/311?

sanchitintel commented 3 months ago

Hi @chunyuan-w, I plan to use it in https://github.com/pytorch/pytorch/pull/126740. I updated IDEEP_VERSION_REVISION. Thanks!

chunyuan-w commented 3 months ago

Another small tip to mention for the PyTorch PR: not sure if you're aware of the below practice: https://github.com/pytorch/pytorch/blob/a379ed6e98fe91b1b41ce4c7e0916f6ad1faea02/aten/src/ATen/native/quantized/cpu/qconv_prepack.cpp#L380-L386

You'll need ideep version check in PyTorch code if using new APIs.