Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (3.9%) to scientific vocabulary
Keywords
Repository
Offload Eigen operations to GPUs
Basic Info
Statistics
- Stars: 18
- Watchers: 4
- Forks: 6
- Open Issues: 6
- Releases: 3
Topics
Metadata Files
README.md
EigenCuda
Offload the Eigen3 matrix matrix multiplication to an Nvidia GPU using cublas.
CMake Installation
To compile execute:
cmake -H. -Bbuild && cmake --build build
To Debug compile as:
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug && cmake --build build
Dependencies
This packages assumes that you have installed the following packages:
Usage
Matrix Multiplication
```cpp
include "eigencuda.hpp"
include "cudapipeline.hpp"
using eigencuda::CudaPipeline; using eigencuda::CudaMatrix;
// Call the class to handle GPU resources CudaPipeline cuda_pip;
Eigen::MatrixXd A = Eigen::MatrixXd::Zero(2, 2); Eigen::MatrixXd B = Eigen::MatrixXd::Zero(3, 2); Eigen::MatrixXd C = Eigen::MatrixXd::Zero(3, 2); Eigen::MatrixXd D = Eigen::MatrixXd::Zero(3, 2); Eigen::MatrixXd X = Eigen::MatrixXd::Zero(3, 2); Eigen::MatrixXd Y = Eigen::MatrixXd::Zero(3, 2); Eigen::MatrixXd Z = Eigen::MatrixXd::Zero(3, 2);
// Define matrices A << 1., 2., 3., 4.; B << 5., 6., 7., 8., 9., 10.; C << 9., 10., 11., 12., 13., 14.; D << 13., 14., 15., 16., 17., 18.; X << 23., 34., 31., 46., 39., 58.; Y << 39., 58., 47., 70., 55., 82.; Z << 55., 82., 63., 94., 71., 106.;
std::vectorEigen::MatrixXd tensor{B, C, D}; std::vectorEigen::MatrixXd results(3, Eigen::MatrixXd::Zero(3, 2)); CudaMatrix cumaA{A, cudapip.getstream()}; CudaMatrix cumaB{3, 2, cudapip.getstream()}; CudaMatrix cumaC{3, 2, cudapip.get_stream()};
for (Index i = 0; i < 3; i++) { cumaB.copytogpu(tensor[i]); cudapip.gemm(cumaB, cumaA, cumaC); results[i] = cumaC; } // Expected results bool pred1 = X.isApprox(results[0]); bool pred2 = Y.isApprox(results[1]); bool pred_3 = Z.isApprox(results[2]); } ```
Owner
- Name: NLESC-JCER
- Login: NLESC-JCER
- Kind: organization
- Repositories: 13
- Profile: https://github.com/NLESC-JCER
GitHub Events
Total
- Watch event: 2
- Fork event: 1
Last Year
- Watch event: 2
- Fork event: 1