Fix epilogue:🧵:Convert cannot be used with cute::collective::DefaultEpilogue. (#2333)

This commit is contained in:
Wenbo Yang
2025-07-31 10:12:53 +08:00
committed by GitHub
parent da47886e34
commit 6c891db9f6

View File

@ -62,6 +62,7 @@ public:
using ElementOutput = ElementOutput_;
using ElementAccumulator = ElementAccumulator_;
using ElementCompute = ElementAccumulator_;
using ElementD = ElementOutput; // for use with cute::collective::DefaultEpilogue
static int const kCount = Count;
@ -123,6 +124,21 @@ public:
return destination_converter(accumulator);
}
//
// Specializations for scalar (for use with cute::collective::DefaultEpilogue)
//
CUTLASS_HOST_DEVICE
ElementD operator()(ElementAccumulator const accumulator, ElementAccumulator const source) const {
NumericConverter<ElementD, ElementAccumulator, Round> destination_converter;
return destination_converter(source);
}
CUTLASS_HOST_DEVICE
ElementD operator()(ElementAccumulator const accumulator) const {
NumericConverter<ElementD, ElementAccumulator, Round> destination_converter;
return destination_converter(accumulator);
}
};
/////////////////////////////////////////////////////////////////////////////////////////////////