pub unsafe extern "C" fn cutensorHandleReadPlanCacheFromFile(
handle: cutensorHandle_t,
filename: *const c_char,
numCachelinesRead: *mut u32,
) -> cutensorStatus_tExpand description
Reads a Plan-Cache from file and overwrites the cachelines of the provided handle.
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 bycutensorHandleWritePlanCacheToFile.numCachelinesRead: On exit, this variable will hold the number of successfully-read cachelines, ifcutensorStatus_t::CUTENSOR_STATUS_SUCCESSis returned. Otherwise, this variable will hold the number of cachelines that are required to read all cachelines associated to the cache pointed to byfilename; in that casecutensorStatus_t::CUTENSOR_STATUS_INSUFFICIENT_WORKSPACEis returned.
§Return value
cutensorStatus_t::CUTENSOR_STATUS_INSUFFICIENT_WORKSPACE: if the stored cache requires more cachelines than those that are currently attached to the handle.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_SUCCESS: The operation completed successfully.