Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/182433
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 5c07583 with merge base 019cea9 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Move 9 tests that use CUDA-only APIs (CUDA graphs, multi-GPU, OOM, FLOPS, cuda_sync, external_correlation, activity_filter dict/mixed/ nonmember/empty) from TestProfiler to TestProfilerCUDA where they belong under the existing CUDA skip guard. Add payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them. No logic changes -- pure code relocation. [ghstack-poisoned]
…rofilerCUDA in test_profiler" ## Summary Move 9 CUDA-only tests from `TestProfiler` to `TestProfilerCUDA` where they belong under the existing class-level CUDA skip guard. **Moved tests:** - test_kineto_multigpu - test_oom_tracing - test_flops - test_profiler_cuda_sync_events - test_disable_external_correlation - test_activity_filter_dict_syntax - test_activity_filter_mixed_syntax - test_activity_filter_nonmember_type_name - test_activity_filter_empty_list Also copies `payload()` and `_check_stats()` helper methods to `TestProfilerCUDA` since the moved tests depend on them. No logic changes — pure code relocation. ## Test plan - [x] Verified on CUDA : 110 passed, 2 skipped, 0 failures CC: albanD fffrog mansiag05 [ghstack-poisoned]
| check_trace(fname) | ||
|
|
||
| @unittest.skipIf(not kineto_available(), "Kineto is required") | ||
| @unittest.skipIf(not torch.cuda.is_available(), "CUDA is required") |
There was a problem hiding this comment.
duplicated check, we can safely remote this one.
There was a problem hiding this comment.
will remove these, thanks!
There was a problem hiding this comment.
removed in latest push. Thanks!!
…rofilerCUDA in test_profiler" ## Summary Move 5 tests that use CUDA-only APIs from `TestProfiler` to `TestProfilerCUDA` where they belong under the existing class-level CUDA skip guard. **Moved tests:** - `test_kineto_multigpu` - `test_oom_tracing` - `test_profiler_cuda_sync_events` - `test_disable_external_correlation` - `test_activity_filter_mixed_syntax` Also copies `payload()` and `_check_stats()` helper methods to `TestProfilerCUDA` since the moved tests depend on them. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: albanD fffrog mansiag05 [ghstack-poisoned]
I have updated all suggested changes. Thanks for re-reviewing! |
…rofilerCUDA in test_profiler" ## Summary Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard. **Moved tests:** test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax. Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: albanD fffrog mansiag05 [ghstack-poisoned]
|
@claude review this PR and verify that it only moves tests to a CUDA-specific test class; call out any extra changes done beyond simple code movement |
|
Claude finished @jbschlosser's task in 2m 8s —— View job Review: Pure code movement verification
Verdict: This PR is a clean code relocation with no logic changes. Only one file is modified ( What was done
Minor observation (non-blocking)
SummaryNo logic changes, no extra modifications. The net +13 lines are entirely from duplicating the two helper methods into the CUDA class. The PR does exactly what it claims. |
|
tiny nit: remove dead |
…rofilerCUDA in test_profiler" ## Summary Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard. **Moved tests:** test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax. Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: albanD fffrog mansiag05 [ghstack-poisoned]
…rofilerCUDA in test_profiler" ## Summary Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard. **Moved tests:** test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax. Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: albanD fffrog mansiag05 [ghstack-poisoned]
|
Starting merge as part of PR stack under #182434 |
…est_profiler (#182434) **Summary** Create TestProfilerDevice class with 20 tests moved from TestProfiler, refactored to be device-agnostic using instantiate_device_type_tests. **Infrastructure added:** - get_profiler_activities(device_type) helper that dynamically builds the ProfilerActivity list - @onlyAccelerator decorator for GPU-required tests - @OnlyOn(["cpu", "cuda"]) for tests with CUDA-specific assertions - instantiate_device_type_tests(TestProfilerDevice, globals()) **Moved and refactored tests:** - test_kineto — @OnlyOn(["cpu", "cuda"]), device-agnostic profiling with CUDA/ROCm kernel checks guarded - test_memory_profiler — conditional device memory checks - test_flops — device-agnostic activity list - test_kineto_profiler_api — multi-backend profiler API - test_kineto_profiler_multiple_steppers — step tracking across backends - test_tensorboard_trace_handler — device-agnostic trace export - test_kineto_profiler_with_environment_variable — @OnlyOn(["cpu", "cuda"]), subprocess self-detects device - test_event_list — @onlyAccelerator - test_basic_chrome_trace — device-aware Chrome trace validation - test_cpu_annotation_overlap — device-agnostic activity list - test_user_annotation — simple device param - test_basic_profile — @onlyAccelerator - test_dynamic_toggle — @onlyAccelerator - test_forked_process — skips on CUDA/XPU due to fork-after-init - test_profile_all_threads — @onlyAccelerator - test_profiler — device-agnostic with PrivateUse1 fallback - test_activity_filter_dict_syntax — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator - test_activity_filter_nonmember_type_name — @onlyAccelerator - test_activity_filter_empty_list — @onlyAccelerator - test_kineto_kernel_metadata_in_trace — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator **Note:** test_kineto_profiler_with_environment_variable self-detects the available device in its subprocess script. test_forked_process skips on CUDA/XPU due to fork-after-init restrictions. **Test plan** Verified on CUDA: 111 passed, 11 skipped, 0 failures Pull Request resolved: #182434 Approved by: https://github.com/fffrog, https://github.com/jansel, https://github.com/jbschlosser ghstack dependencies: #182432, #182433
… in test_profiler (pytorch#182433) ## Summary Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard. **Moved tests:** test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax. Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method @skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: @albanD @fffrog @mansiag05 Pull Request resolved: pytorch#182433 Approved by: https://github.com/fffrog, https://github.com/albanD, https://github.com/jbschlosser ghstack dependencies: pytorch#182432
…est_profiler (pytorch#182434) **Summary** Create TestProfilerDevice class with 20 tests moved from TestProfiler, refactored to be device-agnostic using instantiate_device_type_tests. **Infrastructure added:** - get_profiler_activities(device_type) helper that dynamically builds the ProfilerActivity list - @onlyAccelerator decorator for GPU-required tests - @OnlyOn(["cpu", "cuda"]) for tests with CUDA-specific assertions - instantiate_device_type_tests(TestProfilerDevice, globals()) **Moved and refactored tests:** - test_kineto — @OnlyOn(["cpu", "cuda"]), device-agnostic profiling with CUDA/ROCm kernel checks guarded - test_memory_profiler — conditional device memory checks - test_flops — device-agnostic activity list - test_kineto_profiler_api — multi-backend profiler API - test_kineto_profiler_multiple_steppers — step tracking across backends - test_tensorboard_trace_handler — device-agnostic trace export - test_kineto_profiler_with_environment_variable — @OnlyOn(["cpu", "cuda"]), subprocess self-detects device - test_event_list — @onlyAccelerator - test_basic_chrome_trace — device-aware Chrome trace validation - test_cpu_annotation_overlap — device-agnostic activity list - test_user_annotation — simple device param - test_basic_profile — @onlyAccelerator - test_dynamic_toggle — @onlyAccelerator - test_forked_process — skips on CUDA/XPU due to fork-after-init - test_profile_all_threads — @onlyAccelerator - test_profiler — device-agnostic with PrivateUse1 fallback - test_activity_filter_dict_syntax — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator - test_activity_filter_nonmember_type_name — @onlyAccelerator - test_activity_filter_empty_list — @onlyAccelerator - test_kineto_kernel_metadata_in_trace — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator **Note:** test_kineto_profiler_with_environment_variable self-detects the available device in its subprocess script. test_forked_process skips on CUDA/XPU due to fork-after-init restrictions. **Test plan** Verified on CUDA: 111 passed, 11 skipped, 0 failures Pull Request resolved: pytorch#182434 Approved by: https://github.com/fffrog, https://github.com/jansel, https://github.com/jbschlosser ghstack dependencies: pytorch#182432, pytorch#182433
… in test_profiler (pytorch#182433) ## Summary Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard. **Moved tests:** test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax. Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method @skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard. No logic changes - pure code relocation. ## Test plan - Verified on CUDA: 100 passed, 2 skipped, 0 failures CC: @albanD @fffrog @mansiag05 Pull Request resolved: pytorch#182433 Approved by: https://github.com/fffrog, https://github.com/albanD, https://github.com/jbschlosser ghstack dependencies: pytorch#182432
…est_profiler (pytorch#182434) **Summary** Create TestProfilerDevice class with 20 tests moved from TestProfiler, refactored to be device-agnostic using instantiate_device_type_tests. **Infrastructure added:** - get_profiler_activities(device_type) helper that dynamically builds the ProfilerActivity list - @onlyAccelerator decorator for GPU-required tests - @OnlyOn(["cpu", "cuda"]) for tests with CUDA-specific assertions - instantiate_device_type_tests(TestProfilerDevice, globals()) **Moved and refactored tests:** - test_kineto — @OnlyOn(["cpu", "cuda"]), device-agnostic profiling with CUDA/ROCm kernel checks guarded - test_memory_profiler — conditional device memory checks - test_flops — device-agnostic activity list - test_kineto_profiler_api — multi-backend profiler API - test_kineto_profiler_multiple_steppers — step tracking across backends - test_tensorboard_trace_handler — device-agnostic trace export - test_kineto_profiler_with_environment_variable — @OnlyOn(["cpu", "cuda"]), subprocess self-detects device - test_event_list — @onlyAccelerator - test_basic_chrome_trace — device-aware Chrome trace validation - test_cpu_annotation_overlap — device-agnostic activity list - test_user_annotation — simple device param - test_basic_profile — @onlyAccelerator - test_dynamic_toggle — @onlyAccelerator - test_forked_process — skips on CUDA/XPU due to fork-after-init - test_profile_all_threads — @onlyAccelerator - test_profiler — device-agnostic with PrivateUse1 fallback - test_activity_filter_dict_syntax — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator - test_activity_filter_nonmember_type_name — @onlyAccelerator - test_activity_filter_empty_list — @onlyAccelerator - test_kineto_kernel_metadata_in_trace — @OnlyOn(["cpu", "cuda"]), @onlyAccelerator **Note:** test_kineto_profiler_with_environment_variable self-detects the available device in its subprocess script. test_forked_process skips on CUDA/XPU due to fork-after-init restrictions. **Test plan** Verified on CUDA: 111 passed, 11 skipped, 0 failures Pull Request resolved: pytorch#182434 Approved by: https://github.com/fffrog, https://github.com/jansel, https://github.com/jbschlosser ghstack dependencies: pytorch#182432, pytorch#182433
Stack from ghstack (oldest at bottom):
Summary
Move 5 tests that use CUDA-only APIs from TestProfiler to TestProfilerCUDA where they belong under the existing class-level CUDA skip guard.
Moved tests: test_kineto_multigpu, test_oom_tracing, test_profiler_cuda_sync_events, test_disable_external_correlation, test_activity_filter_mixed_syntax.
Also copies payload() and _check_stats() helper methods to TestProfilerCUDA since the moved tests depend on them, and removes redundant per-method @skipIf(not torch.cuda.is_available()) decorators that duplicate the class-level guard.
No logic changes - pure code relocation.
Test plan
CC: @albanD @fffrog @mansiag05