Skip to content

[SYCL][NFC] Remove unused host kernel member in CGExecKernel #18466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 2 additions & 4 deletions sycl/source/detail/cg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ class CGExecKernel : public CG {
public:
/// Stores ND-range description.
NDRDescT MNDRDesc;
std::shared_ptr<HostKernelBase> MHostKernel;
std::shared_ptr<detail::kernel_impl> MSyclKernel;
std::shared_ptr<detail::kernel_bundle_impl> MKernelBundle;
std::vector<ArgDesc> MArgs;
Expand All @@ -267,7 +266,7 @@ class CGExecKernel : public CG {
bool MKernelUsesClusterLaunch = false;
size_t MKernelWorkGroupMemorySize = 0;

CGExecKernel(NDRDescT NDRDesc, std::shared_ptr<HostKernelBase> HKernel,
CGExecKernel(NDRDescT NDRDesc,
std::shared_ptr<detail::kernel_impl> SyclKernel,
std::shared_ptr<detail::kernel_bundle_impl> KernelBundle,
CG::StorageInitHelper CGData, std::vector<ArgDesc> Args,
Expand All @@ -278,8 +277,7 @@ class CGExecKernel : public CG {
bool KernelIsCooperative, bool MKernelUsesClusterLaunch,
size_t KernelWorkGroupMemorySize, detail::code_location loc = {})
: CG(Type, std::move(CGData), std::move(loc)),
MNDRDesc(std::move(NDRDesc)), MHostKernel(std::move(HKernel)),
MSyclKernel(std::move(SyclKernel)),
MNDRDesc(std::move(NDRDesc)), MSyclKernel(std::move(SyclKernel)),
MKernelBundle(std::move(KernelBundle)), MArgs(std::move(Args)),
MKernelName(std::move(KernelName)), MStreams(std::move(Streams)),
MAuxiliaryResources(std::move(AuxiliaryResources)),
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ event handler::finalize() {
// running of this method by reductions implementation. This allows for
// assert feature to check if kernel uses assertions
CommandGroup.reset(new detail::CGExecKernel(
std::move(impl->MNDRDesc), std::move(MHostKernel), std::move(MKernel),
std::move(impl->MNDRDesc), std::move(MKernel),
std::move(impl->MKernelBundle), std::move(impl->CGData),
std::move(impl->MArgs), MKernelName.data(), std::move(MStreamStorage),
std::move(impl->MAuxiliaryResources), getType(),
Expand Down
14 changes: 7 additions & 7 deletions sycl/unittests/program_manager/arg_mask/EliminatedArgMask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ class MockHandler : public sycl::handler {
switch (getType()) {
case sycl::detail::CGType::Kernel: {
CommandGroup.reset(new sycl::detail::CGExecKernel(
std::move(impl->MNDRDesc), std::move(CGH->MHostKernel),
std::move(CGH->MKernel), std::move(impl->MKernelBundle),
std::move(impl->CGData), std::move(impl->MArgs),
CGH->MKernelName.data(), std::move(CGH->MStreamStorage),
std::move(impl->MAuxiliaryResources), impl->MCGType, {},
impl->MKernelIsCooperative, impl->MKernelUsesClusterLaunch,
impl->MKernelWorkGroupMemorySize, CGH->MCodeLoc));
std::move(impl->MNDRDesc), std::move(CGH->MKernel),
std::move(impl->MKernelBundle), std::move(impl->CGData),
std::move(impl->MArgs), CGH->MKernelName.data(),
std::move(CGH->MStreamStorage), std::move(impl->MAuxiliaryResources),
impl->MCGType, {}, impl->MKernelIsCooperative,
impl->MKernelUsesClusterLaunch, impl->MKernelWorkGroupMemorySize,
CGH->MCodeLoc));
break;
}
default:
Expand Down
10 changes: 3 additions & 7 deletions sycl/unittests/scheduler/SchedulerTestUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ class MockHandler : public sycl::handler {
std::vector<std::shared_ptr<sycl::detail::stream_impl>> &getStreamStorage() {
return MStreamStorage;
}
std::unique_ptr<sycl::detail::HostKernelBase> &getHostKernel() {
return MHostKernel;
}
std::vector<std::vector<char>> &getArgsStorage() {
return impl->CGData.MArgsStorage;
}
Expand Down Expand Up @@ -299,10 +296,9 @@ class MockHandlerCustomFinalize : public MockHandler {
switch (getType()) {
case sycl::detail::CGType::Kernel: {
CommandGroup.reset(new sycl::detail::CGExecKernel(
getNDRDesc(), std::move(getHostKernel()), getKernel(),
std::move(impl->MKernelBundle), std::move(CGData), getArgs(),
getKernelName(), getStreamStorage(), impl->MAuxiliaryResources,
getType(), {}, impl->MKernelIsCooperative,
getNDRDesc(), getKernel(), std::move(impl->MKernelBundle),
std::move(CGData), getArgs(), getKernelName(), getStreamStorage(),
impl->MAuxiliaryResources, getType(), {}, impl->MKernelIsCooperative,
impl->MKernelUsesClusterLaunch, impl->MKernelWorkGroupMemorySize,
getCodeLoc()));
break;
Expand Down
3 changes: 1 addition & 2 deletions sycl/unittests/scheduler/StreamInitDependencyOnHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class MockHandlerStreamInit : public MockHandler {
switch (getType()) {
case detail::CGType::Kernel: {
CommandGroup.reset(new detail::CGExecKernel(
getNDRDesc(), std::move(getHostKernel()), getKernel(),
std::move(impl->MKernelBundle),
getNDRDesc(), getKernel(), std::move(impl->MKernelBundle),
detail::CG::StorageInitHelper(getArgsStorage(), getAccStorage(),
getSharedPtrStorage(),
getRequirements(), getEvents()),
Expand Down
Loading