Viewing program traces with Perfetto: `ValueError: Invalid trace folder`
See original GitHub issueDescription
Following https://jax.readthedocs.io/en/latest/profiling.html:
import jax
with jax.profiler.trace("/tmp/jax-trace", create_perfetto_link=True):
# Run the operations to be profiled
key = jax.random.PRNGKey(0)
x = jax.random.normal(key, (5000, 5000))
y = x @ x
y.block_until_ready()
Output:
2022-10-27 23:56:51.130358: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.192326: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.762358: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.762440: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.762446: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
2022-10-27 23:56:51.839141: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.839247: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory
2022-10-27 23:56:51.839264: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/nfs_share/bart-base-jax/2.py", line 3, in <module>
with jax.profiler.trace("/tmp/jax-trace", create_perfetto_link=True):
File "/usr/lib/python3.10/contextlib.py", line 142, in __exit__
next(self.gen)
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 236, in trace
stop_trace()
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 197, in stop_trace
abs_filename = _write_perfetto_trace_file(_profile_state.log_dir)
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 134, in _write_perfetto_trace_file
raise ValueError(f"Invalid trace folder: {latest_folder}")
ValueError: Invalid trace folder: /tmp/jax-trace/plugins/profile/2022_10_27_23_56_58
Traceback (most recent call last):
File "/nfs_share/bart-base-jax/2.py", line 3, in <module>
with jax.profiler.trace("/tmp/jax-trace", create_perfetto_link=True):
File "/usr/lib/python3.10/contextlib.py", line 142, in __exit__
next(self.gen)
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 236, in trace
stop_trace()
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 197, in stop_trace
abs_filename = _write_perfetto_trace_file(_profile_state.log_dir)
File "/home/ayaka/.venv310/lib/python3.10/site-packages/jax/_src/profiler.py", line 134, in _write_perfetto_trace_file
raise ValueError(f"Invalid trace folder: {latest_folder}")
ValueError: Invalid trace folder: /tmp/jax-trace/plugins/profile/2022_10_27_23_57_00
What jax/jaxlib version are you using?
jax v0.3.23, jaxlib v0.3.22, tensorflow v2.11.0rc1 (compatible with jaxlib)
Which accelerator(s) are you using?
TPU v4-16
Additional system info
Python 3.10.8, Linux 5.8.0-1035-gcp
NVIDIA GPU info
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Quickstart: Record traces on Android - Perfetto Tracing Docs
Recording a trace through the Perfetto UI From this page, select and turn on the data sources you want to include in the...
Read more >jax._src.profiler - JAX documentation - Read the Docs
The program will block until the link is opened and Perfetto loads the trace. ... 1: raise ValueError(f"Invalid trace folder: {latest_folder}") trace_json, ...
Read more >Diff - platform/external/chromium-trace - Google Git
2f6aedbe4 adb_profile_chrome_startup: Enable Perfetto tracing back-end 514fe3e70 95% ... destination: Name of the folder to download the reference build to.
Read more >systrace: Invalid trace result format for HTML output
I was able to log systrace only from Android Device Monitor. Console didn't work out for me. enter image description here.
Read more >Android Performance — Capture a system trace — Perfetto
View your reports on Perfetto UI from trace files. Overview of system tracing. Recording device activity over a short period of time is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m hitting this problem as well. I’m not sure if this is helpful, but when I look in the “invalid trace folder” I see only a single
.pb
file (and notrace.json
)We are currently working on automatically parsing the xplane.pb file and uploading it to Perfetto. Will update this thread when it’s done! We have a Thanksgiving holiday next week so hopefully we’ll have something to show the week after (cc: @pschuh)