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

Function GeqrfImpl

tensorflow/core/kernels/cuda_solvers.cc:488–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486
487template <typename Scalar, typename BufSizeFnT, typename SolverFnT>
488static inline Status GeqrfImpl(BufSizeFnT bufsize, SolverFnT solver,
489 CudaSolver* cuda_solver,
490 OpKernelContext* context,
491 cusolverDnHandle_t cusolver_dn_handle, int m,
492 int n, Scalar* A, int lda, Scalar* tau,
493 int* dev_lapack_info) {
494 mutex_lock lock(handle_map_mutex);
495 /* Get amount of workspace memory required. */
496 int lwork;
497 TF_RETURN_IF_CUSOLVER_ERROR(
498 bufsize(cusolver_dn_handle, m, n, CUDAComplex(A), lda, &lwork));
499 /* Allocate device memory for workspace. */
500 auto dev_workspace =
501 cuda_solver->GetScratchSpace<Scalar>(lwork, "", /* on_host */ false);
502 /* Launch the solver kernel. */
503 TF_RETURN_IF_CUSOLVER_ERROR(solver(
504 cusolver_dn_handle, m, n, CUDAComplex(A), lda, CUDAComplex(tau),
505 CUDAComplex(dev_workspace.mutable_data()), lwork, dev_lapack_info));
506 return Status::OK();
507}
508
509#define GEQRF_INSTANCE(Scalar, type_prefix) \
510 template <> \

Callers

nothing calls this directly

Calls 2

CUDAComplexFunction · 0.85
mutable_dataMethod · 0.80

Tested by

no test coverage detected