@@ -17,6 +17,14 @@ struct urEnqueueUSMMemcpy2DTestWithParam
17
17
GTEST_SKIP () << " Device USM is not supported" ;
18
18
}
19
19
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
+
20
28
const auto [inPitch, inWidth, inHeight] = getParam ();
21
29
std::tie (pitch, width, height) =
22
30
std::make_tuple (inPitch, inWidth, inHeight);
@@ -28,9 +36,9 @@ struct urEnqueueUSMMemcpy2DTestWithParam
28
36
num_elements, &pDst));
29
37
ur_event_handle_t memset_event = nullptr ;
30
38
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));
34
42
35
43
ASSERT_SUCCESS (urQueueFlush (queue));
36
44
ASSERT_SUCCESS (urEventWait (1 , &memset_event));
@@ -171,9 +179,9 @@ TEST_P(urEnqueueUSMMemcpy2DNegativeTest, InvalidEventWaitList) {
171
179
// enqueue something to get an event
172
180
ur_event_handle_t event = nullptr ;
173
181
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));
177
185
ASSERT_NE (event, nullptr );
178
186
ASSERT_SUCCESS (urQueueFinish (queue));
179
187
0 commit comments