[ExecuTorch][WebGPU] Convert remaining native tests to GTest#20706
[ExecuTorch][WebGPU] Convert remaining native tests to GTest#20706JulianCloudNTH wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20706
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 102e7c6 with merge base 73c259e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@claude Review thoroughly. Check for stale code / bugs. |
|
Claude finished @JulianCloudNTH's task in 8m 7s —— View job Review: WebGPU native tests → GTestReviewed all 7 files against 🔴 Sibling build script will break:
|
Stack from ghstack (oldest at bottom):
Convert the remaining hand-rolled
int main()+ printf/bool oknative tests to GTest so the wholebackends/webgpu/test/suite is uniform, filterable via--gtest_filter, and self-reporting (extends the GTest conversion already applied totest_dynamic_shape). Harness-only change: every test case, tensor shape, tolerance, artifact filename, and skip condition is preserved 1:1 — only the pass/fail reporting mechanism changes.Key changes:
test/test_webgpu_native.cpp,test/native/test_dispatch_order.cpp,test/native/test_index.cpp,test/native/test_scratch_buffer.cpp,test/native/test_update_cache.cpp—main+printf/bool okaccumulator →TEST()cases usingEXPECT_*/ASSERT_*; each keeps a custommain()that brings up the WebGPU device once thenRUN_ALL_TESTS()(device-absent still SKIPs by returning 0).CMakeLists.txt— move every native-test target into theif(TARGET GTest::gtest)block, linkingGTest::gtest.scripts/test_webgpu_native_ci.sh— add-DEXECUTORCH_BUILD_TESTS=ONto the native-test configure so the now-gtest-gated targets are defined; the existing probe/build/run logic is unchanged.Differential Revision: D110536636