| 268 | |
| 269 | template <typename T> |
| 270 | void create(Gemm<T>& g, size_t workspaceSize) |
| 271 | { |
| 272 | typeA = Gemm<T>::Types::cudaTypeI; |
| 273 | typeB = Gemm<T>::Types::cudaTypeI; |
| 274 | typeC = Gemm<T>::Types::cudaTypeO; |
| 275 | typeS = Gemm<T>::Types::cudaTypeS; |
| 276 | typeComp = Gemm<T>::Types::cudaTypeCom; // compute |
| 277 | |
| 278 | // OPERATION |
| 279 | #if CUBLAS_VER_MAJOR < 11 |
| 280 | PLUGIN_CUBLASASSERT(cublasLtMatmulDescCreate(&operationDesc, typeComp)); |
| 281 | #else |
| 282 | PLUGIN_CUBLASASSERT(cublasLtMatmulDescCreate(&operationDesc, typeComp, typeS)); |
| 283 | #endif |
| 284 | PLUGIN_CUBLASASSERT( |
| 285 | cublasLtMatmulDescSetAttribute(operationDesc, CUBLASLT_MATMUL_DESC_TRANSA, &g.opA, sizeof(g.opA))); |
| 286 | PLUGIN_CUBLASASSERT( |
| 287 | cublasLtMatmulDescSetAttribute(operationDesc, CUBLASLT_MATMUL_DESC_TRANSB, &g.opB, sizeof(g.opB))); |
| 288 | |
| 289 | // MAT DESC |
| 290 | PLUGIN_CUBLASASSERT(cublasLtMatrixLayoutCreate(&Adesc, typeA, g.rA, g.cA, g.ldA)); |
| 291 | PLUGIN_CUBLASASSERT(cublasLtMatrixLayoutCreate(&Bdesc, typeB, g.rB, g.cB, g.ldB)); |
| 292 | PLUGIN_CUBLASASSERT(cublasLtMatrixLayoutCreate(&Cdesc, typeC, g.rC, g.cC, g.ldC)); |
| 293 | } |
| 294 | |
| 295 | void setN(uint64_t n) |
| 296 | { |