unitrace -q does not produce hardware metrics report for a simple PyTorch XPU workload unless the result is printed.
Environment
- OS: Ubuntu 24.04
- Driver:
64290D8E349F41730D761F4
- Level Zero: 1.28.6
- Device: Intel(R) Arc(TM) Pro B70 Graphics
- PyTorch:
2.13.0+xpu
- pti-gpu commit:
c71e8316e19bb5316157b9046d877b5eff0e262c
- unitrace version:
2.4.0 (c71e8316e19bb5316157b9046d877b5eff0e262c)
intel-metrics-discovery: 1.14.188
intel-metrics-library: 1.0.231
Reproducer
import torch
x = torch.rand(1024, 1024, device="xpu")
z = x @ x
# Uncommenting this line makes unitrace produce metrics:
# print(z)
Run:
. /opt/intel/oneapi/setvars.sh
unitrace -q python mm.py
Actual behavior
Without the print statement, the command exits successfully but print only Device Timing Summary section. It does not print Device #x Metrics, e.g.
=== Device Timing Summary ===
Total Execution Time (ns): 1153914201
After uncommenting print(z) the same command produces populated device timing and hardware metrics.
unitrace -qdoes not produce hardware metrics report for a simple PyTorch XPU workload unless the result is printed.Environment
64290D8E349F41730D761F42.13.0+xpuc71e8316e19bb5316157b9046d877b5eff0e262c2.4.0 (c71e8316e19bb5316157b9046d877b5eff0e262c)intel-metrics-discovery:1.14.188intel-metrics-library:1.0.231Reproducer
Run:
. /opt/intel/oneapi/setvars.sh unitrace -q python mm.pyActual behavior
Without the
printstatement, the command exits successfully but print onlyDevice Timing Summarysection. It does not printDevice #x Metrics, e.g.After uncommenting
print(z)the same command produces populated device timing and hardware metrics.