Skip to content

Commit 597c42f

Browse files
committed
Added skips for tests on CUDA and HIP devices
1 parent a3ec083 commit 597c42f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

sycl/unittests/queue/GetProfilingInfo.cpp

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@ redefinedPiEventGetProfilingInfo(pi_event event, pi_profiling_info param_name,
6767
TEST(GetProfilingInfo, normal_pass_without_exception) {
6868
cl::sycl::platform Plt{cl::sycl::default_selector{}};
6969
if (Plt.is_host()) {
70+
std::cout << "Test is not supported on host, skipping\n";
71+
GTEST_SKIP(); // test is not supported on host.
72+
}
73+
74+
if (Plt.get_backend() == sycl::backend::ext_oneapi_cuda) {
75+
std::cout << "Test is not supported on CUDA platform, skipping\n";
76+
GTEST_SKIP();
77+
}
78+
79+
if (Plt.get_backend() == sycl::backend::ext_oneapi_hip) {
80+
std::cout << "Test is not supported on HIP platform, skipping\n";
7081
GTEST_SKIP();
7182
}
7283
sycl::unittest::PiMock Mock{Plt};
@@ -109,6 +120,17 @@ TEST(GetProfilingInfo, normal_pass_without_exception) {
109120
TEST(GetProfilingInfo, command_exception_check) {
110121
cl::sycl::platform Plt{cl::sycl::default_selector{}};
111122
if (Plt.is_host()) {
123+
std::cout << "Test is not supported on host, skipping\n";
124+
GTEST_SKIP(); // test is not supported on host.
125+
}
126+
127+
if (Plt.get_backend() == sycl::backend::ext_oneapi_cuda) {
128+
std::cout << "Test is not supported on CUDA platform, skipping\n";
129+
GTEST_SKIP();
130+
}
131+
132+
if (Plt.get_backend() == sycl::backend::ext_oneapi_hip) {
133+
std::cout << "Test is not supported on HIP platform, skipping\n";
112134
GTEST_SKIP();
113135
}
114136
sycl::unittest::PiMock Mock{Plt};
@@ -179,6 +201,17 @@ TEST(GetProfilingInfo, command_exception_check) {
179201
TEST(GetProfilingInfo, check_if_now_dead_queue_property_set) {
180202
cl::sycl::platform Plt{cl::sycl::default_selector{}};
181203
if (Plt.is_host()) {
204+
std::cout << "Test is not supported on host, skipping\n";
205+
GTEST_SKIP(); // test is not supported on host.
206+
}
207+
208+
if (Plt.get_backend() == sycl::backend::ext_oneapi_cuda) {
209+
std::cout << "Test is not supported on CUDA platform, skipping\n";
210+
GTEST_SKIP();
211+
}
212+
213+
if (Plt.get_backend() == sycl::backend::ext_oneapi_hip) {
214+
std::cout << "Test is not supported on HIP platform, skipping\n";
182215
GTEST_SKIP();
183216
}
184217
sycl::unittest::PiMock Mock{Plt};
@@ -223,6 +256,17 @@ TEST(GetProfilingInfo, check_if_now_dead_queue_property_set) {
223256
TEST(GetProfilingInfo, check_if_now_dead_queue_property_not_set) {
224257
cl::sycl::platform Plt{cl::sycl::default_selector{}};
225258
if (Plt.is_host()) {
259+
std::cout << "Test is not supported on host, skipping\n";
260+
GTEST_SKIP(); // test is not supported on host.
261+
}
262+
263+
if (Plt.get_backend() == sycl::backend::ext_oneapi_cuda) {
264+
std::cout << "Test is not supported on CUDA platform, skipping\n";
265+
GTEST_SKIP();
266+
}
267+
268+
if (Plt.get_backend() == sycl::backend::ext_oneapi_hip) {
269+
std::cout << "Test is not supported on HIP platform, skipping\n";
226270
GTEST_SKIP();
227271
}
228272
sycl::unittest::PiMock Mock{Plt};

0 commit comments

Comments
 (0)