@@ -17,6 +17,14 @@ struct urEnqueueUSMMemcpy2DTestWithParam
1717 GTEST_SKIP () << " Device USM is not supported" ;
1818 }
1919
20+ bool memcpy2d_support = false ;
21+ ASSERT_SUCCESS (urContextGetInfo (
22+ context, UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT,
23+ sizeof (memcpy2d_support), &memcpy2d_support, nullptr ));
24+ if (!memcpy2d_support) {
25+ GTEST_SKIP () << " 2D USM memcpy is not supported" ;
26+ }
27+
2028 const auto [inPitch, inWidth, inHeight] = getParam ();
2129 std::tie (pitch, width, height) =
2230 std::make_tuple (inPitch, inWidth, inHeight);
@@ -28,9 +36,9 @@ struct urEnqueueUSMMemcpy2DTestWithParam
2836 num_elements, &pDst));
2937 ur_event_handle_t memset_event = nullptr ;
3038
31- ASSERT_SUCCESS (urEnqueueUSMFill2D (
32- queue, pSrc, pitch, sizeof (memset_value), &memset_value, width ,
33- height, 0 , nullptr , &memset_event));
39+ ASSERT_SUCCESS (urEnqueueUSMFill (queue, pSrc, sizeof (memset_value),
40+ &memset_value, pitch * height, 0 ,
41+ nullptr , &memset_event));
3442
3543 ASSERT_SUCCESS (urQueueFlush (queue));
3644 ASSERT_SUCCESS (urEventWait (1 , &memset_event));
@@ -171,9 +179,9 @@ TEST_P(urEnqueueUSMMemcpy2DNegativeTest, InvalidEventWaitList) {
171179 // enqueue something to get an event
172180 ur_event_handle_t event = nullptr ;
173181 uint8_t fill_pattern = 14 ;
174- ASSERT_SUCCESS (urEnqueueUSMFill2D (queue, pDst, pitch , sizeof (fill_pattern),
175- &fill_pattern, width, height, 0 , nullptr ,
176- &event));
182+ ASSERT_SUCCESS (urEnqueueUSMFill (queue, pDst, sizeof (fill_pattern),
183+ &fill_pattern, pitch * height, 0 , nullptr ,
184+ &event));
177185 ASSERT_NE (event, nullptr );
178186 ASSERT_SUCCESS (urQueueFinish (queue));
179187
0 commit comments