MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / EnsureCuBlasWorkspace

Function EnsureCuBlasWorkspace

ngscuda/cuda_linalg.cpp:37–42  ·  view source on GitHub ↗

Call before graph capture to ensure workspace is allocated

Source from the content-addressed store, hash-verified

35
36 // Call before graph capture to ensure workspace is allocated
37 void EnsureCuBlasWorkspace()
38 {
39 if (!cublas_workspace)
40 cudaMalloc(&cublas_workspace, cublas_workspace_size);
41 cublasSetWorkspace(Get_CuBlas_Handle(), cublas_workspace, cublas_workspace_size);
42 }
43
44 // Wrapper: set stream AND re-apply workspace if already allocated
45 // (cublasSetStream resets workspace to default pool)

Callers 2

BeginCaptureMethod · 0.85
BuildMethod · 0.85

Calls 1

Get_CuBlas_HandleFunction · 0.85

Tested by

no test coverage detected