I know that we can use mkl-dnn in pytorch and get speed up when setting the multi-thread in the inference code. But when I trace a model into ScriptModule and use it in c++. How can I get the same speed up like pytorch do?
What version of pytorch are you using? It should just work on 1.0.1 or the nightlies
Actually, I want to get speed up on libtorch with c++ codes. Is this related to pytorch version? Are the ScriptModules that different versions of pytorch produce matter? The ScriptModule I used in c++ is produced with pytorch1.1.0a0+bd19dd4.
If you set the environment variables following https://github.com/mingfeima/convnet-benchmarks/blob/master/pytorch/run.sh#L16-L25, it should have similar speedup as PyTorch.