Skip to content

Commit 8299b60

Browse files
authored
[SYCL] Get platform_impl shared_ptr directly (#17880)
Avoid constructing a platform object to get the platform_impl shared_ptr.
1 parent 1cdf8a8 commit 8299b60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ static void appendCompileOptionsFromImage(std::string &CompileOpts,
369369

370370
appendCompileOptionsForGRFSizeProperties(CompileOpts, Img, isEsimdImage);
371371

372-
platform Platform = Devs[0].get_platform();
373-
const auto &PlatformImpl = detail::getSyclObjImpl(Platform);
372+
const detail::DeviceImplPtr &DeviceImpl = detail::getSyclObjImpl(Devs[0]);
373+
const detail::PlatformImplPtr &PlatformImpl = DeviceImpl->getPlatformImpl();
374374

375375
// Add optimization flags.
376376
auto str = getUint32PropAsOptStr(Img, "optLevel");

0 commit comments

Comments
 (0)