Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/source/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ template <> class SYCLConfig<SYCL_JIT_AMDGCN_PTX_TARGET_CPU> {
const char *ValStr = getCachedValue();

if (!ValStr)
return DefaultValue;
return std::move(DefaultValue);

return std::string{ValStr};
}
Expand Down
8 changes: 5 additions & 3 deletions sycl/source/detail/jit_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1044,14 +1044,16 @@ jit_compiler::fuseKernels(QueueImplPtr Queue,
std::shared_ptr<detail::kernel_bundle_impl> KernelBundleImplPtr;
if (TargetFormat == ::jit_compiler::BinaryFormat::SPIRV) {
detail::getSyclObjImpl(get_kernel_bundle<bundle_state::executable>(
Queue->get_context(), {Queue->get_device()}, {FusedKernelId}));
Queue->get_context(), {Queue->get_device()},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this code doing? Why do we need to call getSyclObjImpl here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not too sure, it does look strange that we dont seem to use the returned object impl after we get it. From the looks of it, this was introduced by @sommerlukas in #8747, would you mind commenting on this bit, thanks.

For now I just reverted the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is indeed dead code. Kernel fusion is currently not exercised since we removed the scheduler integration for it and we're currently planning a refactoring of this code.
I think you can just remove the entire if here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i've removed that if statement

{std::move(FusedKernelId)}));
}

std::unique_ptr<detail::CG> FusedCG;
FusedCG.reset(new detail::CGExecKernel(
NDRDesc, nullptr, nullptr, std::move(KernelBundleImplPtr),
std::move(CGData), std::move(FusedArgs), FusedOrCachedKernelName, {}, {},
CGType::Kernel, KernelCacheConfig, false /* KernelIsCooperative */,
std::move(CGData), std::move(FusedArgs),
std::move(FusedOrCachedKernelName), {}, {}, CGType::Kernel,
KernelCacheConfig, false /* KernelIsCooperative */,
false /* KernelUsesClusterLaunch*/, 0 /* KernelWorkGroupMemorySize */));
return FusedCG;
}
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ ur_kernel_handle_t Scheduler::completeSpecConstMaterialization(
[[maybe_unused]] std::vector<unsigned char> &SpecConstBlob) {
#if SYCL_EXT_JIT_ENABLE && !_WIN32
return detail::jit_compiler::get_instance().materializeSpecConstants(
Queue, BinImage, KernelName, SpecConstBlob);
std::move(Queue), BinImage, KernelName, SpecConstBlob);
#else // SYCL_EXT_JIT_ENABLE && !_WIN32
if (detail::SYCLConfig<detail::SYCL_RT_WARNING_LEVEL>::get() > 0) {
std::cerr << "WARNING: Materialization of spec constants not supported by "
Expand Down
Loading