Hi,
I have the following code CUTLASS kernel that uses GemmSplitKParallel (code 1) and I want to add ThreadblockSwizzle and Stages to the GemmSplitKParallel. I changed it as code 2 (in the following). But it is not compiled. Please help me how to fix the bug. Thank you.
code 1 ———————————-
using ElementAccumulator = float; // accumulator type
using ElementComputeEpilogue = ElementAccumulator; // epilogue compute type
using ElementInputA = cutlass::half_t; // input A type (FP16)
using ElementInputB = cutlass::half_t; // input B type (FP16)
using ElementOutput = float; // output type (FP32)
using LayoutInputA = cutlass::layout::ColumnMajor;
using LayoutInputB = cutlass::layout::RowMajor;
using LayoutOutput = cutlass::layout::RowMajor;
using MMAOp = cutlass::arch::OpClassTensorOp;
using SmArch = cutlass::arch::Sm80;
using ShapeMMAThreadBlock =
cutlass::gemm::GemmShape<128, 128, 32>; // threadblock tile (M,N,K) //default
using ShapeMMAWarp = cutlass::gemm::GemmShape<64, 64, 32>; // warp tile //default
using ShapeMMAOp = cutlass::gemm::GemmShape<16, 8, 8>; // MMA Op tile (may be tuned)
using EpilogueOp = cutlass::epilogue::thread::LinearCombination<
ElementOutput, // output element type
128 / cutlass::sizeof_bits::value, // elements per vectorized access (128 bits / bits-per-element)
ElementAccumulator, // accumulator type
ElementComputeEpilogue>; // compute type for alpha/beta
// CUTLASS GemmSplitKParallel instantiation
using Gemm = cutlass::gemm::device::GemmSplitKParallel<
ElementInputA,
LayoutInputA,
ElementInputB,
LayoutInputB,
ElementOutput,
LayoutOutput,
ElementAccumulator,
MMAOp,
SmArch,
ShapeMMAThreadBlock,
ShapeMMAWarp,
ShapeMMAOp,
EpilogueOp>;
code 2————————————————————————-
using ElementAccumulator = float; // accumulator type
using ElementComputeEpilogue = ElementAccumulator; // epilogue compute type
using ElementInputA = cutlass::half_t; // input A type (FP16)
using ElementInputB = cutlass::half_t; // input B type (FP16)
using ElementOutput = float; // output type (FP32)
using LayoutInputA = cutlass::layout::ColumnMajor;
using LayoutInputB = cutlass::layout::RowMajor;
using LayoutOutput = cutlass::layout::RowMajor;
using MMAOp = cutlass::arch::OpClassTensorOp;
using SmArch = cutlass::arch::Sm80;
using ShapeMMAThreadBlock =
cutlass::gemm::GemmShape<128, 128, 32>; // threadblock tile (M,N,K) //default
using ShapeMMAWarp = cutlass::gemm::GemmShape<64, 64, 32>; // warp tile //default
using ShapeMMAOp = cutlass::gemm::GemmShape<16, 8, 8>; // MMA Op tile (may be tuned)
using EpilogueOp = cutlass::epilogue::thread::LinearCombination<
ElementOutput, // output element type
128 / cutlass::sizeof_bits::value, // elements per vectorized access (128 bits / bits-per-element)
ElementAccumulator, // accumulator type
ElementComputeEpilogue>; // compute type for alpha/beta
using ThreadblockSwizzle = cutlass::gemm::threadblock::GemmIdentityThreadblockSwizzle<>;
constexpr int Stages = 2; // typical values: 2 or 3 (choose based on latency / occupancy)
// CUTLASS GemmSplitKParallel instantiation
using Gemm = cutlass::gemm::device::GemmSplitKParallel<
ElementInputA,
LayoutInputA,
ElementInputB,
LayoutInputB,
ElementOutput,
LayoutOutput,
ElementAccumulator,
MMAOp,
SmArch,
ShapeMMAThreadBlock,
ShapeMMAWarp,
ShapeMMAOp,
EpilogueOp,
ThreadblockSwizzle,
Stages
>;