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

Add HIP support #5253

Merged
merged 1 commit into from May 7, 2024
Merged

Add HIP support #5253

merged 1 commit into from May 7, 2024

Conversation

multitalentloes
Copy link

This PR adds support for using hipify on the cuda code to allow for GPU support on both AMD and Nvidia architectures. The HIP code is hidden from the programmer in the build directory, and the cmake adds dependencies to only recompile the necessary files when making changes in the cuda source code.

This PR is still in draft mode as several temporary changes have been made to make a cmake file.

@multitalentloes
Copy link
Author

This code is tested to work on an AMD card. All the cuda tests pass in their hipified form, two are rewritten as they contain types/function that do not exist in HIP.
The CMakeFiles now has a function that handles adding cuda/hip files and translates when necessary.
The CMake has one new option for compiling to AMD hardware, and the version is increase from 3.1 as we need HIP as a language.

@multitalentloes multitalentloes marked this pull request as ready for review April 30, 2024 13:32
@akva2
Copy link
Member

akva2 commented Apr 30, 2024

jenkins build this hip please

2 similar comments
@multitalentloes
Copy link
Author

jenkins build this hip please

@multitalentloes
Copy link
Author

jenkins build this hip please

bin/hipify_file.sh Outdated Show resolved Hide resolved
opm/simulators/linalg/bda/MultisegmentWellContribution.hpp Outdated Show resolved Hide resolved
@multitalentloes multitalentloes force-pushed the script_test branch 5 times, most recently from a2e064a to a624578 Compare May 2, 2024 13:02
@multitalentloes
Copy link
Author

jenkins build this hip please

@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

5 similar comments
@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

@akva2
Copy link
Member

akva2 commented May 2, 2024

jenkins build this serial hip hipify please

@bska bska mentioned this pull request May 3, 2024
@akva2
Copy link
Member

akva2 commented May 3, 2024

jenkins build this serial hip hipify please

@akva2
Copy link
Member

akva2 commented May 6, 2024

jenkins build this hipify please

@akva2
Copy link
Member

akva2 commented May 6, 2024

jenkins build this hipify please

3 similar comments
@multitalentloes
Copy link
Author

jenkins build this hipify please

@multitalentloes
Copy link
Author

jenkins build this hipify please

@akva2
Copy link
Member

akva2 commented May 6, 2024

jenkins build this hipify please

This commits adds cmake functionality that can
hipify the cuistl framework to support AMD GPUs.

Some tests have been written as HIP does not mirror
CUDA exactly.

CONVERT_CUDA_TO_HIP is the new CMAKE argument.
CMAKE version is increased to include HIP
as a language (3.21 required).

A macro is added to create a layer of indirection
that will make only cuistl files that have been
changed rehipified.

Some BDA stuff is extracted to make sure CUDA
is not accidentally included.
@akva2
Copy link
Member

akva2 commented May 6, 2024

jenkins build this hipify hip serial please

1 similar comment
@akva2
Copy link
Member

akva2 commented May 6, 2024

jenkins build this hipify hip serial please

@akva2 akva2 merged commit 66131bd into OPM:master May 7, 2024
1 check passed
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.

None yet

2 participants