a real pain!
the signature for MXOptimizeForBackend in c_api.h differs wildly from the parameters passed in mxnet_wrap.cxx
I have solved that by updating the signature in mxnet.i to what c_api.h has. But I still don't know until the other dependency AI::NNVMCAPI compiles. If that hack does not solve it then we can try wrap the new signature with the old one.
Right now, AI::NNVMCAPI requires tvm, as you mentioned. My last attempt is getting tvm from the git repository (https://github.com/apache/tvm), install Intel mkl, dnnl etc. and see. There are problems right now with tvm compilation as I have encountered this: https://github.com/apache/tvm/issues/16556 because I have set DNNL ON.
All in all, it seems Apache have created millions of lines of code which are so smelly with bitrot is unbearable. Is the attic the right place or the cold ground instead?