releaase 2.11 (#703)
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "cutlass/cutlass.h"
|
||||
#include "cutlass/array.h"
|
||||
#include "cutlass/functional.h"
|
||||
|
||||
namespace cutlass {
|
||||
|
||||
@@ -55,17 +56,31 @@ template <
|
||||
>
|
||||
class WmmaFragmentArray: public Array<T, N, true> {
|
||||
public:
|
||||
|
||||
/// Efficient clear method (override Array::clear())
|
||||
CUTLASS_HOST_DEVICE
|
||||
void clear() {
|
||||
|
||||
for(int i=0; i<Array<T, N, true>::kElements; i++) {
|
||||
|
||||
void clear()
|
||||
{
|
||||
for(int i = 0; i < Array<T, N, true>::kElements; i++)
|
||||
{
|
||||
nvcuda::wmma::fill_fragment((*this)[i], (typename T::element_type)0);
|
||||
}
|
||||
}
|
||||
|
||||
CUTLASS_HOST_DEVICE
|
||||
WmmaFragmentArray<T, N>& operator+=(const WmmaFragmentArray<T, N>& rhs)
|
||||
{
|
||||
using element_type = typename T::element_type;
|
||||
plus<T> add;
|
||||
|
||||
for (int i = 0; i < Array<T, N, true>::kElements; i++)
|
||||
{
|
||||
(*this)[i] = add((*this)[i], rhs[i]);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user