Skip to content

Commit fc8672f

Browse files
committed
OCL: show cache path in log
1 parent ff70144 commit fc8672f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

include/luxrays/utils/oclcache.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class oclKernelPersistentCache : public oclKernelCache {
7373

7474
static std::filesystem::path GetCacheDir(const std::string &applicationName);
7575

76+
std::string GetApplicationName() {
77+
return appName;
78+
}
79+
7680
private:
7781
std::string appName;
7882
};
@@ -83,3 +87,4 @@ class oclKernelPersistentCache : public oclKernelCache {
8387

8488
#endif /* _LUXRAYS_OPENCLCACHE_H */
8589

90+
// vim: autoindent noexpandtab tabstop=4 shiftwidth=4

src/luxrays/devices/ocldevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ void OpenCLDevice::CompileProgram(HardwareDeviceProgram **program,
172172

173173
LR_LOG(deviceContext, "[" << programName << "] Compiler options: " << oclKernelPersistentCache::ToOptsString(oclProgramParameters));
174174
LR_LOG(deviceContext, "[" << programName << "] Compiling kernels ");
175+
LR_LOG(deviceContext, "[" << programName << "] Cache directory: " << oclKernelPersistentCache::GetCacheDir(dynamic_cast<oclKernelPersistentCache*>(kernelCache)->GetApplicationName()));
176+
175177

176178
const string oclProgramSource =
177179
luxrays::ocl::KernelSource_ocldevice_funcs +

src/luxrays/utils/config.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,5 @@ std::filesystem::path GetCacheDir() {
9898
}
9999

100100
}
101+
102+
// vim: autoindent noexpandtab tabstop=4 shiftwidth=4

0 commit comments

Comments
 (0)