| 1 | #pragma once |
| 2 | |
| 3 | #include "libtorch_stable/cutlass_extensions/vllm_collective_builder.cuh" |
| 4 | #include "machete_mainloop.cuh" |
| 5 | |
| 6 | namespace cutlass::gemm::collective { |
| 7 | using namespace cute; |
| 8 | |
| 9 | struct MacheteKernelTag {}; |
| 10 | |
| 11 | template <class ElementPairA_, class GmemLayoutA_, int AlignmentA, |
| 12 | class ElementPairB_, class GmemLayoutB_, int AlignmentB, |
| 13 | class ElementAccumulator, class TileShape_MNK, class ClusterShape_MNK, |
| 14 | class StageCountType, class KernelScheduleType> |
| 15 | struct VLLMCollectiveBuilder< |
| 16 | MacheteKernelTag, arch::Sm90, arch::OpClassTensorOp, ElementPairA_, |
| 17 | GmemLayoutA_, AlignmentA, ElementPairB_, GmemLayoutB_, AlignmentB, |
| 18 | ElementAccumulator, TileShape_MNK, ClusterShape_MNK, StageCountType, |
| 19 | KernelScheduleType, |
| 20 | cute::enable_if_t<( |
| 21 | cute::is_same_v<KernelScheduleType, KernelTmaWarpSpecialized> || |
| 22 | cute::is_same_v<KernelScheduleType, KernelTmaWarpSpecializedPingpong> || |
| 23 | cute::is_same_v<KernelScheduleType, |
| 24 | KernelTmaWarpSpecializedCooperative>)>> { |
| 25 | using CollectiveOp = machete::MacheteCollectiveMma< |
| 26 | ElementPairA_, GmemLayoutA_, AlignmentA, ElementPairB_, GmemLayoutB_, |
| 27 | AlignmentB, ElementAccumulator, TileShape_MNK, ClusterShape_MNK, |
| 28 | StageCountType, KernelScheduleType>; |
| 29 | }; |
| 30 | |
| 31 | }; // namespace cutlass::gemm::collective |