How to serialize cublasLtMatmulAlgo_t

cuBLAS :: CUDA Toolkit Documentation here it says this struct can be serialized.
Does it mean that I have to retrieve everything from cublasLtMatmulAlgo_t into cublasLtMatmulAlgoCapAttributes_t, and serialize them ? Or Is there a better way to serialize cublasLtMatmulAlgo_t as a whole?
Because calling cublasLtMatmulAlgoConfigGetAttribute several times is time consuming, and in my case becomes the performance bottle neck.

From cublasLt.h

/** Semi-opaque algorithm descriptor (to avoid complicated alloc/free schemes)
 * This structure can be trivially serialized and later restored for use with the same version of cuBLAS library to save
 * on selecting the right configuration again.
typedef struct {
  uint64_t data[8];
} cublasLtMatmulAlgo_t;

Trivially serializable in the documentation means that one case do:

cublasLtMatmulAlgo_t algo;
// some work with algo
char buffer[sizeof(algo)];
memcpy(buffer, &algo, sizeof(algo)); // serialize algo

// later...
memcpy(&algo, buffer, sizeof(algo)); // de-serialize algo
// continue working with algo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.