Skip to content

CUDA Graph phase 3 - memcpy nodes #1314

Closed

Description

@rparolin

Cover cuMemcpyAsync and cover cuMemsetAsync.

https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g5f26aaf5582ade791e5688727a178d78

cuMemsetAsync has multiple bit-width APIs. We can wrap them nicely from the python side so the user doesn't need to worry about what bit-width variant they need to call.

https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g7d805e610054392a4d11e8a8bf5eb35c

Activity

  1. added this to the cuda.core beta 10 milestone on Dec 4, 2025
  2. changed the title [-]CUDA Graph - memcpy nodes[/-] [+]CUDA Graph phase 3 - memcpy nodes[/+] on Dec 4, 2025
  3. added
    P0High priority - Must do!
    and removed
    triageNeeds the team's attention
    on Dec 4, 2025
  4. Andy-Jost commented on Dec 4, 2025

    @Andy-Jost
    Contributor

    Is cuMempyAsync covered by Buffer.copy_to and Buffer.copy_from or is something special needed for graphs?

    Could we similarly cover cuMemsetAsync by adding a method to Buffer?

  5. rparolin commented on Dec 4, 2025

    @rparolin
    CollaboratorAuthor

    Is cuMempyAsync covered by Buffer.copy_to and Buffer.copy_from or is something special needed for graphs?
    @leofang please advise.

    Could we similarly cover cuMemsetAsync by adding a method to Buffer?
    Yes, that's my understanding. We could have a call fill or clear ?

  6. Andy-Jost commented on Dec 4, 2025

    @Andy-Jost
    Contributor

    Ok, follow-up question:

    We can wrap them nicely from the python side so the user doesn't need to worry about what bit-width variant they need to call

    How do we envision this working? If someone says buf.fill(1) we still don't have information about the intended bit-width. Are we thinking something like buf.fill(value=1, width=4) ?

    If the type is a specific NumPy dtype we can do it automatically. Is there a precedent for anything like that, or do we have a list of frameworks/dtypes that we support?

  7. Andy-Jost commented on Dec 4, 2025

    @Andy-Jost
    Contributor

    Please see the attached draft PR. Is that what we have in mind for Buffer.fill?

  8. leofang commented on Dec 8, 2025

    @leofang
    Member

    Sorry for late reply. Continuing the discussion in your PR 🙂 #1318 (comment)

  9. leofang commented on Dec 15, 2025

    @leofang
    Member

    @Andy-Jost can correct me if I am wrong, but I think this is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0High priority - Must do!

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions