@@ -135,15 +135,15 @@ class ProgramManager {
135
135
static ProgramManager &getInstance ();
136
136
137
137
RTDeviceBinaryImage &getDeviceImage (KernelNameStrRefT KernelName,
138
- const ContextImplPtr &ContextImpl,
138
+ context_impl &ContextImpl,
139
139
const device_impl *DeviceImpl);
140
140
141
141
RTDeviceBinaryImage &getDeviceImage (
142
142
const std::unordered_set<RTDeviceBinaryImage *> &ImagesToVerify,
143
- const ContextImplPtr &ContextImpl, const device_impl *DeviceImpl);
143
+ context_impl &ContextImpl, const device_impl *DeviceImpl);
144
144
145
145
ur_program_handle_t createURProgram (const RTDeviceBinaryImage &Img,
146
- const ContextImplPtr &ContextImpl,
146
+ context_impl &ContextImpl,
147
147
const std::vector<device> &Devices);
148
148
// / Creates a UR program using either a cached device code binary if present
149
149
// / in the persistent cache or from the supplied device image otherwise.
@@ -167,7 +167,7 @@ class ProgramManager {
167
167
std::pair<ur_program_handle_t , bool > getOrCreateURProgram (
168
168
const RTDeviceBinaryImage &Img,
169
169
const std::vector<const RTDeviceBinaryImage *> &AllImages,
170
- const ContextImplPtr &ContextImpl, const std::vector<device> &Devices,
170
+ context_impl &ContextImpl, const std::vector<device> &Devices,
171
171
const std::string &CompileAndLinkOptions, SerializedObj SpecConsts);
172
172
// / Builds or retrieves from cache a program defining the kernel with given
173
173
// / name.
@@ -176,7 +176,7 @@ class ProgramManager {
176
176
// / \param Context the context to build the program with
177
177
// / \param Device the device for which the program is built
178
178
// / \param KernelName the kernel's name
179
- ur_program_handle_t getBuiltURProgram (const ContextImplPtr &ContextImpl,
179
+ ur_program_handle_t getBuiltURProgram (context_impl &ContextImpl,
180
180
device_impl &DeviceImpl,
181
181
KernelNameStrRefT KernelName,
182
182
const NDRDescT &NDRDesc = {});
@@ -193,13 +193,12 @@ class ProgramManager {
193
193
// / the program should be built with.
194
194
ur_program_handle_t
195
195
getBuiltURProgram (const BinImgWithDeps &ImgWithDeps,
196
- const ContextImplPtr &ContextImpl,
197
- const std::vector<device> &Devs,
196
+ context_impl &ContextImpl, const std::vector<device> &Devs,
198
197
const DevImgPlainWithDeps *DevImgWithDeps = nullptr ,
199
198
const SerializedObj &SpecConsts = {});
200
199
201
200
FastKernelCacheValPtr
202
- getOrCreateKernel (const ContextImplPtr &ContextImpl, device_impl &DeviceImpl,
201
+ getOrCreateKernel (context_impl &ContextImpl, device_impl &DeviceImpl,
203
202
KernelNameStrRefT KernelName,
204
203
KernelNameBasedCacheT *KernelNameBasedCachePtr,
205
204
const NDRDescT &NDRDesc = {});
@@ -214,7 +213,7 @@ class ProgramManager {
214
213
const std::vector<unsigned char > &SpecializationConsts);
215
214
216
215
ur_program_handle_t getUrProgramFromUrKernel (ur_kernel_handle_t Kernel,
217
- const ContextImplPtr &Context);
216
+ context_impl &Context);
218
217
219
218
void addImage (sycl_device_binary RawImg, bool RegisterImgExports = true ,
220
219
RTDeviceBinaryImage **OutImage = nullptr ,
@@ -223,7 +222,7 @@ class ProgramManager {
223
222
void removeImages (sycl_device_binaries DeviceImages);
224
223
void debugPrintBinaryImages () const ;
225
224
static std::string getProgramBuildLog (const ur_program_handle_t &Program,
226
- const ContextImplPtr &Context);
225
+ context_impl &Context);
227
226
228
227
uint32_t getDeviceLibReqMask (const RTDeviceBinaryImage &Img);
229
228
@@ -394,7 +393,7 @@ class ProgramManager {
394
393
395
394
using ProgramPtr = std::unique_ptr<std::remove_pointer_t <ur_program_handle_t >,
396
395
decltype (&::urProgramRelease)>;
397
- ProgramPtr build (ProgramPtr Program, const ContextImplPtr &Context,
396
+ ProgramPtr build (ProgramPtr Program, context_impl &Context,
398
397
const std::string &CompileOptions,
399
398
const std::string &LinkOptions,
400
399
std::vector<ur_device_handle_t > &Devices,
0 commit comments