Move CUDAGuard/CUDAStreamGuard static_assert tests out of CUDA fixtures#19314
Move CUDAGuard/CUDAStreamGuard static_assert tests out of CUDA fixtures#19314psiddh merged 1 commit intopytorch:mainfrom
Conversation
Summary: The 6 type-trait checks below were defined as TEST_F(CUDAGuardTest, ...) and TEST_F(CUDAStreamGuardTest, ...). Both fixtures' SetUp() calls GTEST_SKIP() when no CUDA device is available, so on every test host without an attached GPU these tests skip instead of running: CUDAGuardTest.CopyConstructorDeleted CUDAGuardTest.CopyAssignmentDeleted CUDAGuardTest.MoveAssignmentDeleted CUDAStreamGuardTest.CopyConstructorDeleted CUDAStreamGuardTest.CopyAssignmentDeleted CUDAStreamGuardTest.MoveAssignmentDeleted Because they never produced a successful run (Passes: 0 across 173 / 23 runs, all skips), TestX auto-disabled them and they show up as DISABLED on the executorch dashboard. These are pure compile-time static_assert checks. They do not need a CUDA device or any runtime state — if the file compiles, they pass. Move them into a separate non-fixture test suite (CUDAGuardCompileTimeTest / CUDAStreamGuardCompileTimeTest) so they run unconditionally. The remaining 15 fixture-based tests still need a real CUDA device and will be addressed separately (fixing the gpu-remote-execution platform deps so cudaGetDeviceCount returns a non-zero value). Reviewed By: Gasoonjia Differential Revision: D103937761
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19314
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Cancelled Job, 31 Pending, 2 Unrelated FailuresAs of commit e3776aa with merge base 5d07ce0 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103937761. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR fixes CUDA unit-test reporting by moving pure compile-time trait checks out of GPU-dependent fixtures, so they run on hosts without an attached CUDA device. In the ExecuTorch AOTI slim CUDA tests, this prevents static-assert-only tests from being skipped and auto-disabled simply because fixture setup requires runtime CUDA availability.
Changes:
- Moved
CUDAGuardcopy/move-deletion trait checks fromTEST_Fto a standaloneTESTsuite. - Moved
CUDAStreamGuardcopy/move-deletion trait checks fromTEST_Fto a standaloneTESTsuite. - Added clarifying comments explaining why these tests must live outside the CUDA fixtures.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
backends/aoti/slim/cuda/test/test_cuda_guard.cpp |
Converts CUDAGuard static-assert trait checks into non-fixture tests so they run without GPU-dependent SetUp(). |
backends/aoti/slim/cuda/test/test_cuda_stream_guard.cpp |
Converts CUDAStreamGuard static-assert trait checks into non-fixture tests so they run without GPU-dependent SetUp(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary:
The 6 type-trait checks below were defined as TEST_F(CUDAGuardTest, ...)
and TEST_F(CUDAStreamGuardTest, ...). Both fixtures' SetUp() calls
GTEST_SKIP() when no CUDA device is available, so on every test host
without an attached GPU these tests skip instead of running:
CUDAGuardTest.CopyConstructorDeleted
CUDAGuardTest.CopyAssignmentDeleted
CUDAGuardTest.MoveAssignmentDeleted
CUDAStreamGuardTest.CopyConstructorDeleted
CUDAStreamGuardTest.CopyAssignmentDeleted
CUDAStreamGuardTest.MoveAssignmentDeleted
Because they never produced a successful run (Passes: 0 across 173 / 23
runs, all skips), TestX auto-disabled them and they show up as DISABLED
on the executorch dashboard.
These are pure compile-time static_assert checks. They do not need a
CUDA device or any runtime state — if the file compiles, they pass.
Move them into a separate non-fixture test suite (CUDAGuardCompileTimeTest /
CUDAStreamGuardCompileTimeTest) so they run unconditionally.
The remaining 15 fixture-based tests still need a real CUDA device and
will be addressed separately (fixing the gpu-remote-execution platform
deps so cudaGetDeviceCount returns a non-zero value).
Reviewed By: Gasoonjia
Differential Revision: D103937761