Skip to content
Draft
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
25 changes: 19 additions & 6 deletions include/cutlass/epilogue/collective/xe_epilogue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,21 @@ class CollectiveEpilogue<
}
}

bool is_beta_zero = (args.thread.beta == decltype(args.thread.beta)(0));
bool beta_implementable = true;

if (!is_source_supported || args.ptr_C == nullptr) {
beta_implementable = is_beta_zero;
}

if constexpr (is_source_supported) {
constexpr int min_aligned_elements_C = copy_alignment_bits / sizeof_bits<ElementC>::value;
implementable &= cutlass::detail::check_alignment<min_aligned_elements_C>(cute::make_shape(M,N,L), args.dC);
if (L > 1) {
constexpr int min_batch_aligned_elements_C = batch_alignment_bits / sizeof_bits<ElementC>::value;
implementable &= get<2>(args.dC) % min_batch_aligned_elements_C == 0;
if (!is_beta_zero) {
constexpr int min_aligned_elements_C = copy_alignment_bits / sizeof_bits<ElementC>::value;
implementable &= cutlass::detail::check_alignment<min_aligned_elements_C>(cute::make_shape(M,N,L), args.dC);
if (L > 1) {
constexpr int min_batch_aligned_elements_C = batch_alignment_bits / sizeof_bits<ElementC>::value;
implementable &= get<2>(args.dC) % min_batch_aligned_elements_C == 0;
}
}
}

Expand All @@ -257,7 +266,11 @@ class CollectiveEpilogue<
CUTLASS_TRACE_HOST(" CAN IMPLEMENT: Problem Size doesn't meet the minimum requirements for FusionCallbacks.\n");
}

return implementable && fusion_implementable;
if (!beta_implementable) {
CUTLASS_TRACE_HOST(" CAN IMPLEMENT: Beta was set, but epilogue is sourceless (void-C).\n");
}

return implementable && beta_implementable && fusion_implementable;
}

CUTLASS_HOST_DEVICE
Expand Down