Skip to content

Commit

Permalink
Merge pull request #316 from YvanMokwinski/yvan/spmv_5.7
Browse files Browse the repository at this point in the history
Yvan/spmv 5.7
  • Loading branch information
YvanMokwinski authored May 31, 2023
2 parents 45b42d8 + 033cd6e commit bf614ee
Show file tree
Hide file tree
Showing 36 changed files with 1,785 additions and 157 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Full documentation for rocSPARSE is available at [rocsparse.readthedocs.io](https://rocsparse.readthedocs.io/en/latest/).

## rocSPARSE 2.5.2 for ROCm 5.6.0

### Improved
- Fixed a memory leak in csritsv

Expand Down
303 changes: 173 additions & 130 deletions clients/common/rocsparse_host.cpp

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions clients/include/rocsparse_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ Real precisions: &real_precisions
{ a_type: f32_r, b_type: f32_r, c_type: f32_r, x_type: f32_r, y_type: f32_r, compute_type: f32_r }
- &double_precision
{ a_type: f64_r, b_type: f64_r, c_type: f64_r, x_type: f64_r, y_type: f64_r, compute_type: f64_r }
- &float32_float64_float64_float64
{ a_type: f32_r, x_type: f64_r, y_type: f64_r, compute_type: f64_r }

Complex precisions: &complex_precisions
- &float32_cmplx32_cmplx32_cmplx32_precision
Expand All @@ -247,6 +249,8 @@ Complex precisions: &complex_precisions
{ a_type: f32_c, b_type: f32_c, c_type: f32_c, x_type: f32_c, y_type: f32_c, compute_type: f32_c }
- &double_precision_complex
{ a_type: f64_c, b_type: f64_c, c_type: f64_c, x_type: f64_c, y_type: f64_c, compute_type: f64_c }
- &cmplx32_cmplx64_cmplx64_cmplx64
{ a_type: f32_c, x_type: f64_c, y_type: f64_c, compute_type: f64_c }

C precisions real: &single_only_precisions
- *single_precision
Expand Down
3 changes: 2 additions & 1 deletion clients/testings/testing_bsr2csr.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! \file */
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -68,6 +68,7 @@ void testing_bsr2csr_bad_arg(const Arguments& arg)
// Check block_dim == 0
block_dim = 0;
EXPECT_ROCSPARSE_STATUS(rocsparse_bsr2csr<T>(PARAMS), rocsparse_status_invalid_size);

#undef PARAMS
}

Expand Down
2 changes: 1 addition & 1 deletion clients/testings/testing_prune_csr2csr.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! \file */
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion clients/testings/testing_prune_csr2csr_by_percentage.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! \file */
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -94,6 +94,7 @@ void testing_prune_csr2csr_by_percentage_bad_arg(const Arguments& arg)
rocsparse_status_not_implemented);
EXPECT_ROCSPARSE_STATUS(rocsparse_prune_csr2csr_by_percentage<T>(PARAMS),
rocsparse_status_not_implemented);

CHECK_ROCSPARSE_ERROR(
rocsparse_set_mat_storage_mode(csr_descr_A, rocsparse_storage_mode_sorted));
CHECK_ROCSPARSE_ERROR(
Expand Down
26 changes: 25 additions & 1 deletion clients/testings/testing_spmv_bsr.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -83,6 +83,11 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_float_complex,
rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int64_t, float, double, double, double);

INSTANTIATE_MIXED(int32_t,
int32_t,
double,
Expand All @@ -102,4 +107,23 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_double_complex,
rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_bsr_extra(const Arguments& arg) {}
18 changes: 17 additions & 1 deletion clients/testings/testing_spmv_coo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -64,8 +64,24 @@ INSTANTIATE_MIXED(
int32_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);
INSTANTIATE_MIXED(
int64_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, float, double, double, double);

INSTANTIATE_MIXED(
int32_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);
INSTANTIATE_MIXED(
int64_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_coo_extra(const Arguments& arg) {}
18 changes: 17 additions & 1 deletion clients/testings/testing_spmv_coo_aos.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -63,8 +63,24 @@ INSTANTIATE_MIXED(
int32_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);
INSTANTIATE_MIXED(
int64_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, float, double, double, double);

INSTANTIATE_MIXED(
int32_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);
INSTANTIATE_MIXED(
int64_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_coo_aos_extra(const Arguments& arg) {}
26 changes: 25 additions & 1 deletion clients/testings/testing_spmv_csc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -83,6 +83,11 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_float_complex,
rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int64_t, float, double, double, double);

INSTANTIATE_MIXED(int32_t,
int32_t,
double,
Expand All @@ -102,4 +107,23 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_double_complex,
rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_csc_extra(const Arguments& arg) {}
27 changes: 26 additions & 1 deletion clients/testings/testing_spmv_csr.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -65,6 +65,11 @@ INSTANTIATE_MIXED(int64_t, int64_t, int8_t, int8_t, int32_t, int32_t);
INSTANTIATE_MIXED(int32_t, int32_t, int8_t, int8_t, float, float);
INSTANTIATE_MIXED(int64_t, int32_t, int8_t, int8_t, float, float);
INSTANTIATE_MIXED(int64_t, int64_t, int8_t, int8_t, float, float);

INSTANTIATE_MIXED(int32_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, int64_t, float, double, double, double);

INSTANTIATE_MIXED(int32_t,
int32_t,
float,
Expand All @@ -83,6 +88,7 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_float_complex,
rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t,
int32_t,
double,
Expand All @@ -102,4 +108,23 @@ INSTANTIATE_MIXED(int64_t,
rocsparse_double_complex,
rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_csr_extra(const Arguments& arg) {}
19 changes: 18 additions & 1 deletion clients/testings/testing_spmv_ell.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights Reserved.
* Copyright (C) 2020-2023 Advanced Micro Devices, Inc. All rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -59,12 +59,29 @@ INSTANTIATE_MIXED(int32_t, int8_t, int8_t, int32_t, int32_t);
INSTANTIATE_MIXED(int64_t, int8_t, int8_t, int32_t, int32_t);
INSTANTIATE_MIXED(int32_t, int8_t, int8_t, float, float);
INSTANTIATE_MIXED(int64_t, int8_t, int8_t, float, float);

INSTANTIATE_MIXED(
int32_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);
INSTANTIATE_MIXED(
int64_t, float, rocsparse_float_complex, rocsparse_float_complex, rocsparse_float_complex);

INSTANTIATE_MIXED(int32_t, float, double, double, double);
INSTANTIATE_MIXED(int64_t, float, double, double, double);

INSTANTIATE_MIXED(
int32_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);
INSTANTIATE_MIXED(
int64_t, double, rocsparse_double_complex, rocsparse_double_complex, rocsparse_double_complex);

INSTANTIATE_MIXED(int32_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);
INSTANTIATE_MIXED(int64_t,
rocsparse_float_complex,
rocsparse_double_complex,
rocsparse_double_complex,
rocsparse_double_complex);

void testing_spmv_ell_extra(const Arguments& arg) {}
56 changes: 55 additions & 1 deletion clients/tests/test_spmv_bsr.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########################################################################
# Copyright (C) 2022 Advanced Micro Devices, Inc. All rights Reserved.
# Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -226,6 +226,32 @@ Tests:
baseA: [rocsparse_index_base_zero]
matrix: [rocsparse_matrix_random]


- name: spmv_bsr
category: quick
function: spmv_bsr
indextype: *i32_i64
precision: *float32_float64_float64_float64
M: [34, 104, 343, 5196]
N: [57, 109, 458, 3425]
block_dim: [12]
alpha_beta: *alpha_beta_range_checkin
baseA: [rocsparse_index_base_zero]
matrix: [rocsparse_matrix_random]


- name: spmv_bsr
category: pre_checkin
function: spmv_bsr
indextype: *i32_i64
precision: *float32_float64_float64_float64
M: [534, 1604, 3413, 75196]
N: [578, 4109, 9458, 34254]
block_dim: [16]
alpha_beta: *alpha_beta_range_quick
baseA: [rocsparse_index_base_one]
matrix: [rocsparse_matrix_random]

- name: spmv_bsr
category: pre_checkin
function: spmv_bsr
Expand All @@ -238,6 +264,7 @@ Tests:
baseA: [rocsparse_index_base_one]
matrix: [rocsparse_matrix_random]


- name: spmv_bsr_file
category: pre_checkin
function: spmv_bsr
Expand All @@ -263,3 +290,30 @@ Tests:
matrix: [rocsparse_matrix_file_rocalution]
filename: [Chevron3,
bmwcra_1]


- name: spmv_bsr_file
category: pre_checkin
function: spmv_bsr
indextype: *i32_i64
precision: *cmplx32_cmplx64_cmplx64_cmplx64
M: [48374]
N: [42846]
block_dim: [4]
alpha_beta: *alpha_beta_range_checkin
baseA: [rocsparse_index_base_zero]
matrix: [rocsparse_matrix_random]

- name: spmv_bsr_file
category: nightly
function: spmv_bsr
indextype: *i32_i64
precision: *cmplx32_cmplx64_cmplx64_cmplx64
M: 1
N: 1
block_dim: [7]
alpha_beta: *alpha_beta_range_nightly
baseA: [rocsparse_index_base_one]
matrix: [rocsparse_matrix_file_rocalution]
filename: [Chevron3,
bmwcra_1]
Loading

0 comments on commit bf614ee

Please sign in to comment.