Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With hypre #751

Closed
wants to merge 19 commits into from
Closed

With hypre #751

wants to merge 19 commits into from

Conversation

oseikuffuor1
Copy link
Collaborator

This PR enables integrating hypre into BML to allow BML to access hypre's GPU capable sparse linear algebra routines, particularly, matrix multiplication and matrix addition.

  • The approach should allow BML to use hypre for sparse linear algebra operations on NVIDIA, AMD and Intel GPUs. However, the current implementation targets NVIDIA GPUs. Minor edits/ additions are necessary to support AMD.
  • Currently, hypre can be build in one precision at a time, so bml tests for multiple precisions will only pass for the precision for which hypre was built (if BML is built with hypre support).

NOTE: Code currently supports only one precision build of hypre, so the
integration is compatible with hypre built in single or double precision only.
This effort enables use of hypre for matrix multiplication and addition on GPUs.
It relies on openMP offload to transfer BML data to hypre.
NOTE: Current implementation supports NVIDIA GPUs.
Copy link
Collaborator

@jeanlucf22 jeanlucf22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to squash commits too

CMakeLists.txt Outdated Show resolved Hide resolved
src/C-interface/ellpack/bml_multiply_ellpack_typed.c Outdated Show resolved Hide resolved
// Done with matrix multiplication.
// Update ellpack C matrix (on device): copy from csr to ellpack format
/*
#pragma omp target data use_device_ptr(csrRowPtrC,csrColIndC,csrValC)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean up comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented section is actually what is needed for AMD. I left that in there as a place holder for now. I have updated the comments to reflect this.

…tion in hypre.

* This effort enables use of hypre for matrix multiplication and addition on GPUs.
* It relies on openMP offload to transfer BML data to hypre.
* NOTE: Current implementation supports NVIDIA GPUs.
* NOTE: Code currently supports only one precision build of hypre, so the
integration is compatible with hypre built in single or double precision only.
parent fa390fd
author Daniel Osei-Kuffuor <oseikuffuor1@llnl.gov> 1697604624 -0700
committer Daniel Osei-Kuffuor <oseikuffuor1@llnl.gov> 1710920233 -0700
@oseikuffuor1
Copy link
Collaborator Author

@jeanlucf22 commits have been squashed in commit 4a3445d

Thanks.

@nicolasbock
Copy link
Collaborator

Please squash our commits @oseikuffuor1 .

@jeanlucf22
Copy link
Collaborator

@jeanlucf22 commits have been squashed in commit 4a3445d

Thanks

Still appears like multiple commits in PR

@oseikuffuor1
Copy link
Collaborator Author

@jeanlucf22 @nicolasbock the commits are a bit messy now so I will delete this PR and create a new one.

@oseikuffuor1
Copy link
Collaborator Author

Closing this PR in favor of PR#752

@oseikuffuor1 oseikuffuor1 deleted the with-hypre branch March 20, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants