Skip to content
Merged
Changes from 2 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
27 changes: 14 additions & 13 deletions transformer_engine/common/gemm/rocm_gemm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ void cublas_gemm(const Tensor *inputA, const Tensor *inputB, Tensor *outputD,

#ifdef USE_HIPKITTENS_GEMM

bool use_hipkittens = false;
bool use_hipkittens = false, hipkittens_gemm_complete = false;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused variable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed that. Should be fixed now.

if (is_mxfp8) {
bool is_gfx950 = (cuda::sm_arch() == 95);
bool force_hipblaslt = false;
Expand All @@ -1999,18 +1999,19 @@ void cublas_gemm(const Tensor *inputA, const Tensor *inputB, Tensor *outputD,
if (use_hipkittens) {
auto param = CanonicalizeGemmInput(*inputA, transa, *inputB, transb, m, n, k);

kittens_mxfp8_gemm(param.A, param.B, outputD->data.dptr,
param.A_scale_inv, param.B_scale_inv,
m, n, k, is_transa, is_transb,
static_cast<int>(param.Atype),
static_cast<int>(param.Btype),
inputBias->data.dptr,
static_cast<int>(inputBias->data.dtype),
outputPreGelu->data.dptr,
static_cast<int>(outputD->data.dtype),
static_cast<int>(outputPreGelu->data.dtype),
workspace, workspaceSize, gemm_stream);
} else {
use_hipkittens = kittens_mxfp8_gemm(param.A, param.B, outputD->data.dptr,
param.A_scale_inv, param.B_scale_inv,
m, n, k, is_transa, is_transb,
static_cast<int>(param.Atype),
static_cast<int>(param.Btype),
inputBias->data.dptr,
static_cast<int>(inputBias->data.dtype),
outputPreGelu->data.dptr,
static_cast<int>(outputD->data.dtype),
static_cast<int>(outputPreGelu->data.dtype),
workspace, workspaceSize, gemm_stream);
}
if (!use_hipkittens) {
#endif
// FIXME(https://amd-hub.atlassian.net/browse/ROCM-26110): Remove this workaround once hipBLASLt supports NN/NT
// layouts for MXFP8 on gfx1250.
Expand Down
Loading