Skip to content

[ROCm] Unskip Python chrome-trace export tests except the envelope check - #197136

Closed
pablo-garay wants to merge 1 commit into
pytorch:mainfrom
ROCm:jeffdaily/rocm-profiler-chrome-trace-export-unskip
Closed

pablo-garay wants to merge 1 commit into
pytorch:mainfrom
ROCm:jeffdaily/rocm-profiler-chrome-trace-export-unskip

Conversation

@pablo-garay

@pablo-garay pablo-garay commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

The class-level skipIf(TEST_WITH_ROCM) on TestPythonChromeTraceExport was added with the class in #194854 on the reasoning that the exporter's envelope is NVIDIA-shaped. Only one of the five tests checks the envelope. The other three compare the Python streaming exporter's event stream against kineto's C++ save() (plus the gzip and plain-JSON variants) and pass on ROCm: the exporter already degrades cleanly there (cuda-bindings is nulled on ROCm in torch/cuda/_utils.py, sharedMemPerBlockOptin is guarded). The fifth self-skips on ROCm because CUDA graph annotations are unavailable.

This moves the skip to test_python_export_envelope_matches_kineto and records the concrete disagreement: kineto's ROCm backend writes hip_driver_version/hip_runtime_version instead of the cuda_* keys, and its device-property set names two fields differently (maxSharedMemoryPerMultiProcessor, regsPerBlock) from the cudaDeviceProp shape the exporter reproduces. Defining ROCm equivalence for the envelope needs an exporter change and a kineto change and is out of scope here.

Test plan, on gfx950 (ROCm 10.0, HIP 7.15) with the class gate removed locally: 75/75 flake-finder passes and 25/25 per test in isolated processes for the three unskipped tests; full class 3 pass + 1 skip + the envelope test failing as expected without its skip; the rest of test_profiler.py unchanged.

python -m pytest test/profiler/test_profiler.py -k "TestPythonChromeTraceExport and (gzip or plain_json or export_matches_kineto)" --flake-finder --flake-runs=25
python test/profiler/test_profiler.py -k TestPythonChromeTraceExport
python test/profiler/test_profiler.py

gfx942/gfx90a validation via the ciflow labels below; test_profiler is not in the navi31 include list, so gfx1100 gets no CI either way (the three tests exercise only the Python exporter against kineto's own output, no arch-specific path).

This PR was authored with the assistance of an AI agent (Claude). The analysis and test results were verified by hand.

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

The class-level skipIf(TEST_WITH_ROCM) on TestPythonChromeTraceExport was added with the class in pytorch#194854 on the reasoning that the exporter's envelope is NVIDIA-shaped. Only one of the five tests checks the envelope. The other three compare the Python streaming exporter's event stream against kineto's C++ save() (plus the gzip and plain-JSON variants) and pass on ROCm: the exporter already degrades cleanly there (cuda-bindings is nulled on ROCm in torch/cuda/_utils.py, sharedMemPerBlockOptin is guarded). The fifth self-skips on ROCm because CUDA graph annotations are unavailable.

This moves the skip to test_python_export_envelope_matches_kineto and records the concrete disagreement: kineto's ROCm backend writes hip_driver_version/hip_runtime_version instead of the cuda_* keys, and its device-property set names two fields differently (maxSharedMemoryPerMultiProcessor, regsPerBlock) from the cudaDeviceProp shape the exporter reproduces. Defining ROCm equivalence for the envelope needs an exporter change and a kineto change and is out of scope here.

Test Plan:

On gfx950 (MI355X, ROCm 10.0), with the class gate removed:

```
python -m pytest test/profiler/test_profiler.py -k "TestPythonChromeTraceExport and (gzip or plain_json or export_matches_kineto)" --flake-finder --flake-runs=25
python test/profiler/test_profiler.py -k TestPythonChromeTraceExport
python test/profiler/test_profiler.py
```

75/75 flake-finder passes and 25/25 per test in isolated processes. Full class: 3 pass, 1 skip (annotations unavailable on ROCm), and the envelope test fails as expected without its skip. Full file otherwise unchanged (one pre-existing, unrelated TestMetadataJsonFormat error on the local build).

Authored with an AI assistant (Claude Code); the diff was reviewed by the human author.
@pytorch-bot

pytorch-bot Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/197136

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 1 Pending

As of commit 0c6dc86 with merge base c00221a (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added module: rocm AMD GPU support for Pytorch topic: not user facing topic category labels Sep 15, 2026
@jithunnair-amd jithunnair-amd added ciflow/trunk Trigger trunk jobs on your pull request ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 labels Sep 15, 2026
@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-noble-rocm-py3.11-mi350 / test (distributed, 1, 3, amd-dpx-linux.rocm.gpu.gfx950.2)

Details for Dev Infra team Raised by workflow job

@jeffdaily

Copy link
Copy Markdown
Collaborator

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: trunk / linux-noble-rocm-py3.11-mi350 / test (distributed, 2, 3, amd-dpx-linux.rocm.gpu.gfx950.2), trunk / linux-noble-rocm-py3.11-mi350 / test (distributed, 1, 3, amd-dpx-linux.rocm.gpu.gfx950.2)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rocm-mi200 Trigger "default" config CI on ROCm MI200 ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/trunk Trigger trunk jobs on your pull request Merged module: rocm AMD GPU support for Pytorch open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants