Skip to content

Commit

Permalink
Merge pull request #237 from daineAMD/master
Browse files Browse the repository at this point in the history
Merge develop into master for ROCm 3.7 feature complete
  • Loading branch information
daineAMD authored Jul 8, 2020
2 parents cb328a4 + 9627d71 commit abd7261
Show file tree
Hide file tree
Showing 51 changed files with 6,472 additions and 1,750 deletions.
10 changes: 4 additions & 6 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
# are installed, and if so, uses the installed version to format
# the staged changes.

set -x

format=/opt/rocm/hcc/bin/clang-format
export PATH=/usr/bin:/bin:/opt/rocm/llvm/bin:/opt/rocm/hcc/bin

# Redirect stdout to stderr.
exec >&2
Expand Down Expand Up @@ -48,11 +46,11 @@ for file in $files; do
done

# if clang-format exists, run it on C/C++ files
if [[ -x $format ]]; then
if command -v clang-format >/dev/null; then
for file in $files; do
if [[ -e $file ]] && echo $file | grep -Eq '\.c$|\.h$|\.hpp$|\.cpp$|\.cl$|\.h\.in$|\.hpp\.in$|\.cpp\.in$'; then
echo "$format $file"
"$format" -i -style=file "$file"
echo "clang-format $file"
clang-format -i -style=file "$file"
git add -u "$file"
fi
done
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ include( ROCMInstallTargets )
include( ROCMPackageConfigHelpers )
include( ROCMInstallSymlinks )

set ( VERSION_STRING "0.30.0" )
set ( VERSION_STRING "0.32.0" )
rocm_setup_version( VERSION ${VERSION_STRING} )

# Append our library helper cmake path and the cmake path for hip (for convenience)
Expand Down
4 changes: 2 additions & 2 deletions bump_develop_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - run this script in master branch
# - after running this script merge master into develop

OLD_HIPBLAS_VERSION="0.30.0"
NEW_HIPBLAS_VERSION="0.31.0"
OLD_HIPBLAS_VERSION="0.32.0"
NEW_HIPBLAS_VERSION="0.33.0"

sed -i "s/${OLD_HIPBLAS_VERSION}/${NEW_HIPBLAS_VERSION}/g" CMakeLists.txt
4 changes: 2 additions & 2 deletions bump_master_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - after running this script and merging develop into master, run bump_develop_version.sh in master and
# merge master into develop

OLD_HIPBLAS_VERSION="0.29.0"
NEW_HIPBLAS_VERSION="0.30.0"
OLD_HIPBLAS_VERSION="0.31.0"
NEW_HIPBLAS_VERSION="0.32.0"

sed -i "s/${OLD_HIPBLAS_VERSION}/${NEW_HIPBLAS_VERSION}/g" CMakeLists.txt
11 changes: 10 additions & 1 deletion clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,17 @@ set(hipblas_f90_source_clients
include/hipblas_fortran.f90
)

set(hipblas_f90_source_clients_solver
include/hipblas_fortran_solver.f90
)

if( BUILD_CLIENTS_TESTS OR BUILD_CLIENTS_SAMPLES )
add_library(hipblas_fortran_client ${hipblas_f90_source_clients})
if( BUILD_WITH_SOLVER)
add_library(hipblas_fortran_client ${hipblas_f90_source_clients} ${hipblas_f90_source_clients_solver})
else()
add_library(hipblas_fortran_client ${hipblas_f90_source_clients})
endif()

add_dependencies(hipblas_fortran_client hipblas_fortran)
include_directories(${CMAKE_BINARY_DIR}/include)
endif( )
Expand Down
47 changes: 47 additions & 0 deletions clients/common/cblas_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ void zgetrs_(char* trans,
int* ldb,
int* info);

void sgetri_(int* n, float* A, int* lda, int* ipiv, float* work, int* lwork, int* info);
void dgetri_(int* n, double* A, int* lda, int* ipiv, double* work, int* lwork, int* info);
void cgetri_(
int* n, hipblasComplex* A, int* lda, int* ipiv, hipblasComplex* work, int* lwork, int* info);
void zgetri_(int* n,
hipblasDoubleComplex* A,
int* lda,
int* ipiv,
hipblasDoubleComplex* work,
int* lwork,
int* info);

void sgeqrf_(int* m, int* n, float* A, int* lda, float* tau, float* work, int* lwork, int* info);
void dgeqrf_(int* m, int* n, double* A, int* lda, double* tau, double* work, int* lwork, int* info);
void cgeqrf_(int* m,
Expand Down Expand Up @@ -3163,6 +3175,41 @@ int cblas_getrs<hipblasDoubleComplex>(char trans,
return info;
}

// getri
template <>
int cblas_getri<float>(int n, float* A, int lda, int* ipiv, float* work, int lwork)
{
int info;
sgetri_(&n, A, &lda, ipiv, work, &lwork, &info);
return info;
}

template <>
int cblas_getri<double>(int n, double* A, int lda, int* ipiv, double* work, int lwork)
{
int info;
dgetri_(&n, A, &lda, ipiv, work, &lwork, &info);
return info;
}

template <>
int cblas_getri<hipblasComplex>(
int n, hipblasComplex* A, int lda, int* ipiv, hipblasComplex* work, int lwork)
{
int info;
cgetri_(&n, A, &lda, ipiv, work, &lwork, &info);
return info;
}

template <>
int cblas_getri<hipblasDoubleComplex>(
int n, hipblasDoubleComplex* A, int lda, int* ipiv, hipblasDoubleComplex* work, int lwork)
{
int info;
zgetri_(&n, A, &lda, ipiv, work, &lwork, &info);
return info;
}

// geqrf
template <>
int cblas_geqrf<float>(int m, int n, float* A, int lda, float* tau, float* work, int lwork)
Expand Down
Loading

0 comments on commit abd7261

Please sign in to comment.