Skip to content

Create NVFP4 grouped gemm bindings in direct bindings #4662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: grouped_gemm
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ if(BUILD_CUTLASS)
set(NVFUSER_CUTLASS_SRCS)
list(APPEND NVFUSER_CUTLASS_SRCS
${NVFUSER_CUTLASS}/fp8_blockwise_moe_kernel.cu
${NVFUSER_CUTLASS}/nvfp4_blockwise_moe_kernel.cu
${NVFUSER_CUTLASS}/cutlass_utils.cpp
)
add_library(nvf_cutlass SHARED ${NVFUSER_CUTLASS_SRCS})
Expand Down
13 changes: 13 additions & 0 deletions cutlass/nvf_cutlass.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,17 @@ void fp8_blockwise_scaled_grouped_mm(
const torch::Tensor& expert_offsets,
const torch::Tensor& workspace);

void nvfp4_blockwise_scaled_grouped_mm(
torch::Tensor& output,
const torch::Tensor& a,
const torch::Tensor& b,
const torch::Tensor& a_blockscale,
const torch::Tensor& b_blockscales,
const torch::Tensor& alphas,
const torch::Tensor& ab_strides,
const torch::Tensor& c_strides,
const torch::Tensor& problem_sizes,
const torch::Tensor& expert_offsets,
const torch::Tensor& sf_offsets);

} // namespace nvfuser::cutlass_kernels
Loading