Skip to content

Conversation

@phambinhfin
Copy link

…tion

Problem:

  • BLAS and SOLVER handle pools were sharing the same static singleton instance
  • C++ template instantiation created only one pool when HandleType/StreamType were identical
  • This caused resource contamination between hipBLAS and hipSOLVER operations
  • Led to potential memory corruption and unexpected GPU library behavior

Solution:

  • Added Tag template parameter to HandlePool class with default DefaultTag
  • Introduced BlasTag and SolverTag for unique pool instantiations
  • Updated all handle pool typedefs to use three-argument template
  • Each tag type now gets its own static singleton pool instance

@phambinhfin phambinhfin requested a review from a team as a code owner August 1, 2025 08:24
@phambinhfin phambinhfin assigned phambinhfin and Arech8 and unassigned phambinhfin and Arech8 Aug 1, 2025
@phambinhfin phambinhfin force-pushed the phambinh/handle-pool-singleton-separation branch from 33c4da7 to 09f9ed0 Compare August 1, 2025 08:30
@phambinhfin phambinhfin force-pushed the phambinh/handle-pool-singleton-separation branch 4 times, most recently from 2b8cd1b to 7b8bf77 Compare August 1, 2025 10:17
…tion

Problem:
- BLAS and SOLVER handle pools were sharing the same static singleton instance
- C++ template instantiation created only one pool when HandleType/StreamType were identical
- This caused resource contamination between hipBLAS and hipSOLVER operations
- Led to potential memory corruption and unexpected GPU library behavior

Solution:
- Added Tag template parameter to HandlePool class with default DefaultTag
- Introduced BlasTag and SolverTag for unique pool instantiations
- Updated all handle pool typedefs to use three-argument template
- Each tag type now gets its own static singleton pool instance
@phambinhfin phambinhfin force-pushed the phambinh/handle-pool-singleton-separation branch from 7b8bf77 to d08b600 Compare August 1, 2025 10:19
@phambinhfin
Copy link
Author

Prefer the solution : https://github.com/ROCm/jax/pull/525/files

@Arech8
Copy link

Arech8 commented Aug 1, 2025

Yeah, #525 is better. I think this one can just be discarded

@Arech8
Copy link

Arech8 commented Aug 11, 2025

@phambinhfin please close the PR and delete the branch if it's not needed anymore

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.

5 participants