pub unsafe extern "C" fn cutensorReadKernelCacheFromFile(
handle: cutensorHandle_t,
filename: *const c_char,
) -> cutensorStatus_tExpand description
Reads a kernel cache from file and adds all non-existing JIT compiled kernels to the kernel cache.
A cache is only valid for the same cuTENSOR version and CUDA version; moreover, the GPU architecture (incl. multiprocessor count) must match, otherwise cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE will be returned.
Remark
non-blocking, no reentrant, and thread-safe.
§Parameters
handle: Opaque handle holding cuTENSOR’s library context.filename: Specifies the filename (including the absolute path) to the file that holds all the cache information that have previously been written by cutensorWriteKernelCacheToFile.
§Return value
cutensorStatus_t::CUTENSOR_STATUS_INVALID_VALUE: if the stored cache was created by a different cuTENSOR- or CUDA-version or if the GPU architecture (incl. multiprocessor count) doesn’t match.cutensorStatus_t::CUTENSOR_STATUS_IO_ERROR: if the file cannot be read.cutensorStatus_t::CUTENSOR_STATUS_NOT_INITIALIZED: if the handle is not initialized.cutensorStatus_t::CUTENSOR_STATUS_NOT_SUPPORTED: if the function is not available for the operating system, CUDA Toolkit, or compute capability of the device.cutensorStatus_t::CUTENSOR_STATUS_SUCCESS: The operation completed successfully, or the file pointed to by filename was empty.