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

Assert profile pytorch inferrence #184

Closed vatai closed 2 years ago

vatai commented 2 years ago

Triggering the assertion (otherwise it works)...

vatai@silencio ~/code/benchmarker (git)-[assert-profile_pytorch-inferrence] % python3 -m benchmarker \
    --mode=training \ 
    --framework=pytorch \
    --problem=resnet50 \
    --problem_size=32 \
    --batch_size=4 \
    --nb_epoch=1 \
    --gpus=0 \
    --profile_pytorch
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/vatai/code/benchmarker/benchmarker/__main__.py", line 95, in <module>
    main()
  File "/home/vatai/code/benchmarker/benchmarker/__main__.py", line 53, in main
    result = benchmarker.benchmarker.run(unknown_args)
  File "/home/vatai/code/benchmarker/benchmarker/benchmarker.py", line 120, in run
    benchmark = framework_mod.Benchmark(params, unknown_args)
  File "/home/vatai/code/benchmarker/benchmarker/frameworks/do_pytorch.py", line 58, in __init__
    assert (
AssertionError: --profile_pytorch works only with --mode=inference