Skip to content

Commit 7858474

Browse files
kbobrovsvladimirlaz
authored andcommitted
[SYCL] Don't force SPIRV format in device binary image.
Signed-off-by: Vladimir Lazarev <[email protected]> Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 6818c7b commit 7858474

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -6387,15 +6387,17 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
63876387
HostTripleOpt += getToolChain().getAuxTriple()->str();
63886388
WrapperArgs.push_back(C.getArgs().MakeArgString(HostTripleOpt));
63896389

6390-
// TODO forcing kind and format here is a simplification which assumes wrapper
6391-
// used only with SYCL and the only device code format is SPIRV (which is true
6392-
// at this point). Should be fixed together with supporting AOT in the driver.
6390+
// TODO forcing offload kind is a simplification which assumes wrapper used
6391+
// only with SYCL. Device binary format (-format=xxx) option should also come
6392+
// from the command line and/or the native compiler. Should be fixed together
6393+
// with supporting AOT in the driver.
6394+
// If format is not set, the default is "none" which means runtime must try
6395+
// to determine it automatically.
63936396
StringRef Kind = Action::GetOffloadKindName(JA.getOffloadingDeviceKind());
63946397
WrapperArgs.push_back(
63956398
C.getArgs().MakeArgString(Twine("-kind=") + Twine(Kind)));
63966399

63976400
for (auto I : Inputs) {
6398-
WrapperArgs.push_back("-format=spirv");
63996401
WrapperArgs.push_back(I.getFilename());
64006402
}
64016403

0 commit comments

Comments
 (0)