MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getKernelCacheFilename

Function getKernelCacheFilename

src/backend/opencl/compile_module.cpp:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135string getKernelCacheFilename(const int device, const string &key) {
136 auto &dev = arrayfire::opencl::getDevice(device);
137
138 unsigned vendorId = dev.getInfo<CL_DEVICE_VENDOR_ID>();
139 auto devName = dev.getInfo<CL_DEVICE_NAME>();
140 string infix = to_string(vendorId) + "_" + devName;
141
142 transform(infix.begin(), infix.end(), infix.begin(),
143 [](unsigned char c) { return std::toupper(c); });
144 std::replace(infix.begin(), infix.end(), ' ', '_');
145
146 return "KER" + key + "_CL_" + infix + "_AF_" +
147 to_string(AF_API_VERSION_CURRENT) + ".bin";
148}
149
150} // namespace opencl
151} // namespace arrayfire

Callers 2

compileModuleFunction · 0.70
loadModuleFromDiskFunction · 0.70

Calls 4

getDeviceFunction · 0.85
to_stringFunction · 0.85
transformFunction · 0.70
replaceFunction · 0.50

Tested by

no test coverage detected