Skip to content

Commit 798b4c5

Browse files
[SYCL] Add -vc-codegen compile option for ESIMD images (#3146)
1 parent 112b9ac commit 798b4c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,16 @@ RT::PiProgram ProgramManager::getBuiltPIProgram(OSModuleHandle M,
390390
!SYCLConfig<SYCL_DEVICELIB_NO_FALLBACK>::get())
391391
DeviceLibReqMask = getDeviceLibReqMask(Img);
392392

393+
std::string CompileOpts = Img.getCompileOptions();
394+
pi_device_binary_property isEsimdImage = Img.getProperty("isEsimdImage");
395+
if (isEsimdImage && pi::DeviceBinaryProperty(isEsimdImage).asUint32()) {
396+
if (!CompileOpts.empty())
397+
CompileOpts += " ";
398+
CompileOpts += "-vc-codegen";
399+
}
400+
393401
ProgramPtr BuiltProgram =
394-
build(std::move(ProgramManaged), ContextImpl, Img.getCompileOptions(),
402+
build(std::move(ProgramManaged), ContextImpl, CompileOpts,
395403
Img.getLinkOptions(), getRawSyclObjImpl(Device)->getHandleRef(),
396404
ContextImpl->getCachedLibPrograms(), DeviceLibReqMask);
397405

0 commit comments

Comments
 (0)