Skip to content

Commit

Permalink
Merge pull request #513 from daineAMD/master
Browse files Browse the repository at this point in the history
merge staging 5b1d8ff into master on Conditional GO from CQE#515
  • Loading branch information
daineAMD authored Aug 24, 2022
2 parents 08619c9 + 98f192a commit 587bfbe
Show file tree
Hide file tree
Showing 38 changed files with 9,532 additions and 5,117 deletions.
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# are installed, and if so, uses the installed version to format
# the staged changes.

export PATH=/opt/rocm/llvm/bin:/opt/rocm/hcc/bin:/usr/bin:/bin
export PATH=/opt/rocm/llvm/bin:/usr/bin:/bin

# Redirect stdout to stderr.
exec >&2
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @amcamd @TorreZuk @mahmoodw @daineAMD @bragadeesh @NaveenElumalaiAMD @rkamd
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ include( ROCMInstallSymlinks )
include( ROCMClients )
include( ROCMHeaderWrapper )

set ( VERSION_STRING "0.52.0" )
set ( VERSION_STRING "0.53.0" )
rocm_setup_version( VERSION ${VERSION_STRING} )

if( NOT DEFINED ENV{HIP_PATH})
Expand Down Expand Up @@ -193,7 +193,7 @@ endif( )

# Package specific CPACK vars
if( NOT USE_CUDA )
rocm_package_add_dependencies(DEPENDS "rocblas >= 2.45.0" "rocsolver >= 3.19.0")
rocm_package_add_dependencies(DEPENDS "rocblas >= 2.46.0" "rocsolver >= 3.20.0")
endif( )

set( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md" )
Expand Down
2 changes: 1 addition & 1 deletion clients/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if( NOT USE_CUDA )
target_link_libraries( hipblas-bench PRIVATE hip::${CUSTOM_TARGET} )
endif()

if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$|.*/hipcc$" )
if( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
# hip-clang needs specific flag to turn on pthread and m
target_link_libraries( hipblas-bench PRIVATE -lpthread -lm )

Expand Down
9 changes: 9 additions & 0 deletions clients/benchmarks/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@
#include "testing_trtri_strided_batched.hpp"
// solver functions
#ifdef __HIP_PLATFORM_SOLVER__
#include "testing_gels.hpp"
#include "testing_gels_batched.hpp"
#include "testing_gels_strided_batched.hpp"
#include "testing_geqrf.hpp"
#include "testing_geqrf_batched.hpp"
#include "testing_geqrf_strided_batched.hpp"
Expand Down Expand Up @@ -512,6 +515,9 @@ struct perf_blas<T, U, std::enable_if_t<std::is_same<T, float>{} || std::is_same
{"getrs", testing_getrs<T>},
{"getrs_batched", testing_getrs_batched<T>},
{"getrs_strided_batched", testing_getrs_strided_batched<T>},
{"gels", testing_gels<T>},
{"gels_batched", testing_gels_batched<T>},
{"gels_strided_batched", testing_gels_strided_batched<T>},
#endif

// Aux
Expand Down Expand Up @@ -732,6 +738,9 @@ struct perf_blas<
{"getrs", testing_getrs<T>},
{"getrs_batched", testing_getrs_batched<T>},
{"getrs_strided_batched", testing_getrs_strided_batched<T>},
{"gels", testing_gels<T>},
{"gels_batched", testing_gels_batched<T>},
{"gels_strided_batched", testing_gels_strided_batched<T>},
#endif
};
run_function(map, arg);
Expand Down
114 changes: 114 additions & 0 deletions clients/common/cblas_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,51 @@ void zgeqrf_(int* m,
int* lwork,
int* info);

void sgels_(char* trans,
int* m,
int* n,
int* nrhs,
float* A,
int* lda,
float* B,
int* ldb,
float* work,
int* lwork,
int* info);
void dgels_(char* trans,
int* m,
int* n,
int* nrhs,
double* A,
int* lda,
double* B,
int* ldb,
double* work,
int* lwork,
int* info);
void cgels_(char* trans,
int* m,
int* n,
int* nrhs,
hipblasComplex* A,
int* lda,
hipblasComplex* B,
int* ldb,
hipblasComplex* work,
int* lwork,
int* info);
void zgels_(char* trans,
int* m,
int* n,
int* nrhs,
hipblasDoubleComplex* A,
int* lda,
hipblasDoubleComplex* B,
int* ldb,
hipblasDoubleComplex* work,
int* lwork,
int* info);

void spotrf_(char* uplo, int* m, float* A, int* lda, int* info);
void dpotrf_(char* uplo, int* m, double* A, int* lda, int* info);
void cpotrf_(char* uplo, int* m, hipblasComplex* A, int* lda, int* info);
Expand Down Expand Up @@ -3699,3 +3744,72 @@ int cblas_geqrf<hipblasDoubleComplex>(int m,
zgeqrf_(&m, &n, A, &lda, tau, work, &lwork, &info);
return info;
}

// gels
template <>
int cblas_gels<float>(char trans,
int m,
int n,
int nrhs,
float* A,
int lda,
float* B,
int ldb,
float* work,
int lwork)
{
int info;
sgels_(&trans, &m, &n, &nrhs, A, &lda, B, &ldb, work, &lwork, &info);
return info;
}

template <>
int cblas_gels<double>(char trans,
int m,
int n,
int nrhs,
double* A,
int lda,
double* B,
int ldb,
double* work,
int lwork)
{
int info;
dgels_(&trans, &m, &n, &nrhs, A, &lda, B, &ldb, work, &lwork, &info);
return info;
}

template <>
int cblas_gels<hipblasComplex>(char trans,
int m,
int n,
int nrhs,
hipblasComplex* A,
int lda,
hipblasComplex* B,
int ldb,
hipblasComplex* work,
int lwork)
{
int info;
cgels_(&trans, &m, &n, &nrhs, A, &lda, B, &ldb, work, &lwork, &info);
return info;
}

template <>
int cblas_gels<hipblasDoubleComplex>(char trans,
int m,
int n,
int nrhs,
hipblasDoubleComplex* A,
int lda,
hipblasDoubleComplex* B,
int ldb,
hipblasDoubleComplex* work,
int lwork)
{
int info;
zgels_(&trans, &m, &n, &nrhs, A, &lda, B, &ldb, work, &lwork, &info);
return info;
}
Loading

0 comments on commit 587bfbe

Please sign in to comment.