undertherain / benchmarker

modular framework for [not only] deep learning performance benchmarking
http://blackbird.pw/performance
Mozilla Public License 2.0
9 stars 5 forks source link

torch does not do DNNL #154

Open undertherain opened 3 years ago

undertherain commented 3 years ago

unite do_torch and do_pytorch or make do_torch support DNNL backend

undertherain commented 3 years ago

For time being is seems I've hardcoded DNNL support by some redunant code but it fails with the following error

[0]blackbird@sugi:~/Projects_heavy/performance/benchmarker$  [master|✚ 2…13]$ python3 -m benchmarker.benchmarker --framework=torch --problem=batchmatmul --problem_size=256,64,256 --batch_size=384  --backend=DNNL --nb_epoch=100
WARNING:root:imports error 
 You need to install pymongo>=3.9.0 in order to use MongoOutput 
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/blackbird/Projects_heavy/performance/benchmarker/benchmarker/benchmarker.py", line 91, in <module>
    run(sys.argv[1:])
  File "/home/blackbird/Projects_heavy/performance/benchmarker/benchmarker/benchmarker.py", line 85, in run
    benchmark.measure_power_and_run()
  File "/home/blackbird/Projects_heavy/performance/benchmarker/benchmarker/modules/i_benchmark.py", line 16, in measure_power_and_run
    results = self.run()
  File "/home/blackbird/Projects_heavy/performance/benchmarker/benchmarker/modules/do_torch.py", line 51, in run
    self.net(self.data)
  File "/home/blackbird/Projects_heavy/performance/benchmarker/benchmarker/modules/problems/batchmatmul/torch.py", line 8, in __call__
    result = torch.matmul(x, y)
RuntimeError: opaque tensors do not have strides
vatai commented 3 years ago

Need to look at do_torch.py and do_pytorch.py and find the redundant DNNL code and make it nice OOPish-thingy!