Skip to content

Commit 6df94f2

Browse files
[ESIMD] Always preserve -vc-codegen option for ESIMD kernels (#3547)
1 parent 3977679 commit 6df94f2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,15 @@ RT::PiProgram ProgramManager::getBuiltPIProgram(OSModuleHandle M,
406406
// variable
407407
if (!CompileOptsEnv) {
408408
CompileOpts += Img.getCompileOptions();
409-
pi_device_binary_property isEsimdImage = Img.getProperty("isEsimdImage");
409+
}
410410

411-
if (isEsimdImage && pi::DeviceBinaryProperty(isEsimdImage).asUint32()) {
412-
if (!CompileOpts.empty())
413-
CompileOpts += " ";
414-
CompileOpts += "-vc-codegen";
415-
}
411+
// The -vc-codegen option is always preserved for ESIMD kernels, regardless
412+
// of the contents SYCL_PROGRAM_COMPILE_OPTIONS environment variable.
413+
pi_device_binary_property isEsimdImage = Img.getProperty("isEsimdImage");
414+
if (isEsimdImage && pi::DeviceBinaryProperty(isEsimdImage).asUint32()) {
415+
if (!CompileOpts.empty())
416+
CompileOpts += " ";
417+
CompileOpts += "-vc-codegen";
416418
}
417419

418420
// Update only if link options are not overwritten by environment variable

0 commit comments

Comments
 (0)