-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
awaiting-responseFurther information is requestedFurther information is requestedtriageNeeds the team's attentionNeeds the team's attention
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.bindings
Is your feature request related to a problem? Please describe.
In cuda.bindings, seems nothing have __eq__
implemented, so ==
falls back to 'is'. If a user use something like 'cuda.bindings.runtime.cudaFree(0) == cuda.bindings.runtime.cudaError_t.cudaSuccess', he/she will always get False because of the comparison. While converting them to int before comparison works, it's very counter-intuitive.
Besides error code, other objects suffers from the same problem. For instance, if we call cuCtxGetCurrent() twice, we will get two different objects, and == will give False, even if the underlying C handle is the same.
Describe the solution you'd like
We need __eq__
for all resource handle objects.
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
awaiting-responseFurther information is requestedFurther information is requestedtriageNeeds the team's attentionNeeds the team's attention