Skip to content

Commit cae8118

Browse files
[SYCL] Require aspect::online_compiler for build-log unittests (#6396)
Unittests for build-logs use kernel bundles in input state. In accordance with the SYCL 2020 specification a program using kernel bundles in input state should check that the corresponding devices support aspect::online_compiler. These changes adds a check for this device aspect when deciding if the test is supported. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent b71f727 commit cae8118

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sycl/unittests/program_manager/BuildLog.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,16 @@ TEST(BuildLog, OutputNothingOnLevel1) {
9494
GTEST_SKIP_("Test is not supported on this platform");
9595
}
9696

97+
const sycl::device Dev = Plt.get_devices()[0];
98+
if (!Dev.has(sycl::aspect::online_compiler)) {
99+
GTEST_SKIP_("Test is not supported on this device due to missing support "
100+
"for sycl::aspect::online_compiler");
101+
}
102+
97103
sycl::unittest::PiMock Mock{Plt};
98104
setupDefaultMockAPIs(Mock);
99105
setupCommonTestAPIs(Mock);
100106

101-
const sycl::device Dev = Plt.get_devices()[0];
102107
sycl::context Ctx{Dev};
103108
sycl::queue Queue{Ctx, Dev};
104109

@@ -127,11 +132,16 @@ TEST(BuildLog, OutputLogOnLevel2) {
127132
GTEST_SKIP_("Test is not supported on this platform");
128133
}
129134

135+
const sycl::device Dev = Plt.get_devices()[0];
136+
if (!Dev.has(sycl::aspect::online_compiler)) {
137+
GTEST_SKIP_("Test is not supported on this device due to missing support "
138+
"for sycl::aspect::online_compiler");
139+
}
140+
130141
sycl::unittest::PiMock Mock{Plt};
131142
setupDefaultMockAPIs(Mock);
132143
setupCommonTestAPIs(Mock);
133144

134-
const sycl::device Dev = Plt.get_devices()[0];
135145
sycl::context Ctx{Dev};
136146
sycl::queue Queue{Ctx, Dev};
137147

0 commit comments

Comments
 (0)