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

Function GetrfImpl

tensorflow/core/kernels/cuda_solvers.cc:428–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426
427template <typename Scalar, typename BufSizeFnT, typename SolverFnT>
428static inline Status GetrfImpl(BufSizeFnT bufsize, SolverFnT solver,
429 CudaSolver* cuda_solver,
430 OpKernelContext* context,
431 cusolverDnHandle_t cusolver_dn_handle, int m,
432 int n, Scalar* A, int lda, int* dev_pivots,
433 int* dev_lapack_info) {
434 mutex_lock lock(handle_map_mutex);
435 /* Get amount of workspace memory required. */
436 int lwork;
437 TF_RETURN_IF_CUSOLVER_ERROR(
438 bufsize(cusolver_dn_handle, m, n, CUDAComplex(A), lda, &lwork));
439 /* Allocate device memory for workspace. */
440 auto dev_workspace =
441 cuda_solver->GetScratchSpace<Scalar>(lwork, "", /* on_host */ false);
442 /* Launch the solver kernel. */
443 TF_RETURN_IF_CUSOLVER_ERROR(solver(
444 cusolver_dn_handle, m, n, CUDAComplex(A), lda,
445 CUDAComplex(dev_workspace.mutable_data()), dev_pivots, dev_lapack_info));
446 return Status::OK();
447}
448
449#define GETRF_INSTANCE(Scalar, type_prefix) \
450 template <> \

Callers

nothing calls this directly

Calls 2

CUDAComplexFunction · 0.85
mutable_dataMethod · 0.80

Tested by

no test coverage detected