Skip to content

Commit

Permalink
Faster batched SVD for small sizes (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffburdick authored Nov 22, 2024
1 parent b5fe2da commit c33d749
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 44 deletions.
6 changes: 3 additions & 3 deletions include/matx/transforms/solver_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ __MATX_INLINE__ char SVDModeToChar(SVDMode jobz) {


template <typename Op, typename Executor>
__MATX_INLINE__ auto getSolverSupportedTensor(const Op &in, const Executor &exec) {
__MATX_INLINE__ auto getSolverSupportedTensor(const Op &in, const Executor &exec, bool force = false) {
constexpr int RANK = Op::Rank();

bool supported = true;
bool supported = !force; // If we're forcing a new tensor just make it unsupported
if constexpr (!(is_tensor_view_v<Op>)) {
supported = false;
} else {
Expand Down Expand Up @@ -274,7 +274,7 @@ class matxDnCUDASolver_t {
}
}
else {
#endif
#endif
if (dspace > 0) {
matxAlloc(&d_workspace, batches * dspace, MATX_DEVICE_MEMORY);
}
Expand Down
Loading

0 comments on commit c33d749

Please sign in to comment.