-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5253 from multitalentloes/script_test
Add HIP support
- Loading branch information
Showing
13 changed files
with
239 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# the script is intended to be run like this: bash hipify_file.sh ${PROJECT_BUILD_DIR} ${PROJECT_BINARY_DIR} | ||
# it should be run automatically on the correct files through cmake | ||
input_file=$1 | ||
output_file=$2 | ||
|
||
# make sure the output folder exists | ||
mkdir -p $(dirname $output_file) | ||
|
||
# hipify out-of-place | ||
hipify-perl $input_file > $output_file | ||
|
||
# expand includes so we only need include_directories (path to hip) | ||
sed -i 's/^#include <hipblas\.h>/#include <hipblas\/hipblas.h>/g' $output_file | ||
sed -i 's/^#include <hipsparse\.h>/#include <hipsparse\/hipsparse.h>/g' $output_file | ||
# make sure includes refer to hipistl/ files (the ones that are also hipified) | ||
sed -i 's/cuistl\//hipistl\//g' $output_file | ||
|
||
echo "$output_file hipified" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ set (opm-simulators_CONFIG_VAR | |
HAVE_SUITESPARSE_UMFPACK | ||
HAVE_DAMARIS | ||
HAVE_HDF5 | ||
USE_HIP | ||
USE_TRACY | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.