@@ -338,12 +338,12 @@ TEST(GatherNDOpTest, GatherND_batch_dims_mismatch_error) {
338338 test.AddInput <float >(" data" , {3 , 3 }, {0 .f , 1 .f , 2 .f , 10 .f , 11 .f , 12 .f , 20 .f , 21 .f , 22 .f });
339339 test.AddInput <int64_t >(" indices" , {2 , 1 }, {1 , 2 });
340340 test.AddOutput <float >(" output" , {2 }, {0 .f , 0 .f }); // dummy output, won't be used
341- test.ConfigEp (DefaultCpuExecutionProvider ());
342- if (!DefaultCpuExecutionProvider ()) {
343- GTEST_SKIP () << " Test only valid for CPU EP" ;
344- }
341+ // Run only on CPU provider since validation logic is CPU-specific
345342 test.Run (OpTester::ExpectResult::kExpectFailure ,
346- " GatherND: indices batch size (2) is not divisible by input batch size (3)" );
343+ " GatherND: indices batch size (2) is not divisible by input batch size (3)" ,
344+ std::unordered_set<std::string>({kCudaExecutionProvider , kDnnlExecutionProvider ,
345+ kOpenVINOExecutionProvider , kTensorrtExecutionProvider ,
346+ kQnnExecutionProvider , kDmlExecutionProvider }));
347347}
348348
349349// Test for issue #23828: GatherND should return error when input batch dimension is zero
@@ -354,12 +354,12 @@ TEST(GatherNDOpTest, GatherND_zero_batch_dims_error) {
354354 test.AddInput <float >(" data" , {0 , 3 }, {});
355355 test.AddInput <int64_t >(" indices" , {2 , 1 }, {1 , 2 });
356356 test.AddOutput <float >(" output" , {2 }, {0 .f , 0 .f }); // dummy output, won't be used
357- test.ConfigEp (DefaultCpuExecutionProvider ());
358- if (!DefaultCpuExecutionProvider ()) {
359- GTEST_SKIP () << " Test only valid for CPU EP" ;
360- }
357+ // Run only on CPU provider since validation logic is CPU-specific
361358 test.Run (OpTester::ExpectResult::kExpectFailure ,
362- " GatherND: input tensor batch dimensions cannot be zero" );
359+ " GatherND: input tensor batch dimensions cannot be zero" ,
360+ std::unordered_set<std::string>({kCudaExecutionProvider , kDnnlExecutionProvider ,
361+ kOpenVINOExecutionProvider , kTensorrtExecutionProvider ,
362+ kQnnExecutionProvider , kDmlExecutionProvider }));
363363}
364364
365365} // namespace test
0 commit comments