Skip to content

Support of AMD GPUs - #3083

Open
amontoison wants to merge 10 commits into
ERGO-Code:latestfrom
amontoison:amd_gpu
Open

Support of AMD GPUs#3083
amontoison wants to merge 10 commits into
ERGO-Code:latestfrom
amontoison:amd_gpu

Conversation

@amontoison

@amontoison amontoison commented Jun 23, 2026

Copy link
Copy Markdown

Adds support for running the first-order PDLP solver on AMD GPUs via HIP/ROCm, alongside the existing NVIDIA/CUDA backend.

The vendor-specific GPU code is refactored behind a thin portability layer so the same sources compile for both, selected at configure time.

  • AMD (HIP / ROCm)
cmake -S . -B build -DHIPDLP_HIP=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --target highs --parallel
  • NVIDIA (CUDA) - unchanged
cmake -S . -B build -DCUPDLP_GPU=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --target highs --parallel

@jajhall I got the green light from AMD to help for the maintenance of the HIP / ROCm backend in HiGHS.

I added a workflow to test the compilation with AMD libraries, it passed:
https://github.com/ERGO-Code/HiGHS/actions/runs/27993664916/job/82851309388?pr=3083

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.55102% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.26%. Comparing base (f1de972) to head (e26d31f).
⚠️ Report is 928 commits behind head on latest.

Files with missing lines Patch % Lines
examples/call_highs_hipdlp.cpp 77.55% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3083      +/-   ##
==========================================
+ Coverage   73.16%   73.26%   +0.10%     
==========================================
  Files         430      446      +16     
  Lines      103967   108156    +4189     
  Branches    16719    17329     +610     
==========================================
+ Hits        76067    79245    +3178     
- Misses      27624    28635    +1011     
  Partials      276      276              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jajhall
jajhall requested a review from galabovaa June 23, 2026 15:20
@jajhall jajhall self-assigned this Jun 23, 2026
@jajhall

jajhall commented Jun 23, 2026

Copy link
Copy Markdown
Member

Many thanks @amontoison!

We'll leave this for v1.16, so we don't introduce too many changes into v1.15. That said, we expect v1.16 to follow fairly soon - once users have had the chance to experiment with the parallel MIP solver (which will not be the default). Hence v1.16 will have parallel MIP by default, and AMD GPU!

@galabovaa

Copy link
Copy Markdown
Contributor

Hi @amontoison, Would it be possible for you to merge latest in, and give it another quick test on AMD, so we can merge the PR?

@amontoison

amontoison commented Aug 21, 2026

Copy link
Copy Markdown
Author

Hello @galabovaa, I can do that next Tuesday (25/08/2026), is it fine for you or do you plan to do the new release before?

@galabovaa

Copy link
Copy Markdown
Contributor

Tuesday is fine, we don't plan to do a release in the next few weeks so no rush! Whenever you have some spare time. Thank you!

Comment thread docs/src/installation.md Outdated
@amontoison amontoison changed the title Proof of concept for the support of AMD GPUs Support of AMD GPUs Aug 30, 2026
@amontoison

amontoison commented Aug 30, 2026

Copy link
Copy Markdown
Author

@galabovaa
I added an example and documentation. 💪
I will test / validate on various AMD architectures next week.

The PR is ready for a review.

Off-topic -- I have these compilation warnings with amdclang++:

/home/montoison/HiGHS/highs/model/HighsHessian.cpp:677:63: warning: variable 'index' is uninitialized when passed as a const pointer argument
      here [-Wuninitialized-const-pointer]
  677 |   return this->call_(kHessianOracleCallTypeProduct,[ 28%] Building CXX object highs/CMakeFiles/highs.dir/pdlp/CupdlpWrapper.cpp.o
 &num_nz, &index, &value,
      |                                                               ^~~~~
/home/montoison/HiGHS/highs/model/HighsHessian.cpp:677:71: warning: variable 'value' is uninitialized when passed as a const pointer argument
      here [-Wuninitialized-const-pointer]
  677 |   return this->call_(kHessianOracleCallTypeProduct, &num_nz, &index, &value,
      |        

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.

3 participants