apply_cholesky_cusolver_potrsBatched Class — pytorch Architecture
Architecture documentation for the apply_cholesky_cusolver_potrsBatched class in BatchLinearAlgebraLib.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/cuda/linalg/BatchLinearAlgebraLib.cpp lines 873–900
template<typename scalar_t>
static void apply_cholesky_cusolver_potrsBatched(Tensor& self_working_copy, const Tensor& A_column_major_copy, bool upper, Tensor& infos) {
auto handle = at::cuda::getCurrentCUDASolverDnHandle();
const auto uplo = upper ? CUBLAS_FILL_MODE_UPPER : CUBLAS_FILL_MODE_LOWER;
const int64_t n = self_working_copy.size(-2);
const int64_t nrhs = self_working_copy.size(-1);
const int64_t lda = std::max<int64_t>(1, n);
const int64_t batch_size = batchCount(self_working_copy);
const int64_t ldb = std::max<int64_t>(1, A_column_major_copy.size(-1));
int* infos_ptr = infos.data_ptr<int>();
auto self_ptr_array = get_device_pointers<scalar_t>(self_working_copy);
auto A_ptr_array = get_device_pointers<scalar_t>(A_column_major_copy);
at::cuda::solver::potrsBatched(
handle, uplo,
cuda_int_cast(n, "n"),
cuda_int_cast(nrhs, "nrhs"),
reinterpret_cast<scalar_t**>(A_ptr_array.data_ptr()),
cuda_int_cast(lda, "lda"),
reinterpret_cast<scalar_t**>(self_ptr_array.data_ptr()),
cuda_int_cast(ldb, "ldb"),
infos_ptr,
cuda_int_cast(batch_size, "batch_size")
);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free