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

major update #51

Merged
merged 50 commits into from
Sep 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
00e900e
rocsparse_csrmv_analysis_clear() -> rocsparse_csrmv_clear() ; fixed a…
ntrost57 Sep 7, 2018
0bd9004
testing: fixed a bug in unit_check_near()
ntrost57 Sep 7, 2018
70302f8
added zero pivot status and arg check
ntrost57 Sep 7, 2018
56c3714
adding zero pivot detection and lot of comments to csrsv/csrilu0
ntrost57 Sep 7, 2018
1688cfc
Merge branch 'develop' of github.com:ntrost57/rocSPARSE into develop
ntrost57 Sep 7, 2018
ad2b037
tests for csrilu0 and csrsv
ntrost57 Sep 7, 2018
d3d6b8b
csrsv: additional parameter checks
ntrost57 Sep 7, 2018
eae9225
tests: csrsv update
ntrost57 Sep 7, 2018
1be6d8a
tests: csrilu0 arg check
ntrost57 Sep 7, 2018
e626ca0
tests: when m == 0 || nnz == 0 rocsparse_csrsv_zero_pivot() should se…
ntrost57 Sep 7, 2018
cc451d6
csrilu0: zero pivot added
ntrost57 Sep 7, 2018
7d298d4
tests: csrilu0 arg checks and zero pivot checks
ntrost57 Sep 7, 2018
ff0501a
-1 -> 255 in memset
ntrost57 Sep 7, 2018
f4baa6e
fix for hipsparse compatibility (csrsv2)
ntrost57 Sep 10, 2018
75c791d
csrilu0 and csrsv descriptions in header
ntrost57 Sep 10, 2018
b06bb49
documentation added
ntrost57 Sep 11, 2018
c90e508
doc #2
ntrost57 Sep 11, 2018
6f4c1d9
Merge remote-tracking branch 'upstream/develop' into develop
ntrost57 Sep 11, 2018
3330e9f
added csrilu0, csrsv and csrmm to benchmarks
ntrost57 Sep 11, 2018
fe9f985
added comments and clang-format
ntrost57 Sep 11, 2018
80b1fe7
clang-format #2
ntrost57 Sep 11, 2018
fdd6038
clang-format #3
ntrost57 Sep 11, 2018
6b6ae4b
clang-format for clients
ntrost57 Sep 11, 2018
6cc02ba
using fma() in csrmv and ellmv
ntrost57 Sep 12, 2018
ac32c16
version increased to 0.1.3.0
ntrost57 Sep 12, 2018
34d59e0
split up CPU csrsv into lsolve and usolve ; moved both and csrilu0 to…
ntrost57 Sep 12, 2018
e695a0d
added test that performs single preconditioner step My=x (M = incompl…
ntrost57 Sep 12, 2018
c012bac
csrilusv test update
ntrost57 Sep 12, 2018
c55425c
clang format
ntrost57 Sep 12, 2018
3f4ef15
mem leak fix in csr2ell and changed to non-blocking
ntrost57 Sep 13, 2018
31abad1
changed functions from blocking to non-blocking
ntrost57 Sep 13, 2018
aa35b4b
hybmv/coomv buffer in handle (~24kbyte) to make both non-blocking
ntrost57 Sep 13, 2018
0ff56f7
non-blocking hybmv when using device pointer mode
ntrost57 Sep 13, 2018
c554fff
more documentation, introduced modules to doxygen
ntrost57 Sep 13, 2018
bdba909
more docs
ntrost57 Sep 13, 2018
9f2ae39
added csrsv and csrilu0 to rst doc
ntrost57 Sep 13, 2018
31d9b79
doti memory leak fixed
ntrost57 Sep 14, 2018
c6eeaa1
hipMemset changed to async
ntrost57 Sep 14, 2018
88c5d95
changed csrsv/ilu0 analysis and buffer size functions to carry csr_val
ntrost57 Sep 14, 2018
ea512ee
clang-format #1
ntrost57 Sep 14, 2018
74550bc
clang-format #2
ntrost57 Sep 14, 2018
261b9a3
rocsparse_copy_mat_descr() added
ntrost57 Sep 14, 2018
ce78583
added gfx906
ntrost57 Sep 17, 2018
d049ac6
pulling rocPRIM from master repo
ntrost57 Sep 17, 2018
8f5446d
introduced requirement of ROCm 1.9 to build
ntrost57 Sep 17, 2018
59ce416
introduced requirement of ROCm 1.9 to install packages
ntrost57 Sep 17, 2018
b3a7499
gcc atomic fixes
ntrost57 Sep 17, 2018
ef6de13
CI with ROCm 1.9 docker image
ntrost57 Sep 18, 2018
909038f
binary literals are actually c++14, changed to hex
ntrost57 Sep 18, 2018
967c38d
hipcub is not required for csrilu0
ntrost57 Sep 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ list(APPEND CMAKE_MODULE_PATH
include(cmake/SetToolchain.cmake)

# rocSPARSE project
project(rocsparse VERSION 0.1.2.0 LANGUAGES CXX)
project(rocsparse VERSION 0.1.3.0 LANGUAGES CXX)
set(rocsparse_SOVERSION 0)

# Set a default build type if none was specified
Expand Down Expand Up @@ -50,7 +50,7 @@ option(BUILD_VERBOSE "Output additional build information" OFF)
include(cmake/Dependencies.cmake)

# AMD targets
set(AMDGPU_TARGETS gfx803;gfx900 CACHE STRING "List of specific machine types for library to target")
set(AMDGPU_TARGETS gfx803;gfx900;gfx906 CACHE STRING "List of specific machine types for library to target")

# rocSPARSE library
add_subdirectory(library)
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ rocm_ubuntu:
node( 'docker && rocm && dkms')
{
def hcc_docker_args = new docker_data(
from_image:'rocm/dev-ubuntu-16.04:1.7.1',
from_image:'rocm/dev-ubuntu-16.04:1.9.0',
build_docker_file:'dockerfile-build-ubuntu',
install_docker_file:'dockerfile-install-ubuntu',
docker_run_args:'--device=/dev/kfd --device=/dev/dri --group-add=video',
Expand Down
32 changes: 31 additions & 1 deletion clients/benchmarks/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@
// Level2
#include "testing_coomv.hpp"
#include "testing_csrmv.hpp"
#include "testing_csrsv.hpp"
#include "testing_ellmv.hpp"
#include "testing_hybmv.hpp"

// Level3
#include "testing_csrmm.hpp"

// Preconditioner
#include "testing_csrilu0.hpp"

// Conversion
#include "testing_csr2coo.hpp"
#include "testing_csr2csc.hpp"
Expand Down Expand Up @@ -85,7 +92,9 @@ int main(int argc, char* argv[])
po::value<std::string>(&function)->default_value("axpyi"),
"SPARSE function to test. Options:\n"
" Level1: axpyi, doti, gthr, gthrz, roti, sctr\n"
" Level2: coomv, csrmv, ellmv, hybmv\n"
" Level2: coomv, csrmv, csrsv, ellmv, hybmv\n"
" Level3: csrmm\n"
" Preconditioner: csrilu0\n"
" Conversion: csr2coo, csr2csc, csr2ell,\n"
" csr2hyb, coo2csr, ell2csr\n"
" Sorting: csrsort, coosort\n"
Expand Down Expand Up @@ -201,6 +210,13 @@ int main(int argc, char* argv[])
else if(precision == 'd')
testing_csrmv<double>(argus);
}
else if(function == "csrsv")
{
if(precision == 's')
testing_csrsv<float>(argus);
else if(precision == 'd')
testing_csrsv<double>(argus);
}
else if(function == "ellmv")
{
if(precision == 's')
Expand All @@ -215,6 +231,20 @@ int main(int argc, char* argv[])
else if(precision == 'd')
testing_hybmv<double>(argus);
}
else if(function == "csrmm")
{
if(precision == 's')
testing_csrmm<float>(argus);
else if(precision == 'd')
testing_csrmm<double>(argus);
}
else if(function == "csrilu0")
{
if(precision == 's')
testing_csrilu0<float>(argus);
else if(precision == 'd')
testing_csrilu0<double>(argus);
}
else if(function == "csr2coo")
{
testing_csr2coo(argus);
Expand Down
13 changes: 13 additions & 0 deletions clients/common/arg_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ void verify_rocsparse_status_invalid_value(rocsparse_status status, const char*
#endif
}

void verify_rocsparse_status_zero_pivot(rocsparse_status status, const char* message)
{
#ifdef GOOGLE_TEST
ASSERT_EQ(status, rocsparse_status_zero_pivot);
#else
if(status != rocsparse_status_zero_pivot)
{
std::cerr << "rocSPARSE TEST ERROR: status != rocsparse_status_zero_pivot, ";
std::cerr << message << std::endl;
}
#endif
}

void verify_rocsparse_status_invalid_handle(rocsparse_status status)
{
#ifdef GOOGLE_TEST
Expand Down
266 changes: 266 additions & 0 deletions clients/common/rocsparse_template_specialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,158 @@ rocsparse_status rocsparse_csrmv(rocsparse_handle handle,
y);
}

template <>
rocsparse_status rocsparse_csrsv_buffer_size(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
size_t* buffer_size)
{
return rocsparse_scsrsv_buffer_size(
handle, trans, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, buffer_size);
}

template <>
rocsparse_status rocsparse_csrsv_buffer_size(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
size_t* buffer_size)
{
return rocsparse_dcsrsv_buffer_size(
handle, trans, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, buffer_size);
}

template <>
rocsparse_status rocsparse_csrsv_analysis(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_analysis_policy analysis,
rocsparse_solve_policy solve,
void* temp_buffer)
{
return rocsparse_scsrsv_analysis(handle,
trans,
m,
nnz,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
analysis,
solve,
temp_buffer);
}

template <>
rocsparse_status rocsparse_csrsv_analysis(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_analysis_policy analysis,
rocsparse_solve_policy solve,
void* temp_buffer)
{
return rocsparse_dcsrsv_analysis(handle,
trans,
m,
nnz,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
analysis,
solve,
temp_buffer);
}

template <>
rocsparse_status rocsparse_csrsv_solve(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const float* alpha,
const rocsparse_mat_descr descr,
const float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
const float* x,
float* y,
rocsparse_solve_policy policy,
void* temp_buffer)
{
return rocsparse_scsrsv_solve(handle,
trans,
m,
nnz,
alpha,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
x,
y,
policy,
temp_buffer);
}

template <>
rocsparse_status rocsparse_csrsv_solve(rocsparse_handle handle,
rocsparse_operation trans,
rocsparse_int m,
rocsparse_int nnz,
const double* alpha,
const rocsparse_mat_descr descr,
const double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
const double* x,
double* y,
rocsparse_solve_policy policy,
void* temp_buffer)
{
return rocsparse_dcsrsv_solve(handle,
trans,
m,
nnz,
alpha,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
x,
y,
policy,
temp_buffer);
}

template <>
rocsparse_status rocsparse_ellmv(rocsparse_handle handle,
rocsparse_operation trans,
Expand Down Expand Up @@ -388,6 +540,120 @@ rocsparse_status rocsparse_csrmm(rocsparse_handle handle,
ldc);
}

template <>
rocsparse_status rocsparse_csrilu0_buffer_size(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
size_t* buffer_size)
{
return rocsparse_scsrilu0_buffer_size(
handle, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, buffer_size);
}

template <>
rocsparse_status rocsparse_csrilu0_buffer_size(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
size_t* buffer_size)
{
return rocsparse_dcsrilu0_buffer_size(
handle, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, buffer_size);
}

template <>
rocsparse_status rocsparse_csrilu0_analysis(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_analysis_policy analysis,
rocsparse_solve_policy solve,
void* temp_buffer)
{
return rocsparse_scsrilu0_analysis(handle,
m,
nnz,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
analysis,
solve,
temp_buffer);
}

template <>
rocsparse_status rocsparse_csrilu0_analysis(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
const double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_analysis_policy analysis,
rocsparse_solve_policy solve,
void* temp_buffer)
{
return rocsparse_dcsrilu0_analysis(handle,
m,
nnz,
descr,
csr_val,
csr_row_ptr,
csr_col_ind,
info,
analysis,
solve,
temp_buffer);
}

template <>
rocsparse_status rocsparse_csrilu0(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
float* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_solve_policy policy,
void* temp_buffer)
{
return rocsparse_scsrilu0(
handle, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, policy, temp_buffer);
}

template <>
rocsparse_status rocsparse_csrilu0(rocsparse_handle handle,
rocsparse_int m,
rocsparse_int nnz,
const rocsparse_mat_descr descr,
double* csr_val,
const rocsparse_int* csr_row_ptr,
const rocsparse_int* csr_col_ind,
rocsparse_mat_info info,
rocsparse_solve_policy policy,
void* temp_buffer)
{
return rocsparse_dcsrilu0(
handle, m, nnz, descr, csr_val, csr_row_ptr, csr_col_ind, info, policy, temp_buffer);
}

template <>
rocsparse_status rocsparse_csr2csc(rocsparse_handle handle,
rocsparse_int m,
Expand Down
Loading