mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
GPU: Add library dispatch module (DeviceMatrix, cuBLAS, cuSOLVER)
Add Eigen/GPU module: A standalone GPU library dispatch layer where DeviceMatrix<Scalar> operations map 1:1 to cuBLAS/cuSOLVER calls. CPU and GPU solvers coexist in the same binary with compatible syntax. Core infrastructure: - DeviceMatrix<Scalar>: RAII dense column-major GPU memory wrapper with async host transfer (fromHost/toHost) and CUDA event-based cross-stream synchronization. - GpuContext: Unified execution context owning a CUDA stream + cuBLAS handle + cuSOLVER handle. Thread-local default with explicit override via setThreadLocal(). Stream-borrowing constructor for integration. - DeviceBuffer: Typed RAII device allocation with move semantics. cuBLAS dispatch (expression syntax): - GEMM: d_C = d_A.adjoint() * d_B (cublasXgemm) - TRSM: d_X = d_A.triangularView<Lower>().solve(d_B) (cublasXtrsm) - SYMM/HEMM: d_C = d_A.selfadjointView<Lower>() * d_B (cublasXsymm) - SYRK/HERK: d_C = d_A * d_A.adjoint() (cublasXsyrk) cuSOLVER dispatch: - GpuLLT: Cached Cholesky factorization (cusolverDnXpotrf + Xpotrs) - GpuLU: Cached LU factorization (cusolverDnXgetrf + Xgetrs) - Solver chaining: auto x = d_A.llt().solve(d_B) - Solver expressions with .device(ctx) for explicit stream control. CI: Bump CUDA container to Ubuntu 22.04 (CMake 3.22), GCC 10->11, Clang 12->14. Bump cmake_minimum_required to 3.17 for FindCUDAToolkit. Tests: gpu_cublas.cpp, gpu_cusolver_llt.cpp, gpu_cusolver_lu.cpp, gpu_device_matrix.cpp, gpu_library_example.cu Benchmarks: bench_gpu_solvers.cpp, bench_gpu_chaining.cpp, bench_gpu_batching.cpp
This commit is contained in:
@@ -265,23 +265,23 @@ test:linux:x86-64:nvhpc-26.1:default:unsupported:
|
||||
tags:
|
||||
- saas-linux-medium-amd64-gpu-standard
|
||||
|
||||
# GCC-10, CUDA-12.2
|
||||
test:linux:cuda-12.2:gcc-10:
|
||||
# GCC-11, CUDA-12.2
|
||||
test:linux:cuda-12.2:gcc-11:
|
||||
extends: .test:linux:cuda
|
||||
image: nvidia/cuda:12.2.0-devel-ubuntu20.04
|
||||
needs: [ build:linux:cuda-12.2:gcc-10 ]
|
||||
image: nvidia/cuda:12.2.0-devel-ubuntu22.04
|
||||
needs: [ build:linux:cuda-12.2:gcc-11 ]
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: g++-10
|
||||
EIGEN_CI_CC_COMPILER: gcc-10
|
||||
EIGEN_CI_CXX_COMPILER: g++-11
|
||||
EIGEN_CI_CC_COMPILER: gcc-11
|
||||
|
||||
# Clang-12, CUDA-12.2
|
||||
test:linux:cuda-12.2:clang-12:
|
||||
# Clang-14, CUDA-12.2
|
||||
test:linux:cuda-12.2:clang-14:
|
||||
extends: .test:linux:cuda
|
||||
image: nvidia/cuda:12.2.0-devel-ubuntu20.04
|
||||
needs: [ build:linux:cuda-12.2:clang-12 ]
|
||||
image: nvidia/cuda:12.2.0-devel-ubuntu22.04
|
||||
needs: [ build:linux:cuda-12.2:clang-14 ]
|
||||
variables:
|
||||
EIGEN_CI_CXX_COMPILER: clang++-12
|
||||
EIGEN_CI_CC_COMPILER: clang-12
|
||||
EIGEN_CI_CXX_COMPILER: clang++-14
|
||||
EIGEN_CI_CC_COMPILER: clang-14
|
||||
|
||||
|
||||
##### arm ######################################################################
|
||||
|
||||
Reference in New Issue
Block a user