Repository navigation
[ROCm][Inductor] New Inductor benchmarker based on Torch Profiler - #175097
naromero77amd wants to merge 2 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/175097
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 3 New Failures, 3 Unrelated Failures, 4 Unclassified FailuresAs of commit e2b4a92 with merge base c1d7692 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Warning: Unknown label
Please add the new label to .github/pytorch-probot.yml |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
Merge startedYour 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 |
Merge failedReason: 3 jobs have failed, first few of them are: Limited CI on H100 / linux-jammy-cuda13.0-py3.10-gcc11-sm90 / test (smoke, 1, 1, linux.aws.h100), Limited CI on H100 / linux-jammy-cuda13_0-py3_10-gcc11-sm90-FA3-ABI-stable-test / test, B200 Smoke Tests / linux-jammy-cuda13.0-py3.10-gcc11-sm100 / test (smoke_b200, 1, 1, linux.dgx.b200) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Use torch.profiler as an optional Inductor benchmarking backend so short ROCm kernels can be timed from profiler GPU events instead of HIP event elapsed time.
Cover the profiler benchmarker helper behavior and max-autotune path so the optional backend remains wired into Inductor benchmarking.
|
Successfully rebased |
42da0d0 to
e2b4a92
Compare
|
@claude explain those CI failures, are they related? |
|
Claude finished @jansel's task in 3m 35s —— View job CI Failures Analysis
None of these CI failures are related to this PR. They fall into two categories: GPU infrastructure issues and pre-existing flaky tests. 1. Inductor benchmark tests (huggingface, timm, torchbench) - GPU Infrastructure IssueJobs:
Root cause: All three failures share the exact same error: Evidence: The logs show 21+ models in huggingface, 6+ in timm, and multiple in torchbench all failing with the identical error - if the PR code had caused this, it would fail consistently on a specific model, not suddenly on all models after a point. Why unrelated: This PR modifies 2. ROCm MI300 - Known Flaky TestJob: Failed test: Root cause: This is a known flaky test. DrCI already identified it as FLAKY and linked to a similar failure on trunk. The test is about the origami module gating mechanism, completely unrelated to benchmarking code. 3. Limited CI on H100 - Unclassified (pre-existing)Job: Failed test: Why unrelated: FP8 TMA template tests are exercising CUDA sm90-specific codepaths that have zero overlap with the profiler benchmarker added in this PR. DrCI notes this didn't run on the merge base so can't determine if it's pre-existing. 4. B200 Smoke Tests - Unclassified (pre-existing)Job: Failed test: Why unrelated: This is a conv2d backward pass test on B200 hardware (sm100). Completely unrelated to the benchmarking infrastructure. 5. Trunk aarch64 - Known Flaky TestJob: Failed test: Root cause: DrCI identifies this as FLAKY with a similar failure on trunk. An attention pattern rewriter test on CPU/aarch64 - unrelated to GPU benchmarking. Summary: All failures are unrelated to this PR. The three "new failures" (inductor huggingface/timm/torchbench) are caused by a single GPU infrastructure issue where the CUDA device became unavailable on the g5 runner. The remaining failures are either known flaky tests or pre-existing issues on new hardware (B200/H100). |
|
@pytorchbot merge -f "claude says the failing tests are not related" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…84567) # Motivate fix pytorch#184470, which introduce by pytorch#175097 fix pytorch#184491 fix pytorch#185616 Pull Request resolved: pytorch#184567 Approved by: https://github.com/jansel ghstack dependencies: pytorch#184499
…84567) # Motivate fix pytorch#184470, which introduce by pytorch#175097 fix pytorch#184491 fix pytorch#185616 Pull Request resolved: pytorch#184567 Approved by: https://github.com/jansel ghstack dependencies: pytorch#184499
…torch#175097) A new benchmarker method for timing Inductor kernels during autotuning. We use Torch Profiler to collect the kernel execution times. This is particularly important for short-duration kernels that are not accurate timed with hipEvents. Based on the Inductor benchmarker class, but using Torch profiler to obtain timings instead of hipEvents. We still use hipEvents to cap the total warmup sampling time, but the final time for the kernel is collected from the Torch Profiler. The buffer size used for flushing the data cache is different between ROCm and NVIDIA. See comments in code. Will also work on NVIDIA platform. Ran the `inductor-perf-test-nightly-rocm-mi300` several times. There was more overhead with this Torch Profile benchmarker, but it was not significantly more. No test suite regressions. Note that this feature is turned *off *by default, it must be activated using `TORCHINDUCTOR_USE_TORCH_PROFILER_BENCHMARKER=1` Cursor was used to improve this PR. Pull Request resolved: pytorch#175097 Approved by: https://github.com/jeffdaily, https://github.com/jansel, https://github.com/eellison, https://github.com/nmacchioni
…84567) # Motivate fix pytorch#184470, which introduce by pytorch#175097 fix pytorch#184491 fix pytorch#185616 Pull Request resolved: pytorch#184567 Approved by: https://github.com/jansel ghstack dependencies: pytorch#184499
…torch#175097) A new benchmarker method for timing Inductor kernels during autotuning. We use Torch Profiler to collect the kernel execution times. This is particularly important for short-duration kernels that are not accurate timed with hipEvents. Based on the Inductor benchmarker class, but using Torch profiler to obtain timings instead of hipEvents. We still use hipEvents to cap the total warmup sampling time, but the final time for the kernel is collected from the Torch Profiler. The buffer size used for flushing the data cache is different between ROCm and NVIDIA. See comments in code. Will also work on NVIDIA platform. Ran the `inductor-perf-test-nightly-rocm-mi300` several times. There was more overhead with this Torch Profile benchmarker, but it was not significantly more. No test suite regressions. Note that this feature is turned *off *by default, it must be activated using `TORCHINDUCTOR_USE_TORCH_PROFILER_BENCHMARKER=1` Cursor was used to improve this PR. Pull Request resolved: pytorch#175097 Approved by: https://github.com/jeffdaily, https://github.com/jansel, https://github.com/eellison, https://github.com/nmacchioni
…84567) # Motivate fix pytorch#184470, which introduce by pytorch#175097 fix pytorch#184491 fix pytorch#185616 Pull Request resolved: pytorch#184567 Approved by: https://github.com/jansel ghstack dependencies: pytorch#184499
…torch#175097) A new benchmarker method for timing Inductor kernels during autotuning. We use Torch Profiler to collect the kernel execution times. This is particularly important for short-duration kernels that are not accurate timed with hipEvents. Based on the Inductor benchmarker class, but using Torch profiler to obtain timings instead of hipEvents. We still use hipEvents to cap the total warmup sampling time, but the final time for the kernel is collected from the Torch Profiler. The buffer size used for flushing the data cache is different between ROCm and NVIDIA. See comments in code. Will also work on NVIDIA platform. Ran the `inductor-perf-test-nightly-rocm-mi300` several times. There was more overhead with this Torch Profile benchmarker, but it was not significantly more. No test suite regressions. Note that this feature is turned *off *by default, it must be activated using `TORCHINDUCTOR_USE_TORCH_PROFILER_BENCHMARKER=1` Cursor was used to improve this PR. Pull Request resolved: pytorch#175097 Approved by: https://github.com/jeffdaily, https://github.com/jansel, https://github.com/eellison, https://github.com/nmacchioni
A new benchmarker method for timing Inductor kernels during autotuning. We use Torch Profiler to collect the kernel execution times. This is particularly important for short-duration kernels that are not accurate timed with hipEvents.
Based on the Inductor benchmarker class, but using Torch profiler to obtain timings instead of hipEvents. We still use hipEvents to cap the total warmup sampling time, but the final time for the kernel is collected from the Torch Profiler.
The buffer size used for flushing the data cache is different between ROCm and NVIDIA. See comments in code.
Will also work on NVIDIA platform.
Ran the
inductor-perf-test-nightly-rocm-mi300several times. There was more overhead with this Torch Profile benchmarker, but it was not significantly more. No test suite regressions.Note that this feature is turned *off *by default, it must be activated using
TORCHINDUCTOR_USE_TORCH_PROFILER_BENCHMARKER=1Cursor was used to improve this PR.
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @pragupta @jerrymannil @xinyazhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @mlazos