7
7
#include < uur/fixtures.h>
8
8
9
9
using TestParametersMemcpy2D =
10
- std::tuple<uur::TestParameters2D, uur::USMKind, uur::USMKind >;
10
+ std::tuple<uur::TestParameters2D, ur_usm_type_t , ur_usm_type_t >;
11
11
12
12
struct urEnqueueUSMMemcpy2DTestWithParam
13
13
: uur::urQueueTestWithParam<TestParametersMemcpy2D> {
@@ -22,8 +22,8 @@ struct urEnqueueUSMMemcpy2DTestWithParam
22
22
23
23
ur_device_usm_access_capability_flags_t device_usm = 0 ;
24
24
ASSERT_SUCCESS (uur::GetDeviceUSMDeviceSupport (device, device_usm));
25
- if (!device_usm && (src_kind == uur::USMKind::Device ||
26
- dst_kind == uur::USMKind::Device )) {
25
+ if (!device_usm && (src_kind == ur_usm_type_t ::UR_USM_TYPE_DEVICE ||
26
+ dst_kind == ur_usm_type_t ::UR_USM_TYPE_DEVICE )) {
27
27
GTEST_SKIP () << " Device USM is not supported" ;
28
28
}
29
29
@@ -66,7 +66,7 @@ struct urEnqueueUSMMemcpy2DTestWithParam
66
66
void verifyMemcpySucceeded () {
67
67
std::vector<uint8_t > host_mem (pitch * height);
68
68
const uint8_t *host_ptr = nullptr ;
69
- if (dst_kind == uur::USMKind::Device ) {
69
+ if (dst_kind == ur_usm_type_t ::UR_USM_TYPE_DEVICE ) {
70
70
ASSERT_SUCCESS (urEnqueueUSMMemcpy2D (queue, true , host_mem.data (),
71
71
pitch, pDst, pitch, width,
72
72
height, 0 , nullptr , nullptr ));
@@ -88,8 +88,8 @@ struct urEnqueueUSMMemcpy2DTestWithParam
88
88
size_t pitch = 0 ;
89
89
size_t width = 0 ;
90
90
size_t height = 0 ;
91
- uur::USMKind src_kind;
92
- uur::USMKind dst_kind;
91
+ ur_usm_type_t src_kind;
92
+ ur_usm_type_t dst_kind;
93
93
};
94
94
95
95
static std::vector<uur::TestParameters2D> test_sizes{
@@ -106,15 +106,16 @@ static std::vector<uur::TestParameters2D> test_sizes{
106
106
/* Height == 1 && Pitch == width + 1 */
107
107
{234 , 233 , 1 }};
108
108
109
- UUR_TEST_SUITE_P (urEnqueueUSMMemcpy2DTestWithParam,
110
- ::testing::Combine (::testing::ValuesIn(test_sizes),
111
- ::testing::Values(uur::USMKind::Device,
112
- uur::USMKind::Host,
113
- uur::USMKind::Shared),
114
- ::testing::Values(uur::USMKind::Device,
115
- uur::USMKind::Host,
116
- uur::USMKind::Shared)),
117
- uur::print2DTestString<urEnqueueUSMMemcpy2DTestWithParam>);
109
+ UUR_TEST_SUITE_P (
110
+ urEnqueueUSMMemcpy2DTestWithParam,
111
+ ::testing::Combine (::testing::ValuesIn(test_sizes),
112
+ ::testing::Values(ur_usm_type_t ::UR_USM_TYPE_DEVICE,
113
+ ur_usm_type_t ::UR_USM_TYPE_HOST,
114
+ ur_usm_type_t ::UR_USM_TYPE_SHARED),
115
+ ::testing::Values(ur_usm_type_t ::UR_USM_TYPE_DEVICE,
116
+ ur_usm_type_t ::UR_USM_TYPE_HOST,
117
+ ur_usm_type_t ::UR_USM_TYPE_SHARED)),
118
+ uur::print2DTestString<urEnqueueUSMMemcpy2DTestWithParam>);
118
119
119
120
TEST_P (urEnqueueUSMMemcpy2DTestWithParam, SuccessBlocking) {
120
121
ASSERT_SUCCESS (urEnqueueUSMMemcpy2D (queue, true , pDst, pitch, pSrc, pitch,
@@ -141,7 +142,9 @@ TEST_P(urEnqueueUSMMemcpy2DTestWithParam, SuccessNonBlocking) {
141
142
using urEnqueueUSMMemcpy2DNegativeTest = urEnqueueUSMMemcpy2DTestWithParam;
142
143
UUR_TEST_SUITE_P (urEnqueueUSMMemcpy2DNegativeTest,
143
144
::testing::Values (TestParametersMemcpy2D{
144
- {1 , 1 , 1 }, uur::USMKind::Device, uur::USMKind::Device}),
145
+ {1 , 1 , 1 },
146
+ ur_usm_type_t ::UR_USM_TYPE_DEVICE,
147
+ ur_usm_type_t ::UR_USM_TYPE_DEVICE}),
145
148
uur::print2DTestString<urEnqueueUSMMemcpy2DTestWithParam>);
146
149
147
150
TEST_P (urEnqueueUSMMemcpy2DNegativeTest, InvalidNullHandleQueue) {
0 commit comments