Closed jxu-ca closed 1 year ago
Hello, could we try adding a shebang to top line of this Python file (i.e. #!/usr/bin/python3
). Then re-run via
$ omniperf profile -n optimizer -- simple_NN.py
Thanks for the quick response! Now, it is giving an error on the second line. import torch ModuleNotFoundError: No module named 'torch'
I am running the workload in pytorch docker, so i am not sure why it is still complaining torch not found. Also, just give a quick background, I was able to run the same code using MLPerf_CLI(link below) without any issue. https://confluence.amd.com/display/MLSE/Omniperf%28MIPerf%29+CLI+analysis But I was told MIPerf_CLI is deprecated and the omniperf is more up-to-date with bug fixes, so i am planning to use this instead. Thanks!
Try using #!/usr/bin/env python3
instead. If your pytorch install is not using /usr/bin/python3
(very likely, it is probably in a conda env or Python virtual env), that recommendation is picking up the wrong Python installation
Thanks! This is working! :-)
This is the command i use to profile my small python workload. omniperf profile -n optimizer -- python simple_NN.py
But i am getting following error message. usage: omniperf [mode] [options] tool: error: Your command "python" doesn't point to a file. Try again.
Can you please help? why profiler doesn't work on python code?