MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PotrfImpl

Function PotrfImpl

tensorflow/core/kernels/cuda_solvers.cc:358–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357template <typename Scalar, typename BufSizeFnT, typename SolverFnT>
358static inline Status PotrfImpl(BufSizeFnT bufsize, SolverFnT solver,
359 CudaSolver* cuda_solver,
360 OpKernelContext* context,
361 cusolverDnHandle_t cusolver_dn_handle,
362 cublasFillMode_t uplo, int n, Scalar* A, int lda,
363 int* dev_lapack_info) {
364 mutex_lock lock(handle_map_mutex);
365 /* Get amount of workspace memory required. */
366 int lwork;
367 TF_RETURN_IF_CUSOLVER_ERROR(
368 bufsize(cusolver_dn_handle, uplo, n, CUDAComplex(A), lda, &lwork));
369 /* Allocate device memory for workspace. */
370 auto dev_workspace =
371 cuda_solver->GetScratchSpace<Scalar>(lwork, "", /* on_host */ false);
372 /* Launch the solver kernel. */
373 TF_RETURN_IF_CUSOLVER_ERROR(solver(
374 cusolver_dn_handle, uplo, n, CUDAComplex(A), lda,
375 CUDAComplex(dev_workspace.mutable_data()), lwork, dev_lapack_info));
376 return Status::OK();
377}
378
379#define POTRF_INSTANCE(Scalar, type_prefix) \
380 template <> \

Callers

nothing calls this directly

Calls 2

CUDAComplexFunction · 0.85
mutable_dataMethod · 0.80

Tested by

no test coverage detected