Skip to content

Comments

HIP#647

Merged
neworderofjamie merged 25 commits intomasterfrom
hip
Jan 28, 2025
Merged

HIP#647
neworderofjamie merged 25 commits intomasterfrom
hip

Conversation

@neworderofjamie
Copy link
Contributor

@neworderofjamie neworderofjamie commented Jan 6, 2025

So, HIP is a clone of CUDA with all the functions and types prefixed with hip instead of cuda. This means it's much closer to CUDA than e.g. OpenCL so I have added another layer of abstraction between BackendSIMT and the CUDA backend - BackendCUDAHIP - to reflect this. The CUDA and HIP backends are then derived off this and provide virtuals which provide the prefixes for the various libraries and do anything that actually involves interfacing with the device (getting cudaDeviceProp). Other than that heavy-lifting, this PR:

  • Removes OpenCL - it was never supported well enough by anyone to be worthwhile and it hadn't been updated to GeNN 5 anyway
  • Does some fancy pytest stuff to the feature tests so which backends to test is determined automatically (my workstation has HIP installed and all feature tests run correctly)

This is the type of change that is going to be absolutely horrible to merge other stuff onto so, while this isn't really ready for anyone to use until I get to test on an actual AMD card, I'd like to get it merged so I can do other things. It definitely doesn't break CUDA and the HIP backend works fine with the NVIDIA backend which basically just renamed everything back.

@codecov
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

Attention: Patch coverage is 80.79191% with 228 lines in your changes missing coverage. Please review.

Project coverage is 88.62%. Comparing base (ebdeeac) to head (54101ca).
Report is 37 commits behind head on master.

Files with missing lines Patch % Lines
src/genn/genn/code_generator/backendCUDAHIP.cc 86.18% 117 Missing ⚠️
src/genn/backends/hip/backend.cc 68.01% 79 Missing ⚠️
include/genn/genn/code_generator/backendCUDAHIP.h 54.09% 28 Missing ⚠️
src/genn/genn/code_generator/backendBase.cc 81.25% 3 Missing ⚠️
src/genn/backends/hip/optimiser.cc 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #647      +/-   ##
==========================================
- Coverage   88.94%   88.62%   -0.33%     
==========================================
  Files         106      111       +5     
  Lines       14786    15062     +276     
==========================================
+ Hits        13152    13348     +196     
- Misses       1634     1714      +80     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from improved_heterogeneity to master January 6, 2025 18:21
Copy link
Member

@tnowotny tnowotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this makes sense & let's hope that HIP has a future and is not replaced by yet another API ...

@neworderofjamie neworderofjamie merged commit 3704a7d into master Jan 28, 2025
1 of 3 checks passed
@neworderofjamie neworderofjamie deleted the hip branch January 28, 2025 19:13
This was referenced Sep 12, 2025
@neworderofjamie neworderofjamie mentioned this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants