-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
P1Medium priority - Should doMedium priority - Should docuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvementstriageNeeds the team's attentionNeeds the team's attention
Milestone
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct
Area
cuda.core
Is your feature request related to a problem? Please describe.
Both cupy and pytorch define __hash__()
methods which use the pointer address (and sometimes device index) of the underlying CUDA API structure such two Python level objects which represent the same underlying CUDA API structure will hash the same.
https://github.com/pytorch/pytorch/blob/v2.7.0/torch/cuda/streams.py#L14
https://github.com/cupy/cupy/blob/v13.4.1/cupy/cuda/stream.pyx
Describe the solution you'd like
cuda.core should also implement __hash__()
such that caching and comparison are easier to implement.
Describe alternatives you've considered
No response
Additional context
No response
leofang
Metadata
Metadata
Assignees
Labels
P1Medium priority - Should doMedium priority - Should docuda.coreEverything related to the cuda.core moduleEverything related to the cuda.core moduleenhancementAny code-related improvementsAny code-related improvementstriageNeeds the team's attentionNeeds the team's attention
Type
Projects
Status
Todo