Skip to content

Commit f8fdd3c

Browse files
[SYCL] Add -vc-codegen compile option for ESIMD images
1 parent 557b564 commit f8fdd3c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,20 @@ 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+
if (Img.getSyclIsEsimdImage().isAvailable()) {
395+
bool IsEsimdImage =
396+
pi::DeviceBinaryProperty(*(Img.getSyclIsEsimdImage().begin()))
397+
.asUint32();
398+
if (IsEsimdImage) {
399+
if (!CompileOpts.empty())
400+
CompileOpts += " ";
401+
CompileOpts += "-vc-codegen";
402+
}
403+
}
404+
393405
ProgramPtr BuiltProgram =
394-
build(std::move(ProgramManaged), ContextImpl, Img.getCompileOptions(),
406+
build(std::move(ProgramManaged), ContextImpl, CompileOpts,
395407
Img.getLinkOptions(), getRawSyclObjImpl(Device)->getHandleRef(),
396408
ContextImpl->getCachedLibPrograms(), DeviceLibReqMask);
397409

0 commit comments

Comments
 (0)