Skip to content
Merged
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
18 changes: 17 additions & 1 deletion include/matx/executors/support.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ namespace matx {
#define MATX_EN_CPU_SOLVER 0
#endif

// Sparse Solver
#if defined(MATX_EN_CUDSS)
#define MATX_EN_CUDSS_SOLVER 1
#else
#define MATX_EN_CUDSS_SOLVER 0
#endif

template <typename Exec, typename T>
constexpr bool CheckFFTSupport() {
if constexpr (is_host_executor_v<Exec>) {
Expand Down Expand Up @@ -130,5 +137,14 @@ constexpr bool CheckSolverSupport() {
}
}

template <typename Exec>
constexpr bool CheckDssSolverSupport() {
if constexpr (is_host_executor_v<Exec>) {
return false;
} else {
return MATX_EN_CUDSS_SOLVER;
}
}

}; // detail
}; // matx
}; // matx
7 changes: 7 additions & 0 deletions test/00_sparse/Solve.cu
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ using namespace matx;

template <typename T> class SolveSparseTest : public ::testing::Test {
protected:
using GTestType = cuda::std::tuple_element_t<0, T>;
using GExecType = cuda::std::tuple_element_t<1, T>;
void SetUp() override {
if constexpr (!detail::CheckDssSolverSupport<GExecType>()) {
GTEST_SKIP();
}
}
float thresh = 0.001f;
};

Expand Down