From 6ce00b09cf294f7dbc46c7925c971f3eba0bed52 Mon Sep 17 00:00:00 2001 From: aurianer Date: Mon, 11 Mar 2024 13:02:23 +0100 Subject: [PATCH 1/5] Remove break which is unreachable --- include/dlaf/eigensolver/band_to_tridiag.h | 2 -- include/dlaf/multiplication/hermitian.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/dlaf/eigensolver/band_to_tridiag.h b/include/dlaf/eigensolver/band_to_tridiag.h index be907da16c..273299d921 100644 --- a/include/dlaf/eigensolver/band_to_tridiag.h +++ b/include/dlaf/eigensolver/band_to_tridiag.h @@ -84,7 +84,6 @@ TridiagResult band_to_tridiagonal(blas::Uplo uplo, SizeType band switch (uplo) { case blas::Uplo::Lower: return BandToTridiag::call_L(band_size, mat_a); - break; case blas::Uplo::Upper: DLAF_UNIMPLEMENTED(uplo); break; @@ -161,7 +160,6 @@ TridiagResult band_to_tridiagonal(comm::CommunicatorGrid& grid, switch (uplo) { case blas::Uplo::Lower: return BandToTridiag::call_L(grid, band_size, mat_a); - break; case blas::Uplo::Upper: DLAF_UNIMPLEMENTED(uplo); break; diff --git a/include/dlaf/multiplication/hermitian.h b/include/dlaf/multiplication/hermitian.h index 6c228cc2d2..38f5e99ac1 100644 --- a/include/dlaf/multiplication/hermitian.h +++ b/include/dlaf/multiplication/hermitian.h @@ -66,7 +66,6 @@ void hermitian_multiplication(blas::Side side, blas::Uplo uplo, const T alpha, M switch (uplo) { case blas::Uplo::Lower: return multiplication::internal::Hermitian::call_LL(alpha, mat_a, mat_b, beta, mat_c); - break; case blas::Uplo::Upper: DLAF_UNIMPLEMENTED(uplo); break; @@ -130,7 +129,6 @@ void hermitian_multiplication(comm::CommunicatorGrid& grid, blas::Side side, bla case blas::Uplo::Lower: return multiplication::internal::Hermitian::call_LL(grid, alpha, mat_a, mat_b, beta, mat_c); - break; case blas::Uplo::Upper: DLAF_UNIMPLEMENTED(uplo); break; From b6ca0746b52d07fbdb7a8e9bc2c8db0efc1a2e92 Mon Sep 17 00:00:00 2001 From: aurianer Date: Mon, 11 Mar 2024 13:27:47 +0100 Subject: [PATCH 2/5] Add DLAF_UNREACHABLE in default case --- include/dlaf/matrix/panel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dlaf/matrix/panel.h b/include/dlaf/matrix/panel.h index 498ed60697..f20de36e6e 100644 --- a/include/dlaf/matrix/panel.h +++ b/include/dlaf/matrix/panel.h @@ -361,6 +361,8 @@ struct Panel { return {mat_size - i_tile * mb, nb}; case Coord::Row: return {mb, mat_size - i_tile * nb}; + default: + return DLAF_UNREACHABLE(LocalElementSize); } } From b00d0584d6e4928804cdf80a3a163723e516e434 Mon Sep 17 00:00:00 2001 From: aurianer Date: Mon, 11 Mar 2024 15:02:18 +0100 Subject: [PATCH 3/5] Remove unused variables --- include/dlaf/eigensolver/gen_to_std/impl.h | 2 -- include/dlaf/eigensolver/tridiag_solver/merge.h | 2 -- test/unit/c_api/eigensolver/test_eigensolver_c_api.cpp | 1 - 3 files changed, 5 deletions(-) diff --git a/include/dlaf/eigensolver/gen_to_std/impl.h b/include/dlaf/eigensolver/gen_to_std/impl.h index b5cfd3e2d0..9202ae6d0d 100644 --- a/include/dlaf/eigensolver/gen_to_std/impl.h +++ b/include/dlaf/eigensolver/gen_to_std/impl.h @@ -487,7 +487,6 @@ void GenToStd::call_L(comm::CommunicatorGrid& grid, Matrix(k)); hemmPanelTile(thread_priority::high, a_diag, mat_l.read(ik), mat_a.readwrite(ik)); @@ -759,7 +758,6 @@ void GenToStd::call_U(comm::CommunicatorGrid& grid, Matrix(k), j_local); hemmPanelTile(thread_priority::high, a_diag, mat_u.read(ki), mat_a.readwrite(ki)); diff --git a/include/dlaf/eigensolver/tridiag_solver/merge.h b/include/dlaf/eigensolver/tridiag_solver/merge.h index 69f424afbf..0679c84cf4 100644 --- a/include/dlaf/eigensolver/tridiag_solver/merge.h +++ b/include/dlaf/eigensolver/tridiag_solver/merge.h @@ -1082,7 +1082,6 @@ void mergeSubproblems(const SizeType i_begin, const SizeType i_split, const Size namespace di = dlaf::internal; using pika::execution::thread_priority; - const GlobalTileIndex idx_gl_begin(i_begin, i_begin); const LocalTileIndex idx_loc_begin(i_begin, i_begin); const SizeType nrtiles = i_end - i_begin; const LocalTileSize sz_loc_tiles(nrtiles, nrtiles); @@ -1834,7 +1833,6 @@ void mergeDistSubproblems(comm::CommunicatorPipeline(dist, i_split, i_end); // The local size of the subproblem - const GlobalTileIndex idx_gl_begin(i_begin, i_begin); const LocalTileIndex idx_loc_begin{dist.next_local_tile_from_global_tile(i_begin), dist.next_local_tile_from_global_tile(i_begin)}; const LocalTileIndex idx_loc_end{dist.next_local_tile_from_global_tile(i_end), diff --git a/test/unit/c_api/eigensolver/test_eigensolver_c_api.cpp b/test/unit/c_api/eigensolver/test_eigensolver_c_api.cpp index 1ec8dcbfe4..ae86c21023 100644 --- a/test/unit/c_api/eigensolver/test_eigensolver_c_api.cpp +++ b/test/unit/c_api/eigensolver/test_eigensolver_c_api.cpp @@ -77,7 +77,6 @@ void testEigensolver(const blas::Uplo uplo, const SizeType m, const SizeType mb, // Here we need to resume it manually to build the matrices with DLA-Future pika::resume(); - const LocalElementSize size(m, m); const TileElementSize block_size(mb, mb); Matrix reference = [&]() { From 945dec2e2e2a9cebf5a468d6d46ee2883f1026df Mon Sep 17 00:00:00 2001 From: aurianer Date: Wed, 9 Oct 2024 18:48:45 +0200 Subject: [PATCH 4/5] Fix missing include --- include/dlaf/eigensolver/band_to_tridiag/mc.h | 1 + src/eigensolver/bt_band_to_tridiag/gpu.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/dlaf/eigensolver/band_to_tridiag/mc.h b/include/dlaf/eigensolver/band_to_tridiag/mc.h index ca680884ac..ede258197d 100644 --- a/include/dlaf/eigensolver/band_to_tridiag/mc.h +++ b/include/dlaf/eigensolver/band_to_tridiag/mc.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/eigensolver/bt_band_to_tridiag/gpu.cpp b/src/eigensolver/bt_band_to_tridiag/gpu.cpp index bc806bc7e8..86884b7162 100644 --- a/src/eigensolver/bt_band_to_tridiag/gpu.cpp +++ b/src/eigensolver/bt_band_to_tridiag/gpu.cpp @@ -8,6 +8,8 @@ // SPDX-License-Identifier: BSD-3-Clause // +#include + #include namespace dlaf::eigensolver::internal { From 86429095ae15ebb26d927f6f5af66d69b43af15d Mon Sep 17 00:00:00 2001 From: aurianer Date: Mon, 14 Oct 2024 10:53:47 +0200 Subject: [PATCH 5/5] Make use of option_name_dashes --- miniapp/include/dlaf/miniapp/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniapp/include/dlaf/miniapp/options.h b/miniapp/include/dlaf/miniapp/options.h index fc2248ab20..5254ce9291 100644 --- a/miniapp/include/dlaf/miniapp/options.h +++ b/miniapp/include/dlaf/miniapp/options.h @@ -170,7 +170,7 @@ T stringToBlasEnum(const std::string& option_name, const std::string& x, } } std::string option_name_dashes = "--" + option_name; - DLAF_MINIAPP_INVALID_OPTION_VALUE(option_name, x, valid_values_stream.str()); + DLAF_MINIAPP_INVALID_OPTION_VALUE(option_name_dashes, x, valid_values_stream.str()); } return static_cast(std::toupper(x[0]));