-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MMA_FROM_SMEM_IT_RES] Change how residuals are handled (#393)
Co-authored-by: danthe3rd <danthe3rd>
- Loading branch information
Showing
5 changed files
with
396 additions
and
338 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
xformers/components/attention/csrc/cuda/mem_eff_attention/iterators/make_residual_last.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#pragma once | ||
|
||
#include "predicated_tile_access_iterator_residual_last.h" | ||
#include "predicated_tile_iterator_residual_last.h" | ||
|
||
namespace cutlass { | ||
namespace transform { | ||
namespace threadblock { | ||
|
||
template <typename BaseIterator> | ||
struct MakeIteratorResidualLast; | ||
|
||
template < | ||
typename Shape, | ||
typename Element, | ||
typename Layout, | ||
int AdvanceRank, | ||
typename ThreadMap, | ||
int AccessSize, | ||
bool Gather> | ||
struct MakeIteratorResidualLast<PredicatedTileIterator< | ||
Shape, | ||
Element, | ||
Layout, | ||
AdvanceRank, | ||
ThreadMap, | ||
AccessSize, | ||
Gather>> { | ||
using Iterator = PredicatedTileIteratorResidualLast< | ||
Shape, | ||
Element, | ||
Layout, | ||
AdvanceRank, | ||
ThreadMap, | ||
AccessSize, | ||
Gather>; | ||
}; | ||
|
||
template < | ||
typename Shape, | ||
typename Element, | ||
typename Layout, | ||
int AdvanceRank, | ||
typename ThreadMap, | ||
typename AccessType, | ||
bool Gather> | ||
struct MakeIteratorResidualLast<PredicatedTileAccessIterator< | ||
Shape, | ||
Element, | ||
Layout, | ||
AdvanceRank, | ||
ThreadMap, | ||
AccessType, | ||
Gather>> { | ||
using Iterator = PredicatedTileAccessIteratorResidualLast< | ||
Shape, | ||
Element, | ||
Layout, | ||
AdvanceRank, | ||
ThreadMap, | ||
AccessType, | ||
Gather>; | ||
}; | ||
} // namespace threadblock | ||
} // namespace transform | ||
} // namespace cutlass |
Oops, something went wrong.