[FEA]: Support inheritance from Buffer
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start by locating cuda.core's Buffer implementation and its from_handle() and _reduce_helper() methods, then inspect how returned instances are constructed. Review the related issue #750 and relevant Buffer behavior; done when subclasses inherit both methods and receive subclass instances without breaking existing Buffer behavior.
Written by the indexing model from the issue text.
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.
nvmath-python is considering creating a subclass of Buffer specific to NVSHMEM because we want to mostly follow cuda.core's semantics for Buffer/MemoryResource, but need some different behavior regarding garbage collection.
Describe the solution you'd like
Buffer should use classmethod instead of staticmethod for all methods that return an instance of the class. i.e. from_handle() and _reduce_helper()
Describe alternatives you've considered
Composing Buffer with our Buffer.
Replicating the Buffer protocol with an unrelated class.
Rolling our own MemoryResource/Buffer abstraction that is unique to nvmath's distributed APIs.
Additional context
Related to: https://github.com/NVIDIA/cuda-python/issues/750
- Dominant language
- Cython
- Stars
- 3.4k
- Forks
- 329
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 113
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-python
-
bug cuda.core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NVIDIA/cuda-python#2886 · 1 comment ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NVIDIA/cuda-python#2717 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
NVIDIA/cuda-python#2712 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
-
CI/CD
NVIDIA/cuda-python#2926 · 1 assignee ·
All issues in NVIDIA/cuda-python
Similar issues
-
bug customer-eng Durable Agents Inngest status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
integration: elevenlabs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
home-assistant/core#182944 · 1 comment ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·