Skip to content

Commit a6da2be

Browse files
author
pradeep
committed
Refactor loadKernel fn name as loadKernelFromDisk
1 parent 2d4cd11 commit a6da2be

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/backend/common/compile_kernel.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ detail::Kernel compileKernel(const std::string& kernelName,
4242
/// \param[in] device is the device index
4343
/// \param[in] kernelNameExpr is the name identifying the relevant kernel
4444
/// \param[in] sources is the list of kernel and helper source files
45-
detail::Kernel loadKernel(const int device, const std::string& kernelNameExpr,
46-
const std::vector<std::string>& sources);
45+
detail::Kernel loadKernelFromDisk(const int device,
46+
const std::string& kernelNameExpr,
47+
const std::vector<std::string>& sources);
4748

4849
} // namespace common
4950

src/backend/common/kernel_cache.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Kernel lookupKernel(const int device, const string& nameExpr,
5050

5151
if (sources.size() > 0) {
5252
#if defined(AF_CUDA) && defined(AF_CACHE_KERNELS_TO_DISK)
53-
Kernel kernel = loadKernel(device, nameExpr, sources);
53+
Kernel kernel = loadKernelFromDisk(device, nameExpr, sources);
5454
if (kernel.getModule() != nullptr && kernel.getKernel() != nullptr) {
5555
cacheKernel(device, nameExpr, kernel);
5656
return kernel;

src/backend/cuda/compile_kernel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ Kernel compileKernel(const string &kernelName, const string &nameExpr,
363363
return entry;
364364
}
365365

366-
Kernel loadKernel(const int device, const string &nameExpr,
367-
const vector<string> &sources) {
366+
Kernel loadKernelFromDisk(const int device, const string &nameExpr,
367+
const vector<string> &sources) {
368368
const string &cacheDirectory = getCacheDirectory();
369369
if (cacheDirectory.empty()) return Kernel{nullptr, nullptr};
370370

src/backend/opencl/compile_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Kernel compileKernel(const string &kernelName, const string &tInstance,
143143
return {prg, krn};
144144
}
145145

146-
Kernel loadKernel(const int device, const string &nameExpr) {
146+
Kernel loadKernelFromDisk(const int device, const string &nameExpr) {
147147
OPENCL_NOT_SUPPORTED(
148148
"Disk caching OpenCL kernel binaries is not yet supported");
149149
return {nullptr, nullptr};

0 commit comments

Comments
 (0)