diff --git a/tests/unit/vector/GramSchmidtTests.hpp b/tests/unit/vector/GramSchmidtTests.hpp index d77c1ed9..e2af249f 100644 --- a/tests/unit/vector/GramSchmidtTests.hpp +++ b/tests/unit/vector/GramSchmidtTests.hpp @@ -132,6 +132,12 @@ namespace ReSolve { LinAlgWorkspaceCUDA* workspace = new LinAlgWorkspaceCUDA(); workspace->initializeHandles(); return new VectorHandler(workspace); +#endif +#ifdef RESOLVE_USE_HIP + } else if (memspace_ == "hip") { + LinAlgWorkspaceHIP* workspace = new LinAlgWorkspaceHIP(); + workspace->initializeHandles(); + return new VectorHandler(workspace); #endif } else { std::cout << "ReSolve not built with support for memory space " << memspace_ << "\n"; diff --git a/tests/unit/vector/runGramSchmidtTests.cpp b/tests/unit/vector/runGramSchmidtTests.cpp index 832f1310..56404518 100644 --- a/tests/unit/vector/runGramSchmidtTests.cpp +++ b/tests/unit/vector/runGramSchmidtTests.cpp @@ -21,8 +21,22 @@ int main(int, char**) } #endif +#ifdef RESOLVE_USE_HIP { - std::cout << "Running tests on CPU!:\n"; + std::cout << "Running tests with HIP backend:\n"; + ReSolve::tests::GramSchmidtTests test("hip"); + + result += test.GramSchmidtConstructor(); + result += test.orthogonalize(5000, ReSolve::GramSchmidt::mgs); + result += test.orthogonalize(5000, ReSolve::GramSchmidt::cgs2); + result += test.orthogonalize(5000, ReSolve::GramSchmidt::mgs_two_synch); + result += test.orthogonalize(5000, ReSolve::GramSchmidt::mgs_pm); + std::cout << "\n"; + } +#endif + + { + std::cout << "Running tests on the CPU:\n"; ReSolve::tests::GramSchmidtTests test("cpu"); result += test.GramSchmidtConstructor();