Open harishanand95 opened 1 year ago
I suspect you are not capturing the right process - you see nothing (not just no GPU) and you shouldn't ^C your traced application. In the title of your tracy window you can see you were tracing some python process (maybe?) instead - it should show iree-benchmark-module
.
Thanks! I see what you mean. It works now, I used the iree-benchmark-module which had picked the python code first..
Before (did not work, had to ^C and I'm inside the python environment):
$ TRACY_NO_EXIT=1 iree-benchmark-module --device=vulkan --module=model.vmfb --function=forward --input=1x3x32x32xf32
2023-05-18T09:06:19-07:00
Running /home/user/delete/debug/.venv/lib/python3.11/site-packages/iree/runtime/scripts/iree_benchmark_module/../../iree-benchmark-module
Run on (16 X 4850.19 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x8)
L1 Instruction 32 KiB (x8)
L2 Unified 512 KiB (x8)
L3 Unified 32768 KiB (x1)
Load Average: 3.42, 1.62, 1.00
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
--------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
--------------------------------------------------------------------------------------------
BM_forward/process_time/real_time 0.120 ms 0.030 ms 5251 items_per_second=8.35573k/s
^C
$ which iree-benchmark-module
/home/user/delete/debug/.venv/bin/iree-benchmark-module
$ cat /home/user/delete/debug/.venv/bin/iree-benchmark-module
#!/home/user/delete/debug/.venv/bin/python3.11
# -*- coding: utf-8 -*-
import re
import sys
from iree.runtime.scripts.iree_benchmark_module.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
After (works, auto stops and tracy has the GPU profiles too):
$ TRACY_NO_EXIT=1 ~/delete/debug/.venv/lib/python3.11/site-packages/iree/runtime/iree-benchmark-module --device=vulkan --module=model.vmfb --function=forward --input=1x3x32x32xf32
2023-05-18T09:09:00-07:00
Running /home/user/delete/debug/.venv/lib/python3.11/site-packages/iree/runtime/iree-benchmark-module
Run on (16 X 4850.19 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x8)
L1 Instruction 32 KiB (x8)
L2 Unified 512 KiB (x8)
L3 Unified 32768 KiB (x1)
Load Average: 1.89, 1.46, 1.02
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
--------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
--------------------------------------------------------------------------------------------
BM_forward/process_time/real_time 0.120 ms 0.030 ms 5362 items_per_second=8.30396k/s
weird! I'm not familiar with that mechanism but maybe that's a known issue with the venv releases. /cc @stellaraccident / @ScottTodd (or some other python person) - if this is a known issue we'll probably want to document it but it'd be nice if it worked without it
@stellaraccident @ScottTodd Have either of you had a chance to review this? Is this a known issue?
Haven't had a chance to dig into this, but I'd believe that the Python wrapper script + subprocess.call()
are interfering with process selection: https://github.com/openxla/iree/blob/76e36ff694eeff16e1cf511979eae7646fc6c503/runtime/bindings/python/iree/runtime/scripts/iree_benchmark_module/__main__.py#L15-L17
We should figure out a workaround so the iree-runtime-instrumented
Python package is useful, though I'd somewhat prefer to steer people away from Python and to native binary releases or source builds for some of the more involved workflows.
Setting this as a P2 for now - please adjust if needed.
What happened?
I do not see GPU profile option with
./iree-tracy-profiler 1.tracy
.Steps to reproduce your issue
How I had setup the iree and environments Python environment:
IREE Setup
Configuration showed this warning message at the end
Run tracy-capture
iree-benchmark with TRACY_NO_EXIT, it waits at the end..
Here is the model.py
Commands
What component(s) does this issue relate to?
Tracy
Version information
Additional context
No response