Skip to content
Merged
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
8 changes: 4 additions & 4 deletions sycl/source/detail/graph_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ graph_impl::add(const std::vector<sycl::detail::EventImplPtr> Events) {
std::vector<std::shared_ptr<node_impl>> Deps;

// Add any nodes specified by event dependencies into the dependency list
for (auto Dep : Events) {
for (const auto &Dep : Events) {
if (auto NodeImpl = MEventsMap.find(Dep); NodeImpl != MEventsMap.end()) {
Deps.push_back(NodeImpl->second);
} else {
Expand Down Expand Up @@ -312,7 +312,7 @@ void exec_graph_impl::createCommandBuffers(sycl::device Device) {
MPiCommandBuffers[Device] = OutCommandBuffer;

// TODO extract kernel bundle logic from enqueueImpKernel
for (auto Node : MSchedule) {
for (const auto &Node : MSchedule) {
sycl::detail::CG::CGTYPE type = Node->MCGType;
// If the node is a kernel with no special requirements we can enqueue it
// directly.
Expand Down Expand Up @@ -357,7 +357,7 @@ exec_graph_impl::~exec_graph_impl() {
Event->wait(Event);
}

for (auto Iter : MPiCommandBuffers) {
for (const auto &Iter : MPiCommandBuffers) {
if (auto CmdBuf = Iter.second; CmdBuf) {
pi_result Res = Plugin->call_nocheck<
sycl::detail::PiApiKind::piextCommandBufferRelease>(CmdBuf);
Expand Down Expand Up @@ -609,7 +609,7 @@ void executable_command_graph::finalizeImpl() {
impl->schedule();

auto Context = impl->getContext();
for (auto Device : Context.get_devices()) {
for (const auto &Device : Context.get_devices()) {
bool CmdBufSupport =
Device.get_info<
ext::oneapi::experimental::info::device::graph_support>() ==
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@ pi_int32 enqueueImpCommandBufferKernel(
pi_program PiProgram = nullptr;

auto Kernel = CommandGroup.MSyclKernel;
const KernelArgMask *EliminatedArgMask;
const KernelArgMask *EliminatedArgMask = nullptr;
if (Kernel != nullptr) {
PiKernel = Kernel->getHandleRef();
} else {
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 @@ -151,7 +151,7 @@ EventImplPtr Scheduler::addCG(
if (ShouldEnqueue) {
enqueueCommandForCG(NewEvent, AuxiliaryCmds);

for (auto StreamImplPtr : Streams) {
for (const auto &StreamImplPtr : Streams) {
StreamImplPtr->flush(NewEvent);
}

Expand Down