@@ -140,8 +140,8 @@ inline pi_result redefinedProgramCompile(pi_program, pi_uint32,
140
140
inline pi_result redefinedProgramBuild (
141
141
pi_program prog, pi_uint32, const pi_device *, const char *options,
142
142
void (*pfn_notify)(pi_program program, void *user_data), void *user_data) {
143
- assert (options != nullptr );
144
- current_build_opts = std::string (options);
143
+ assert (options != nullptr );
144
+ current_build_opts = std::string (options);
145
145
return PI_SUCCESS;
146
146
}
147
147
@@ -186,7 +186,6 @@ TEST(Link_Compile_Options, compile_link_Options_Test_empty_options) {
186
186
EXPECT_EQ (expected_options, current_compile_options);
187
187
}
188
188
189
-
190
189
TEST (Link_Compile_Options, compile_link_Options_Test_filled_options) {
191
190
sycl::platform Plt{sycl::default_selector ()};
192
191
if (Plt.is_host ()) {
@@ -211,12 +210,14 @@ TEST(Link_Compile_Options, compile_link_Options_Test_filled_options) {
211
210
const sycl::device Dev = Plt.get_devices ()[0 ];
212
211
current_link_options.clear ();
213
212
current_compile_options.clear ();
214
- std::string expected_compile_options_1 = " -cl-opt-disable -cl-fp32-correctly-rounded-divide-sqrt" ,
215
- expected_link_options_1 = " -cl-denorms-are-zero -cl-no-signed-zeros" ;
213
+ std::string expected_compile_options_1 =
214
+ " -cl-opt-disable -cl-fp32-correctly-rounded-divide-sqrt" ,
215
+ expected_link_options_1 =
216
+ " -cl-denorms-are-zero -cl-no-signed-zeros" ;
216
217
static sycl::unittest::PiImage DevImage_1 =
217
218
generateEAMTestKernel1Image<EAMTestKernel1>(expected_compile_options_1,
218
219
expected_link_options_1);
219
-
220
+
220
221
static sycl::unittest::PiImageArray<1 > DevImageArray = {&DevImage_1};
221
222
auto KernelID_1 = sycl::get_kernel_id<EAMTestKernel1>();
222
223
sycl::queue Queue{Dev};
@@ -230,7 +231,8 @@ TEST(Link_Compile_Options, compile_link_Options_Test_filled_options) {
230
231
EXPECT_EQ (expected_compile_options_1, current_compile_options);
231
232
}
232
233
233
- TEST (Link_Compile_Options, compile_link_Options_Test_two_devices_filled_options) {
234
+ TEST (Link_Compile_Options,
235
+ compile_link_Options_Test_two_devices_filled_options) {
234
236
sycl::platform Plt{sycl::default_selector ()};
235
237
if (Plt.is_host ()) {
236
238
std::cerr << " Test is not supported on host, skipping\n " ;
@@ -255,7 +257,8 @@ TEST(Link_Compile_Options, compile_link_Options_Test_two_devices_filled_options)
255
257
current_link_options.clear ();
256
258
current_compile_options.clear ();
257
259
std::string expected_compile_options_1 = " -cl-opt-disable" ,
258
- expected_compile_options_2 = " -cl-fp32-correctly-rounded-divide-sqrt" ,
260
+ expected_compile_options_2 =
261
+ " -cl-fp32-correctly-rounded-divide-sqrt" ,
259
262
expected_link_options_1 = " -cl-denorms-are-zero" ,
260
263
expected_link_options_2 = " -cl-no-signed-zeros" ;
261
264
static sycl::unittest::PiImage DevImage_1 =
@@ -265,22 +268,26 @@ TEST(Link_Compile_Options, compile_link_Options_Test_two_devices_filled_options)
265
268
generateEAMTestKernel2Image<EAMTestKernel2>(expected_compile_options_2,
266
269
expected_link_options_2);
267
270
static sycl::unittest::PiImage Images[] = {DevImage_1, DevImage_2};
268
- static sycl::unittest::PiImageArray<2 > DevImageArray {Images};
269
-
271
+ static sycl::unittest::PiImageArray<2 > DevImageArray{Images};
272
+
270
273
auto KernelID_1 = sycl::get_kernel_id<EAMTestKernel1>();
271
274
auto KernelID_2 = sycl::get_kernel_id<EAMTestKernel2>();
272
275
sycl::queue Queue{Dev_1};
273
276
const sycl::context Ctx = Queue.get_context ();
274
277
sycl::kernel_bundle KernelBundle1 =
275
- sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev_1}, {KernelID_1});
278
+ sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev_1},
279
+ {KernelID_1});
276
280
sycl::kernel_bundle KernelBundle2 =
277
- sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev_1}, {KernelID_2});
281
+ sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev_1},
282
+ {KernelID_2});
278
283
auto BundleObj1 = sycl::compile (KernelBundle1);
279
284
auto BundleObj2 = sycl::compile (KernelBundle2);
280
285
sycl::link (BundleObj1);
281
286
sycl::link (BundleObj2);
282
- EXPECT_EQ (expected_link_options_1 + " " + expected_link_options_2, current_link_options);
283
- EXPECT_EQ (expected_compile_options_1 + " " + expected_compile_options_2, current_compile_options);
287
+ EXPECT_EQ (expected_link_options_1 + " " + expected_link_options_2,
288
+ current_link_options);
289
+ EXPECT_EQ (expected_compile_options_1 + " " + expected_compile_options_2,
290
+ current_compile_options);
284
291
}
285
292
286
293
TEST (Link_Compile_Options, check_sycl_build) {
@@ -321,5 +328,6 @@ TEST(Link_Compile_Options, check_sycl_build) {
321
328
sycl::get_kernel_bundle<sycl::bundle_state::input>(Ctx, {Dev},
322
329
{KernelID});
323
330
sycl::build (KernelBundle);
324
- EXPECT_EQ (expected_compile_options + " " + expected_link_options, current_build_opts);
331
+ EXPECT_EQ (expected_compile_options + " " + expected_link_options,
332
+ current_build_opts);
325
333
}
0 commit comments