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

Tacho : compile warnings on Mi300 #13482

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@
#else
#define TACHO_CUSPARSE_SPMM_ALG CUSPARSE_MM_ALG_DEFAULT
#endif
#elif defined(KOKKOS_ENABLE_HIP)
#if (ROCM_VERSION >= 60000)
#define tacho_rocsparse_spmv rocsparse_spmv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cleaner, thanks @iyamazaki ! I'd prefer upper-case convention for macro names, but not blocking the PR on that change

#elif (ROCM_VERSION >= 50400)
#define tacho_rocsparse_spmv rocsparse_spmv_ex
#else
#define tacho_rocsparse_spmv rocsparse_spmv
#endif
#endif

namespace Tacho {
Expand Down Expand Up @@ -1939,11 +1947,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
s0.rowptrU, s0.colindU, s0.nzvalsU,
rocsparse_indextype_i32, rocsparse_indextype_i32, rocsparse_index_base_zero, rocsparse_compute_type);
// workspace
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrU, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -1958,7 +1962,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
#if ROCM_VERSION >= 50400
// preprocess
buffer_size_U = buffer_U.extent(0);
rocsparse_spmv_ex
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrU, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -1971,11 +1975,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
s0.rowptrL, s0.colindL, s0.nzvalsL,
rocsparse_indextype_i32, rocsparse_indextype_i32, rocsparse_index_base_zero, rocsparse_compute_type);
// workspace
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrL, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -1990,7 +1990,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
#if ROCM_VERSION >= 50400
// preprocess
buffer_size_L = buffer_L.extent(0);
rocsparse_spmv_ex
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrL, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -2003,11 +2003,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
s0.rowptrU, s0.colindU, s0.nzvalsU,
rocsparse_indextype_i32, rocsparse_indextype_i32, rocsparse_index_base_zero, rocsparse_compute_type);
// workspace (transpose)
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_transpose,
&alpha, s0.descrL, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -2022,7 +2018,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
#if ROCM_VERSION >= 50400
// preprocess
buffer_size_L = buffer_L.extent(0);
rocsparse_spmv_ex
tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_transpose,
&alpha, s0.descrL, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand Down Expand Up @@ -2490,12 +2486,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
auto vecX = ((nlvls-1-lvl)%2 == 0 ? vecL : vecW);
auto vecY = ((nlvls-1-lvl)%2 == 0 ? vecW : vecL);
if (s0.spmv_explicit_transpose) {
status =
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
status = tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrL, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand All @@ -2504,12 +2495,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
#endif
&buffer_size_L, (void*)buffer_L.data());
} else {
status =
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
status = tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_transpose,
&alpha, s0.descrL, vecX, &beta, vecY, // dscrL stores the same ptrs as descrU, but optimized for trans
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand Down Expand Up @@ -2826,12 +2812,7 @@ class NumericToolsLevelSet : public NumericToolsBase<ValueType, DeviceType> {
}
auto vecX = (lvl%2 == 0 ? vecU : vecW);
auto vecY = (lvl%2 == 0 ? vecW : vecU);
status =
#if ROCM_VERSION >= 50400
rocsparse_spmv_ex
#else
rocsparse_spmv
#endif
status = tacho_rocsparse_spmv
(rocsparseHandle, rocsparse_operation_none,
&alpha, s0.descrU, vecX, &beta, vecY,
rocsparse_compute_type, rocsparse_spmv_alg_default,
Expand Down
Loading