Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIP HAT backend #254

Open
wants to merge 4 commits into
base: code-reflection
Choose a base branch
from

Conversation

iotamudelta
Copy link

@iotamudelta iotamudelta commented Oct 14, 2024

  • Use the C99 code path to generate HIP-compliant kernel code.
  • Runtime compilation through hipRTC.
  • Use standard HIP malloc/free, device inspection for infrastructure.
  • Integrate into HAT compilation and examples.
  • Confirmed to work on AMD Radeon RX 68000XT w/ ROCm 6.2.2

hipinfo output:

Using device 0: AMD Radeon RX 6800 XT
HIP Device has major=10 minor=3 compute capability
HIP Device has wave front size 32
HIP Device has threadsPerBlock 1024
HIP Cores 36
Total amount of global memory: 17163091968
64-bit Memory Address: YES

mandel example:


                          ......................................
                         .......................................
                       .........................................
                       .........................................
                      ..........................................
                     ...........................................
                    ............................................
                   .............................................
                   .............................................
                  ..............................................
                 ................................. ..,..........
                 .................................,,,,..........
                ..................................,:,...........
                ................................,,: :...........
               ................................::,* :,,.........
               .................................,     ,.........
              .................................,:    -,.........
              ............................,...,,,    :,,.....,..
              ..........................,::,,:: --  -#,,#,...:..
             ...........................,,  ,:           ,,:,:,.
             ...........................,:                ,  ,,.
             ...........................,,:                  :..
            ..........................,::                   ,,..
            ..............,...........,,                     *..
            ...............,...,......,:                     :,,
            ...............,,,,,,,,,,,,                       +:
            ...............,,+,, ,-,,,*                       ,.
           ................,:       ,,                        @.
           ...............,,        #,                        ,.
           ............,,,,:         :                        ,.
           ............,-:,                                   ..
           ...........,::                                    ,..
                                                           :,...
           ...........,::                                    ,..
           ............,-:,                                   ..
           ............,,,,:         :                        ,.
           ...............,,        #,                        ,.
           ................,:       ,,                        @.
            ...............,,+,, ,-,,,*                       ,.
            ...............,,,,,,,,,,,,                       +:
            ...............,...,......,:                     :,,
            ..............,...........,,                     *..
            ..........................,::                   ,,..
             ...........................,,:                  :..
             ...........................,:                ,  ,,.
             ...........................,,  ,:           ,,:,:,.
              ..........................,::,,:: --  -#,,#,...:..
              ............................,...,,,    :,,.....,..
              .................................,:    -,.........
               .................................,     ,.........
               ................................::,* :,,.........
                ................................,,: :...........
                ..................................,:,...........
                 .................................,,,,..........
                 ................................. ..,..........
                  ..............................................
                   .............................................
                   .............................................
                    ............................................
                     ...........................................
                      ..........................................
                       .........................................
                       .........................................
                         .......................................

Progress

  • Change must not contain extraneous whitespace

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/254/head:pull/254
$ git checkout pull/254

Update a local copy of the PR:
$ git checkout pull/254
$ git pull https://git.openjdk.org/babylon.git pull/254/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 254

View PR using the GUI difftool:
$ git pr show -t 254

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/254.diff

Using Webrev

Link to Webrev Comment

iotamudelta and others added 2 commits October 11, 2024 08:57
* Use the C99 code path to generate HIP-compliant kernel code.
* Compile code using runtime compilation through hipRTC.
* Use standard HIP malloc/free, device inspection for infrastructure.
* Integrate into HAT compilation and examples.
* Confirmed to work on AMD Radeon RX 68000XT w/ ROCm 6.2.2

hipinfo output:
> Using device 0: AMD Radeon RX 6800 XT
> HIP Device has major=10 minor=3 compute capability
> HIP Device has wave front size 32
> HIP Device has threadsPerBlock 1024
> HIP Cores 36
  Total amount of global memory:   17163091968
  64-bit Memory Address:           YES

mandel example:

                          ......................................
                         .......................................
                       .........................................
                       .........................................
                      ..........................................
                     ...........................................
                    ............................................
                   .............................................
                   .............................................
                  ..............................................
                 ................................. ..,..........
                 .................................,,,,..........
                ..................................,:,...........
                ................................,,: :...........
               ................................::,* :,,.........
               .................................,     ,.........
              .................................,:    -,.........
              ............................,...,,,    :,,.....,..
              ..........................,::,,:: --  -#,,#,...:..
             ...........................,,  ,:           ,,:,:,.
             ...........................,:                ,  ,,.
             ...........................,,:                  :..
            ..........................,::                   ,,..
            ..............,...........,,                     *..
            ...............,...,......,:                     :,,
            ...............,,,,,,,,,,,,                       +:
            ...............,,+,, ,-,,,*                       ,.
           ................,:       ,,                        @.
           ...............,,        #,                        ,.
           ............,,,,:         :                        ,.
           ............,-:,                                   ..
           ...........,::                                    ,..
                                                           :,...
           ...........,::                                    ,..
           ............,-:,                                   ..
           ............,,,,:         :                        ,.
           ...............,,        #,                        ,.
           ................,:       ,,                        @.
            ...............,,+,, ,-,,,*                       ,.
            ...............,,,,,,,,,,,,                       +:
            ...............,...,......,:                     :,,
            ..............,...........,,                     *..
            ..........................,::                   ,,..
             ...........................,,:                  :..
             ...........................,:                ,  ,,.
             ...........................,,  ,:           ,,:,:,.
              ..........................,::,,:: --  -#,,#,...:..
              ............................,...,,,    :,,.....,..
              .................................,:    -,.........
               .................................,     ,.........
               ................................::,* :,,.........
                ................................,,: :...........
                ..................................,:,...........
                 .................................,,,,..........
                 ................................. ..,..........
                  ..............................................
                   .............................................
                   .............................................
                    ............................................
                     ...........................................
                      ..........................................
                       .........................................
                       .........................................
                         .......................................
@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Oct 14, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2024

Hi @iotamudelta, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user iotamudelta" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Oct 14, 2024

@iotamudelta This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

HIP HAT backend

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the code-reflection branch:

  • 18627a6: Move code reflection API into incubating module
  • 86dfc36: Aggregated work on Verifier and BytecodeLift deconstruction

Please see this link for an up-to-date comparison between the source branch of this pull request and the code-reflection branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@iotamudelta
Copy link
Author

/signed

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Oct 14, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 14, 2024

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 11, 2024

@iotamudelta This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@iotamudelta
Copy link
Author

Still waiting on OCA.

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Nov 15, 2024
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 15, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 15, 2024

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Pull request is ready to be integrated rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant