Skip to content

[RFC] AMD support for DGL #7919

@jamesETsmith

Description

@jamesETsmith

🚀 Feature Proposal RFC

Adding support for AMD’s CDNA GPUs to DGL.

Motivation/Goals

Pitch

Our primary hipification strategy was the following:

  • Adding a header file (what we called a header shim) that used preprocessor statements to replace cuda calls with their corresponding rocm ones
  • Where that wasn’t possible, I tried to use namespace aliases and the like to the header include sections of source files
  • As a last resort, we used macros in the source code, but this was only necessary in a handful of cases

Our aim was to limit source code changes where possible and try to contain most changes to the #include section of source files.

Alternatives

Several contributors to this work explored using source code generation and pre-build hipification (using scripts to hipify the source code). See this DGL fork and this RFC posted to DGL several years ago.

We felt that it was important that individual users/developers could clone the source code and not have to hipfy them, but otherwise our changes are similar to those in the DGL fork mentioned above. @GMNGeoffrey who was the primary maintainer of that fork and author of the previous RFC was huge help during this work.

Additional Context

@Rhett-Ying and @BarclayII, I'm happy to happy to elaborate on any points here or even set up an offline meeting if that would be preferred. Please let us know what you think. If there are other developers, I should tag or loop into this discussion, please let me know.

All the best,
James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions