Skip to content

Add Cooperative Groups API integration#87

Open
thedodd wants to merge 1 commit intoRust-GPU:mainfrom
thedodd:cooperative-groups-1
Open

Add Cooperative Groups API integration#87
thedodd wants to merge 1 commit intoRust-GPU:mainfrom
thedodd:cooperative-groups-1

Conversation

@thedodd
Copy link
Contributor

@thedodd thedodd commented Sep 16, 2022

This works as follows:

  • Users build their Cuda code via CudaBuilder as normal.
  • If they want to use the cooperative groups API, then in their build.rs, just after building their PTX, they will:
    • Create a cuda_builder::cg::CooperativeGroups instance,
    • Add any needed opts for building the Cooperative Groups API bridge code (-arch=sm_* and so on),
    • Add their newly built PTX code to be linked with the CG API, which can include multiple PTX, cubin or fatbin files,
    • Call .compile(..), which will spit out a fully linked cubin,
  • In the user's main application code, instead of using launch! to schedule their GPU work, they will now use launch_cooperative!.

todo

  • Update cust to expose the cuLaunchCooperativeKernel in a nice interface. We can add the cooperative multi device bits later, along with all of the other bits from the cooperative API.
  • Update cuda_builder crate to expose a nice API around linking PTX code with the Cooperative Groups API bridge code.
  • Remove the Justfile. I was only using it for POC testing.
  • Remove the PTX code from this branch, currently it is just here for reference.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants