Skip to content

Commit 4c465e8

Browse files
committed
Instead of move pass const ref to completeSpecConstMaterialization
1 parent 30612c6 commit 4c465e8

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

sycl/source/detail/jit_compiler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ translateBinaryImageFormat(ur::DeviceBinaryType Type) {
137137
}
138138
}
139139

140-
::jit_compiler::BinaryFormat getTargetFormat(QueueImplPtr &Queue) {
140+
::jit_compiler::BinaryFormat getTargetFormat(const QueueImplPtr &Queue) {
141141
auto Backend = Queue->getDeviceImplPtr()->getBackend();
142142
switch (Backend) {
143143
case backend::ext_oneapi_level_zero:
@@ -154,7 +154,7 @@ ::jit_compiler::BinaryFormat getTargetFormat(QueueImplPtr &Queue) {
154154
}
155155
}
156156

157-
::jit_compiler::TargetInfo getTargetInfo(QueueImplPtr &Queue) {
157+
::jit_compiler::TargetInfo getTargetInfo(const QueueImplPtr &Queue) {
158158
::jit_compiler::BinaryFormat Format = getTargetFormat(Queue);
159159
return ::jit_compiler::TargetInfo::get(
160160
Format, static_cast<::jit_compiler::DeviceArchitecture>(
@@ -659,7 +659,7 @@ updatePromotedArgs(const ::jit_compiler::SYCLKernelInfo &FusedKernelInfo,
659659
}
660660

661661
ur_kernel_handle_t jit_compiler::materializeSpecConstants(
662-
QueueImplPtr Queue, const RTDeviceBinaryImage *BinImage,
662+
const QueueImplPtr &Queue, const RTDeviceBinaryImage *BinImage,
663663
const std::string &KernelName,
664664
const std::vector<unsigned char> &SpecConstBlob) {
665665
#ifndef _WIN32

sycl/source/detail/jit_compiler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class jit_compiler {
4444
fuseKernels(QueueImplPtr Queue, std::vector<ExecCGCommand *> &InputKernels,
4545
const property_list &);
4646
ur_kernel_handle_t
47-
materializeSpecConstants(QueueImplPtr Queue,
47+
materializeSpecConstants(const QueueImplPtr &Queue,
4848
const RTDeviceBinaryImage *BinImage,
4949
const std::string &KernelName,
5050
const std::vector<unsigned char> &SpecConstBlob);

sycl/source/detail/scheduler/scheduler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,13 +587,13 @@ void Scheduler::cleanupAuxiliaryResources(BlockingT Blocking) {
587587
}
588588

589589
ur_kernel_handle_t Scheduler::completeSpecConstMaterialization(
590-
[[maybe_unused]] QueueImplPtr Queue,
590+
[[maybe_unused]] const QueueImplPtr &Queue,
591591
[[maybe_unused]] const RTDeviceBinaryImage *BinImage,
592592
[[maybe_unused]] const std::string &KernelName,
593593
[[maybe_unused]] std::vector<unsigned char> &SpecConstBlob) {
594594
#if SYCL_EXT_JIT_ENABLE && !_WIN32
595595
return detail::jit_compiler::get_instance().materializeSpecConstants(
596-
std::move(Queue), BinImage, KernelName, SpecConstBlob);
596+
Queue, BinImage, KernelName, SpecConstBlob);
597597
#else // SYCL_EXT_JIT_ENABLE && !_WIN32
598598
if (detail::SYCLConfig<detail::SYCL_RT_WARNING_LEVEL>::get() > 0) {
599599
std::cerr << "WARNING: Materialization of spec constants not supported by "

sycl/source/detail/scheduler/scheduler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ class Scheduler {
453453
void deferMemObjRelease(const std::shared_ptr<detail::SYCLMemObjI> &MemObj);
454454

455455
ur_kernel_handle_t completeSpecConstMaterialization(
456-
QueueImplPtr Queue, const RTDeviceBinaryImage *BinImage,
456+
const QueueImplPtr &Queue, const RTDeviceBinaryImage *BinImage,
457457
const std::string &KernelName, std::vector<unsigned char> &SpecConstBlob);
458458

459459
void releaseResources(BlockingT Blocking = BlockingT::BLOCKING);

0 commit comments

Comments
 (0)