Skip to content
Open
Show file tree
Hide file tree
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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

Full documentation for hipSOLVER is available at the [hipSOLVER Documentation](https://rocm.docs.amd.com/projects/hipSOLVER/en/latest/index.html).

## (Unreleased) hipSOLVER

### Added

* Added compatibility-only functions
* csrlsvqr
* hipsolverSpCcsrlsvqr, hipsolverSpZcsrlsvqr

### Changed
### Removed
### Optimized
### Resolved issues

* Corrected the value of `lwork` returned by various `bufferSize` functions to be consistent with NVIDIA cuSOLVER. The following functions will
now return `lwork` such that the workspace size (in bytes) is `sizeof(T) * lwork`, rather than `lwork`. To restore the original behavior, set
environment variable `HIPSOLVER_BUFFERSIZE_RETURN_BYTES`.
* hipsolverXorgbr_bufferSize, hipsolverXorgqr_bufferSize, hipsolverXorgtr_bufferSize, hipsolverXormqr_bufferSize, hipsolverXormtr_bufferSize,
hipsolverXgesvd_bufferSize, hipsolverXgesvdj_bufferSize, hipsolverXgesvdBatched_bufferSize, hipsolverXgesvdaStridedBatched_bufferSize,
hipsolverXsyevd_bufferSize, hipsolverXsyevdx_bufferSize, hipsolverXsyevj_bufferSize, hipsolverXsyevjBatched_bufferSize,
hipsolverXsygvd_bufferSize, hipsolverXsygvdx_bufferSize, hipsolverXsygvj_bufferSize, hipsolverXsytrd_bufferSize, hipsolverXsytrf_bufferSize

### Known issues
### Upcoming changes


## hipSOLVER 2.5.0 for ROCm 6.5.0

### Upcoming changes

* With the rocSOLVER backend, the bufferSize methods are currently outputting lwork such that the required workspace
size (in bytes) is lwork. In ROCm 7.0 this will change to make the rocSOLVER backend consistent with cuSOLVER. The
changed bufferSize methods will then return lwork such that the required workspace size (in bytes) is sizeof(T) * lwork,
where T is the used precision. This change will break ABI backward compatibility.


## hipSOLVER 2.4.0 for ROCm 6.4.0

### Added
Expand All @@ -12,6 +47,11 @@ Full documentation for hipSOLVER is available at the [hipSOLVER Documentation](h
### Upcoming changes

* With the rocSOLVER backend, the bufferSize methods are currently outputting `lwork` such that the required workspace size (in bytes) is `lwork`. In ROCm 7.0 this will change to make the rocSOLVER backend consistent with cuSOLVER. The changed bufferSize methods will then return `lwork` so that the required workspace size (in bytes) is `sizeof(T) * lwork`, where T is the precision being used. This change will break ABI backward compatibility.
* With the rocSOLVER backend, the bufferSize methods are currently outputting lwork such that the required workspace
size (in bytes) is lwork. In ROCm 7.0 this will change to make the rocSOLVER backend consistent with cuSOLVER. The
changed bufferSize methods will then return lwork such that the required workspace size (in bytes) is sizeof(T) * lwork,
where T is the used precision. This change will break ABI backward compatibility.


## hipSOLVER 2.3.0 for ROCm 6.3.0

Expand Down
16 changes: 11 additions & 5 deletions clients/include/testing_gesvd.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -322,7 +322,8 @@ void testing_gesvd_bad_arg()

// int size_W;
// hipsolver_gesvd_bufferSize(API, handle, left_svect, right_svect, m, n, dA.data(), lda, &size_W);
// device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
// size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
// device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
// if(size_W)
// CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -350,7 +351,10 @@ void testing_gesvd_bad_arg()
int size_W;
hipsolver_gesvd_bufferSize(
API, handle, left_svect, right_svect, m, n, dA.data(), lda, &size_W);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr
? size_W
: sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -1062,10 +1066,12 @@ void testing_gesvd(Arguments& argus)
hipsolver_gesvd_bufferSize(API, handle, leftv, rightv, m, n, (T*)nullptr, lda, &w1);
hipsolver_gesvd_bufferSize(API, handle, leftvT, rightvT, mT, nT, (T*)nullptr, lda, &w2);
size_W = max(w1, w2);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -1089,7 +1095,7 @@ void testing_gesvd(Arguments& argus)
device_strided_batch_vector<int> dinfo(1, 1, 1, bc);
device_strided_batch_vector<T> dVT(size_VT, 1, stVT, bc);
device_strided_batch_vector<T> dUT(size_UT, 1, stUT, bc);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1); // size_W accounts for bc
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1); // bytes_W accounts for bc
if(size_VT)
CHECK_HIP_ERROR(dVT.memcheck());
if(size_UT)
Expand Down
16 changes: 11 additions & 5 deletions clients/include/testing_gesvda.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -281,7 +281,8 @@ void testing_gesvda_bad_arg()
// stV,
// &size_W,
// bc);
// device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
// size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
// device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
// if(size_W)
// CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -344,7 +345,10 @@ void testing_gesvda_bad_arg()
stV,
&size_W,
bc);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr
? size_W
: sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -846,10 +850,12 @@ void testing_gesvda(Arguments& argus)
stV,
&size_W,
bc);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -870,7 +876,7 @@ void testing_gesvda(Arguments& argus)
device_strided_batch_vector<T> dV(size_V, 1, stV, bc);
device_strided_batch_vector<T> dU(size_U, 1, stU, bc);
device_strided_batch_vector<int> dinfo(1, 1, 1, bc);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1); // size_W accounts for bc
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1); // bytes_W accounts for bc
if(size_S)
CHECK_HIP_ERROR(dS.memcheck());
if(size_V)
Expand Down
16 changes: 11 additions & 5 deletions clients/include/testing_gesvdj.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -278,7 +278,8 @@ void testing_gesvdj_bad_arg()
// &size_W,
// params,
// bc);
// device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
// size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
// device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
// if(size_W)
// CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -337,7 +338,10 @@ void testing_gesvdj_bad_arg()
&size_W,
params,
bc);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W = std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr
? size_W
: sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -888,10 +892,12 @@ void testing_gesvdj(Arguments& argus)
&size_W,
params,
bc);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -912,7 +918,7 @@ void testing_gesvdj(Arguments& argus)
device_strided_batch_vector<T> dV(size_V, 1, stV, bc);
device_strided_batch_vector<T> dU(size_U, 1, stU, bc);
device_strided_batch_vector<int> dinfo(1, 1, 1, bc);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1); // size_W accounts for bc
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1); // bytes_W accounts for bc
if(size_S)
CHECK_HIP_ERROR(dS.memcheck());
if(size_V)
Expand Down
12 changes: 8 additions & 4 deletions clients/include/testing_orgbr_ungbr.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -88,7 +88,9 @@ void testing_orgbr_ungbr_bad_arg()
int size_W;
hipsolver_orgbr_ungbr_bufferSize(
API, handle, side, m, n, k, dA.data(), lda, dIpiv.data(), &size_W);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -376,10 +378,12 @@ void testing_orgbr_ungbr(Arguments& argus)
int size_W;
hipsolver_orgbr_ungbr_bufferSize(
API, handle, side, m, n, k, (T*)nullptr, lda, (T*)nullptr, &size_W);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -392,7 +396,7 @@ void testing_orgbr_ungbr(Arguments& argus)
device_strided_batch_vector<T> dA(size_A, 1, size_A, 1);
device_strided_batch_vector<T> dIpiv(size_P, 1, size_P, 1);
device_strided_batch_vector<int> dInfo(1, 1, 1, 1);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_A)
CHECK_HIP_ERROR(dA.memcheck());
if(size_P)
Expand Down
12 changes: 8 additions & 4 deletions clients/include/testing_orgqr_ungqr.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -79,7 +79,9 @@ void testing_orgqr_ungqr_bad_arg()

int size_W;
hipsolver_orgqr_ungqr_bufferSize(API, handle, m, n, k, dA.data(), lda, dIpiv.data(), &size_W);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -280,10 +282,12 @@ void testing_orgqr_ungqr(Arguments& argus)
// memory size query is necessary
int size_W;
hipsolver_orgqr_ungqr_bufferSize(API, handle, m, n, k, (T*)nullptr, lda, (T*)nullptr, &size_W);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -296,7 +300,7 @@ void testing_orgqr_ungqr(Arguments& argus)
device_strided_batch_vector<T> dA(size_A, 1, size_A, 1);
device_strided_batch_vector<T> dIpiv(size_P, 1, size_P, 1);
device_strided_batch_vector<int> dInfo(1, 1, 1, 1);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_A)
CHECK_HIP_ERROR(dA.memcheck());
if(size_P)
Expand Down
12 changes: 8 additions & 4 deletions clients/include/testing_orgtr_ungtr.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -80,7 +80,9 @@ void testing_orgtr_ungtr_bad_arg()

int size_W;
hipsolver_orgtr_ungtr_bufferSize(API, handle, uplo, n, dA.data(), lda, dIpiv.data(), &size_W);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -286,10 +288,12 @@ void testing_orgtr_ungtr(Arguments& argus)
// memory size query is necessary
int size_W;
hipsolver_orgtr_ungtr_bufferSize(API, handle, uplo, n, (T*)nullptr, lda, (T*)nullptr, &size_W);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -302,7 +306,7 @@ void testing_orgtr_ungtr(Arguments& argus)
device_strided_batch_vector<T> dA(size_A, 1, size_A, 1);
device_strided_batch_vector<T> dIpiv(size_P, 1, size_P, 1);
device_strided_batch_vector<int> dInfo(1, 1, 1, 1);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_A)
CHECK_HIP_ERROR(dA.memcheck());
if(size_P)
Expand Down
12 changes: 8 additions & 4 deletions clients/include/testing_ormqr_unmqr.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ************************************************************************
* Copyright (C) 2020-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (C) 2020-2025 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 @@ -186,7 +186,9 @@ void testing_ormqr_unmqr_bad_arg()
int size_W;
hipsolver_ormqr_unmqr_bufferSize(
API, handle, side, trans, m, n, k, dA.data(), lda, dIpiv.data(), dC.data(), ldc, &size_W);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_W)
CHECK_HIP_ERROR(dWork.memcheck());

Expand Down Expand Up @@ -528,10 +530,12 @@ void testing_ormqr_unmqr(Arguments& argus)
(T*)nullptr,
ldc,
&size_W);
size_t bytes_W
= std::getenv("HIPSOLVER_BUFFERSIZE_RETURN_BYTES") != nullptr ? size_W : sizeof(T) * size_W;

if(argus.mem_query)
{
rocsolver_bench_inform(inform_mem_query, size_W);
rocsolver_bench_inform(inform_mem_query, bytes_W);
return;
}

Expand All @@ -546,7 +550,7 @@ void testing_ormqr_unmqr(Arguments& argus)
device_strided_batch_vector<T> dIpiv(size_P, 1, size_P, 1);
device_strided_batch_vector<T> dA(size_A, 1, size_A, 1);
device_strided_batch_vector<int> dInfo(1, 1, 1, 1);
device_strided_batch_vector<T> dWork(size_W, 1, size_W, 1);
device_strided_batch_vector<T> dWork(bytes_W, 1, bytes_W, 1);
if(size_A)
CHECK_HIP_ERROR(dA.memcheck());
if(size_P)
Expand Down
Loading