Skip to content

[FEA]: Support inheritance from Buffer #2435

Description

@carterbox

Is this a duplicate?

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: #750

Metadata

Metadata

Assignees

No one assigned

    Labels

    cuda.coreEverything related to the cuda.core moduletriageNeeds the team's attention

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions