Download code/llmc_training/llmc/cublas_common.h from SciCode/MileTone_2: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/SciCode/MileTone_2/resolve/main/code/llmc_training/llmc/cublas_common.h
- Command line
-
hf download hf://SciCode/MileTone_2/code/llmc_training/llmc/cublas_common.h
-
curl -L -o cublas_common.h https://huggingface.co/SciCode/MileTone_2/resolve/main/code/llmc_training/llmc/cublas_common.h
1.31 kB
| /* | |
| cuBLAS related utils | |
| */ | |
| // ---------------------------------------------------------------------------- | |
| // cuBLAS Precision settings | |
| // ---------------------------------------------------------------------------- | |
| // cuBLAS globals for workspace, handle, settings | |
| // Hardcoding workspace to 32MiB but only Hopper needs 32 (for others 4 is OK) | |
| const size_t cublaslt_workspace_size = 32 * 1024 * 1024; | |
| void* cublaslt_workspace = NULL; | |
| cublasComputeType_t cublas_compute = CUBLAS_COMPUTE_32F; | |
| cublasLtHandle_t cublaslt_handle; | |
| // ---------------------------------------------------------------------------- | |
| // Error checking | |
| // cuBLAS error checking | |
| void cublasCheck(cublasStatus_t status, const char *file, int line) | |
| { | |
| if (status != CUBLAS_STATUS_SUCCESS) { | |
| printf("[cuBLAS ERROR]: %d %s %d\n", status, file, line); | |
| exit(EXIT_FAILURE); | |
| } | |
| } | |