8000 GitHub - mingfeima/pytorch-rnn-test: unit test for mkldnn RNN APIs on PyTorch
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mingfeima/pytorch-rnn-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

pytorch-rnn-test

unit test for mkldnn RNN APIs on PyTorch.

usage

# Add runtime switch for MKLDNN
# modify aten/src/ATen/native/TensorProperties.cpp
 bool mkldnn_is_acceptable(const Tensor& self) {
+  //user defined flag
+  int mkldnn_enabled = 1;
+  if (const char *env_p = std::getenv("MKLDNN_ENABLED")) {
+    mkldnn_enabled = std::stoi(env_p);
+  }
+  if (!mkldnn_enabled) return false;
+

# build from source
cd pytorch/src/dir
python setup.py install

# run test
python test_rnn.py

About

unit test for mkldnn RNN APIs on PyTorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0