update 3.8 v2 (#2112)

* update 3.8 v2

* update 3.8

---------

Co-authored-by: yuzhai <yuzhai@nvidia.com>
This commit is contained in:
Yujia Zhai
2025-02-19 19:03:14 -08:00
committed by GitHub
parent e9627ce55b
commit b84e9802d8
166 changed files with 3986 additions and 4037 deletions

View File

@@ -35,6 +35,8 @@
#include <cutlass/blas3_types.h>
#include <cutlass/gemm_coord.h>
#include <optional>
/////////////////////////////////////////////////////////////////////////////////////////////////
namespace cutlass {
@@ -300,13 +302,34 @@ struct GemmDescription : public OperationDescription {
transform_B(transform_B) {}
};
struct BlockScaleDescription {
/// Describes the SFA operand
TensorDescription SFA;
/// Describes the SFB operand
TensorDescription SFB;
/// Describes the SFD operand
TensorDescription SFD;
/// Describes the input ScaleFactor VectorSize
int SFVecSize;
/// Describes the Output ScaleFactor VectorSize
int EpilogueSFVecSize;
};
struct GroupedGemmDescription : public OperationDescription {
GemmDescription gemm;
std::optional<BlockScaleDescription> block_scales;
};
/// Description of all GEMM computations
struct BlockScaledGemmDescription : public OperationDescription {
/// Indicates the kind of GEMM performed
GemmKind gemm_kind;
/// Describes the A operand
TensorDescription A;

View File

@@ -336,11 +336,10 @@ struct GemmUniversalArguments {
void *packed_Scale{nullptr}; // Packed scale for int4 * fp8
int device_index{0};
bool use_pdl{false};
};
/// Block Scaled GEMM
//
// OperationKind: kBlockScaledGemm
@@ -495,29 +494,31 @@ struct GemmGroupedConfiguration {
int64_t* lda;
int64_t* ldb;
int64_t* ldc;
cute::Shape<int, int, int>* problem_sizes_3x_host;
};
struct GemmGroupedArguments {
int problem_count{};
gemm::GemmCoord* problem_sizes{nullptr};
void * ptr_A{nullptr};
void * ptr_B{nullptr};
void * ptr_C{nullptr};
void * ptr_D{nullptr};
void* ptr_A{nullptr};
void* ptr_B{nullptr};
void* ptr_C{nullptr};
void* ptr_D{nullptr};
int64_t *lda{nullptr};
int64_t *ldb{nullptr};
int64_t *ldc{nullptr};
int64_t *ldd{nullptr};
int64_t* lda{nullptr};
int64_t* ldb{nullptr};
int64_t* ldc{nullptr};
int64_t* ldd{nullptr};
void const *alpha{nullptr};
void const *beta{nullptr};
ScalarPointerMode pointer_mode{};
bool use_pdl{false};
gemm::GemmCoord cluster_shape{};
gemm::GemmCoord cluster_shape_fallback{};
gemm::GemmCoord cluster_shape{};
gemm::GemmCoord cluster_shape_fallback{};
// these should really be in the configuration but staying consistent with GEMM
int sm_count{0};
@@ -529,6 +530,13 @@ struct GemmGroupedArguments {
cute::Shape<int, int, int>* problem_sizes_3x_host;
};
struct GroupedGemmBlockScaledArguments : GemmGroupedArguments {
void* SFA{nullptr};
void* SFB{nullptr};
void* SFD{nullptr};
void* norm_constant{nullptr};
};
/////////////////////////////////////////////////////////////////////////////////////////////////
//
// OperationKind: kSparseGemm