Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2c7b930
[Common][PyTorch] Add MoE EP communication/GEMM overlap ops (FusedMoE…
phu0ngng Nov 24, 2026
f21a6bb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 24, 2026
cd2cac7
[Common] Follow the NCCL EP signal unit rename and pass whole push ti…
phu0ngng Nov 24, 2026
1a69da3
[Common] Default the NCCL EP combine last-chunk push to 64 SMs
phu0ngng Nov 25, 2026
6f9500f
Move the CuTeDSL EP scaling modes to the shared util and make the MoE…
phu0ngng Dec 1, 2026
445e222
Reuse the shared grouped MXFP8 requant with PDL for the EP weight gra…
phu0ngng Dec 1, 2026
0e36fa6
Add an activation-type parameter to the EP GEMM calls and move their …
phu0ngng Dec 1, 2026
38dba2e
Load the EP CuTeDSL grouped GEMMs from the cuDNN frontend package and…
phu0ngng Dec 1, 2026
31efb26
Move the EP GEMM checks and wrappers into shared headers and name the…
phu0ngng Dec 1, 2026
7eeff64
Pass MXFP8 tensors to the EP overlap GEMMs, require glu_interleave_si…
phu0ngng Dec 1, 2026
6da7b77
Move the MoE overlap tests into TestMoeEpSequential and drop the glu_…
phu0ngng Dec 1, 2026
2c23828
Document that the fused dispatch writes total_recv_tokens from its ex…
phu0ngng Dec 1, 2026
4e5c65c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2026
7c2a999
[Common] Pass the NCCL EP readiness signal as a 2D tile
phu0ngng Dec 1, 2026
fd1cac5
[Common] Chain EP weight gradients with PDL on cuDNN FE MXFP8 kernels
phu0ngng Dec 1, 2026
f7eca1b
[PyTorch] Skip EP overlap test passes at expert alignment 128 and 64
phu0ngng Dec 1, 2026
1fe6fd0
[Common] Skip the columnwise dGLU outputs of frozen FusedMoE weights
phu0ngng Dec 1, 2026
31f3e22
[PyTorch] Pass int64 expert offsets to the cuDNN FE grouped GEMMs
phu0ngng Dec 1, 2026
54a81e9
[Common] Make NVTE_MOE_OVERLAP a 0/1 toggle and rename nvte_ep_overla…
phu0ngng Dec 1, 2026
e94c0e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2026
8b3167b
Clean up the MoE overlap alignment check, NVTE_MOE_OVERLAP wording an…
phu0ngng Dec 1, 2026
c458e50
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 1, 2026
b44c021
[Common] BF16 FC2 weight gradient waits per tile on the dispatch flag…
phu0ngng Dec 1, 2026
2e146b3
[Common] Run BF16 weight gradients that do not wait on the dispatch f…
phu0ngng Dec 1, 2026
be21d43
[Common][PyTorch] Take the MoE overlap expert offsets and counts from…
phu0ngng Dec 2, 2026
1462cf7
Bump nccl-extensions to the restacked NCCL EP integ branch
phu0ngng Dec 2, 2026
62a0d2a
[Common][PyTorch] Add EP SM config with per-direction budgets and las…
phu0ngng Dec 2, 2026
8fa21e0
[Common] Chunk the signaled combine of rows not divisible by 1024 and…
phu0ngng Dec 2, 2026
b6e4884
[Common][PyTorch] Group EP overlap tuning into EpOverlapConfig with d…
phu0ngng Dec 2, 2026
26476fc
Drop the cuDNN FE capability probe and descriptors-only MXFP8 wgrad f…
phu0ngng Dec 2, 2026
4127863
[Common] Run the EP combine backward MXFP8 requant after the dGLU GEM…
phu0ngng Dec 3, 2026
83924e3
[Common] Drop the PDL path of the grouped MXFP8 requant now that both…
phu0ngng Dec 3, 2026
d2199ce
[Common] Remove a detached comment above the EP GEMM signal word setup
phu0ngng Dec 3, 2026
6140895
[Common] Pass the layer config by reference from the EP overlap calls…
phu0ngng Dec 3, 2026
52829bd
[Common] Require the 256 alignment in the EP overlap ops and drop the…
phu0ngng Dec 3, 2026
97279f2
[PyTorch] Keep the SM 10.7 reference flag in the EP tests on one line
phu0ngng Dec 3, 2026
ba08c29
[Common] Forward TVMFFIBacktrace to libtvm_ffi with an empty fallback
phu0ngng Dec 3, 2026
363437b
[Common] Keep the offsets operand of the grouped MXFP8 requant for un…
phu0ngng Dec 3, 2026
46274b6
[Common][PyTorch] Validate the EP overlap entry points, take int64 ex…
phu0ngng Dec 3, 2026
70e6cb5
[Common][PyTorch] Derive the EP overlap combine chunk schedule from g…
phu0ngng Dec 3, 2026
fd58e85
[Common] Match the SM 10.7 EP overlap kernel launches to the FE Rubin…
phu0ngng Dec 3, 2026
71d8563
[PyTorch] Test that the native EP overlap calls name a disabled CuTeD…
phu0ngng Dec 3, 2026
905a6c8
[PyTorch] Require MXFP8 EP transport recipes for MXFP8 FusedMoE and g…
phu0ngng Dec 3, 2026
1c2acf3
[PyTorch] Default the EP transport of MXFP8 FusedMoE to MXFP8 when th…
phu0ngng Dec 3, 2026
1c0bd14
[Common] Build the EP overlap GEMM configs of workspace sizing and la…
phu0ngng Dec 3, 2026
7a918bc
[PyTorch] Test that the cold EP overlap workspace sizing from two hos…
phu0ngng Dec 3, 2026
07862d1
[Common] Size the EP overlap backward combine workspace for both dete…
phu0ngng Dec 3, 2026
27d683c
[PyTorch][Common] Test the EP prepare expert offsets output and the M…
phu0ngng Dec 3, 2026
f869cea
[PyTorch] Drop the cuDNN frontend int64 offsets probe and rely on the…
phu0ngng Dec 3, 2026
ea6b7ac
[PyTorch] Reject strided gradient and routing-weight tensors in the n…
phu0ngng Dec 3, 2026
109d469
[Common] Correct the EP overlap header, bench and env var docs on the…
phu0ngng Dec 3, 2026
970f41f
[Common] Reject dispatch flags for an MXFP8 EP weight gradient config…
phu0ngng Dec 3, 2026
02bc11c
[Common] Merge the duplicate MXFP8 backward kernel branches and share…
phu0ngng Dec 3, 2026
3905403
[PyTorch] Set main_grad on the weights in the EP overlap inference test
phu0ngng Dec 3, 2026
766412a
[Common] Pass the streaming output notify and dependents-at-entry opt…
phu0ngng Dec 3, 2026
7a59c7a
[Common] Skip the columnwise D and SFD in the SM 10.7 MXFP8 dispatch …
phu0ngng Dec 3, 2026
8735d38
[PyTorch] Keep int32 expert offsets in the fused grouped MLP and pass…
phu0ngng Dec 4, 2026
92682b4
[PyTorch] Run the FusedMoE reverse dispatch on every rank so a rank w…
phu0ngng Dec 4, 2026
c2effe9
[PyTorch] Use combine chunk sizes that are multiples of the NCCL EP p…
phu0ngng Dec 4, 2026
1092c3e
[PyTorch] Restore the sub-tile combine chunk cases in the EP overlap …
phu0ngng Dec 4, 2026
efa31a7
[PyTorch] Tighten the EP overlap tests and fold the NCCL EP discovery…
phu0ngng Dec 4, 2026
e54569e
[PyTorch] Clarify the EP overlap docs and CuTeDSL docstrings and trim…
phu0ngng Dec 4, 2026
58497b2
[Common][PyTorch] Shorten the EP backend docs and pass the EP SM and …
phu0ngng Dec 4, 2026
8985c5a
[PyTorch] Drop the int64 offsets dtype test now that the fused groupe…
phu0ngng Dec 4, 2026
a771463
[PyTorch] Test overwrite_main_grad in the EP overlap test on trainabl…
phu0ngng Dec 4, 2026
78d444b
[Common] Write the recomputed activation from the SM 10.7 MXFP8 dGLU …
phu0ngng Dec 4, 2026
8b67109
[Common] Run the EP dispatch backward unsignaled where the forward di…
phu0ngng Dec 4, 2026
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
2 changes: 1 addition & 1 deletion 3rdparty/nccl-extensions
Submodule nccl-extensions updated 240 files
16 changes: 14 additions & 2 deletions docs/api/pytorch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,27 @@ NCCL-based dispatch and combine for experts sharded across ranks. See

``MoeDispatch`` and ``MoeCombine`` can wrap the local expert operations in a
``transformer_engine.pytorch.ops.Sequential``. They share an ``EpConfig`` and
an ``EpBuffer``; the guide shows how to connect the per-expert counts and
routing weights through the sequence's extra-tensor channels.
an ``EpBuffer``. A buffer holds the routing state of one call until its backward has run, so
several calls in flight (for example pipeline microbatches) each need their own ``EpBuffer`` and
op instance. The guide shows how to connect the per-expert counts and routing weights through the
sequence's extra-tensor channels. With the overlap enabled (``NVTE_MOE_OVERLAP=1``), a dispatch,
grouped MLP and combine sequence runs as one fused op. A sequence that does not meet its
requirements raises an error that names the reason, instead of running unfused. The requirements
include BF16 weights and payload, packed weights without bias, ``ScaledSwiGLU`` with
``glu_interleave_size=32``, an EP alignment of 256, no recipe or ``MXFP8BlockScaling``, no delayed
weight gradient computation, and one shared ``EpConfig`` and ``EpBuffer``. See ``FusedMoE`` for the
full list.

.. autoapiclass:: transformer_engine.pytorch.ops.MoeDispatch

.. autoapiclass:: transformer_engine.pytorch.ops.MoeCombine

.. autoapiclass:: transformer_engine.pytorch.ep.EpConfig

.. autoapiclass:: transformer_engine.pytorch.ep.EpSmConfig

.. autoapiclass:: transformer_engine.pytorch.ep.EpOverlapConfig

.. autoapifunction:: transformer_engine.pytorch.ep.ep_bootstrap

.. autoapifunction:: transformer_engine.pytorch.ep.ep_finalize
Expand Down
20 changes: 20 additions & 0 deletions docs/envvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,26 @@ General
``WARN`` emits a warning explaining why CuTeDSL kernels are unavailable and falls back to CUDA kernels. ``ERROR`` raises an error and fails instead.
Only effective when the CuTeDSL backend is enabled (see :envvar:`NVTE_ENABLE_CUTEDSL_BACKEND`).

.. envvar:: NVTE_MOE_OVERLAP

:Type: ``int`` (0 or 1)
:Default: ``0``
:Description: Set to ``1`` to overlap the NCCL EP dispatch and combine with the expert grouped
GEMMs (``ep_gemm.h``, used by the fused
:class:`transformer_engine.pytorch.ops.MoeDispatch` expert MLP). Requires a
Transformer Engine build with ``NVTE_WITH_CUTEDSL=1``,
``NVTE_ENABLE_CUTEDSL_BACKEND=1``, an SM 10.0, 10.3 or 10.7 GPU and a cuDNN
frontend package whose CuTeDSL grouped GEMMs take int64 expert offsets. If
``0``, the unfused ops run; if ``1``, a
dispatch, grouped MLP and combine sequence that cannot run fused raises an error.
With it set, ``ep_bootstrap`` defaults ``max_num_sms`` to 24 unless ``zero_copy`` is on.
With ``NVTE_ALLOW_NONDETERMINISTIC_ALGO=0`` or
``torch.use_deterministic_algorithms(True)``, the fused backward reduces the
routing-weight gradient in a fixed order. This needs a per-token scratch of one
fp32 slot per output tile column in the overlap workspace, and the setting is
fixed when a CUDA graph is captured. The weight gradients are not yet reproducible
bit for bit.

.. envvar:: NVTE_GROUPED_TENSOR_HANDLE_POOL_SIZE_MB

:Type: ``int`` (positive integer)
Expand Down
266 changes: 266 additions & 0 deletions examples/pytorch/ep/bench/bench_moe_overlap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

"""Timing harness for the overlapped MoE op (FusedMoE), forward and backward, in eager and
CUDA-graph modes. Launch with torchrun, one process per GPU:

NVTE_ENABLE_CUTEDSL_BACKEND=1 NVTE_MOE_OVERLAP=1 \\
torchrun --standalone --nproc-per-node=4 bench_moe_overlap.py --precision bf16

The op fuses an MoE MLP (dispatch, GroupedLinear, ScaledSwiGLU, GroupedLinear, combine) so the
NCCL EP dispatch and combine overlap the expert GEMMs. Requires SM 10.0, 10.3 or 10.7 and an EP
group within one NVLink domain. The defaults match the DeepSeek-V3 EP4 shape.
"""

import argparse
import os
import statistics

import torch
import torch.distributed as dist

import transformer_engine.pytorch as te
from transformer_engine.pytorch import ops as te_ops
from transformer_engine.common.recipe import MXFP8BlockScaling
from transformer_engine.pytorch.ep import EpBuffer, EpConfig, EpSmConfig, ep_bootstrap, ep_finalize
from transformer_engine.pytorch.ops.fused import moe_overlap


def _parse_args():
p = argparse.ArgumentParser(description="FusedMoE forward+backward perf bench")
p.add_argument("--precision", choices=("bf16", "mxfp8"), default="bf16")
p.add_argument("--mode", choices=("eager", "graph", "both"), default="both")
p.add_argument("--tokens-per-rank", type=int, default=4096)
p.add_argument("--hidden-dim", type=int, default=7168)
p.add_argument("--ffn", type=int, default=2048)
p.add_argument("--top-k", type=int, default=8)
p.add_argument("--num-local-experts", type=int, default=64)
p.add_argument("--alignment", type=int, default=256)
p.add_argument("--recv-capacity-per-rank", type=int, default=131072)
p.add_argument(
"--comm-sms",
default="32,32,32,32",
help="SMs the EP keeps for dispatch_fwd,combine_fwd,dispatch_bwd,combine_bwd",
)
p.add_argument("--iters", type=int, default=50)
p.add_argument("--warmup", type=int, default=10)
args = p.parse_args()
if args.iters < 1 or args.warmup < 0:
p.error("--iters must be positive and --warmup nonnegative")
return args


def _build(args):
recipe = MXFP8BlockScaling() if args.precision == "mxfp8" else None
dist.init_process_group(backend="nccl")
torch.cuda.set_device(int(os.environ["LOCAL_RANK"]))
device = torch.device("cuda", torch.cuda.current_device())
ep_size = dist.get_world_size()
num_experts = args.num_local_experts * ep_size
ep_group = dist.new_group(ranks=list(range(ep_size)), backend="nccl")

sms = [int(s) for s in args.comm_sms.split(",")]
ep_bootstrap(
ep_group,
num_experts=num_experts,
max_tokens_per_rank=args.tokens_per_rank,
hidden_dim=args.hidden_dim,
num_topk=args.top_k,
recv_capacity_per_rank=args.recv_capacity_per_rank,
max_num_sms=max(sms),
sm_config=EpSmConfig(*sms),
)

config = EpConfig(
top_k=args.top_k,
max_tokens_per_rank=args.tokens_per_rank,
hidden_dim=args.hidden_dim,
num_local_experts=args.num_local_experts,
recv_capacity_per_rank=args.recv_capacity_per_rank,
ep_group=ep_group,
alignment=args.alignment,
dispatch_fwd_quant_recipe=recipe,
combine_bwd_quant_recipe=recipe,
)
buffer = EpBuffer(
top_k=config.top_k,
max_tokens_per_rank=config.max_tokens_per_rank,
hidden_dim=config.hidden_dim,
num_local_experts=config.num_local_experts,
recv_capacity_per_rank=config.recv_capacity_per_rank,
alignment=config.alignment,
payload_dtype=config.payload_dtype,
dispatch_fwd_quant_recipe=config.dispatch_fwd_quant_recipe,
combine_bwd_quant_recipe=config.combine_bwd_quant_recipe,
)
return recipe, num_experts, device, te_ops.Sequential(*_moe_ops(args, config, buffer, device))


def _moe_ops(args, config, buffer, device):
"""MoeDispatch, GroupedLinear, ScaledSwiGLU, GroupedLinear and MoeCombine with the routing
channels connected: the dispatch forwards the expert counts and routing weights to the GEMMs
and the activation, so the sequence fuses into one FusedMoE."""
gen = torch.Generator(device=device).manual_seed(5)
linear_kwargs = {
"bias": False,
"dtype": torch.bfloat16,
"single_grouped_weight": True,
"split_alignment": args.alignment,
}
dispatch = te_ops.MoeDispatch(config, buffer)
fc1 = te_ops.GroupedLinear(
args.num_local_experts, args.hidden_dim, 2 * args.ffn, device=device, **linear_kwargs
)
fc2 = te_ops.GroupedLinear(
args.num_local_experts, args.ffn, args.hidden_dim, device=device, **linear_kwargs
)
act = te_ops.ScaledSwiGLU(glu_interleave_size=32)
combine = te_ops.MoeCombine(config, buffer)
with torch.no_grad():
for fc in (fc1, fc2):
for w in fc.parameters():
w.copy_((torch.rand(w.shape, device=device, generator=gen) - 0.5) * 0.1)
dispatch.set_extra_output_channel(0, "tokens_per_expert", output_to_caller=False)
dispatch.set_extra_output_channel(1, "routing_weights", output_to_caller=False)
fc1.set_extra_input_channel(0, "tokens_per_expert")
act.set_extra_input_channel(0, "routing_weights")
fc2.set_extra_input_channel(0, "tokens_per_expert")
return dispatch, fc1, act, fc2, combine


def _inputs(args, num_experts, device):
gen = torch.Generator(device=device).manual_seed(2026 + dist.get_rank())
tokens = (
torch.randn(args.tokens_per_rank, args.hidden_dim, generator=gen, device=device) * 0.25
).to(torch.bfloat16)
logits = torch.randn(args.tokens_per_rank, num_experts, generator=gen, device=device)
topk_logits, topk_idx = torch.topk(logits, args.top_k, dim=-1)
topk_w = torch.softmax(topk_logits, dim=-1)
grad_out = torch.randn(tokens.shape, generator=gen, device=device).to(torch.bfloat16)
return topk_idx, tokens.requires_grad_(True), topk_w.requires_grad_(True), grad_out


def _autocast(recipe):
return te.autocast(enabled=recipe is not None, recipe=recipe)


def _assert_fused(args, recipe, num_experts, device, model):
topk_idx, x, topk_w, grad_out = _inputs(args, num_experts, device)
with _autocast(recipe):
y = model(x, topk_idx, topk_w, topk_idx)
y.backward(grad_out)
torch.cuda.synchronize()
fused = any(
isinstance(op, moe_overlap.FusedMoE)
for group in model._module_groups
for op, _ in getattr(group, "_forward_ops", [])
)
if not fused:
raise RuntimeError("FusedMoE did not fuse; the measurement would be the unfused path")


def _run_eager(args, recipe, num_experts, device, model):
topk_idx, x, topk_w, grad_out = _inputs(args, num_experts, device)
for _ in range(args.warmup):
x.grad = topk_w.grad = None
with _autocast(recipe):
y = model(x, topk_idx, topk_w, topk_idx)
y.backward(grad_out)
torch.cuda.synchronize()

fwd_t, bwd_t, tot_t = [], [], []
ev = [torch.cuda.Event(enable_timing=True) for _ in range(3)]
for _ in range(args.iters):
x.grad = topk_w.grad = None
ev[0].record()
with _autocast(recipe):
y = model(x, topk_idx, topk_w, topk_idx)
ev[1].record()
y.backward(grad_out)
ev[2].record()
torch.cuda.synchronize()
fwd_t.append(ev[0].elapsed_time(ev[1]))
bwd_t.append(ev[1].elapsed_time(ev[2]))
tot_t.append(ev[0].elapsed_time(ev[2]))
return statistics.median(fwd_t), statistics.median(bwd_t), statistics.median(tot_t)


def _run_graph(args, recipe, num_experts, device, model):
topk_idx, x, topk_w, grad_out = _inputs(args, num_experts, device)
# Warm up on a side stream before capture.
s = torch.cuda.Stream()
s.wait_stream(torch.cuda.current_stream())
with torch.cuda.stream(s):
for _ in range(args.warmup):
x.grad = topk_w.grad = None
with _autocast(recipe):
y = model(x, topk_idx, topk_w, topk_idx)
y.backward(grad_out)
torch.cuda.current_stream().wait_stream(s)
torch.cuda.synchronize()

# Two graphs timed with events outside replay: full fwd+bwd, and fwd-only. bwd = total - fwd.
# Events recorded inside a captured graph give cudaErrorInvalidValue on elapsed_time.
g_full = torch.cuda.CUDAGraph()
x.grad = topk_w.grad = None
with torch.cuda.graph(g_full):
with _autocast(recipe):
y = model(x, topk_idx, topk_w, topk_idx)
y.backward(grad_out)
g_fwd = torch.cuda.CUDAGraph()
with torch.cuda.graph(g_fwd):
with _autocast(recipe):
model(x, topk_idx, topk_w, topk_idx)
torch.cuda.synchronize()

def _time(graph):
ev = [torch.cuda.Event(enable_timing=True) for _ in range(2)]
ts = []
for _ in range(args.iters):
ev[0].record()
graph.replay()
ev[1].record()
torch.cuda.synchronize()
ts.append(ev[0].elapsed_time(ev[1]))
return statistics.median(ts)

tot = _time(g_full)
fwd = _time(g_fwd)
return fwd, tot - fwd, tot


def main():
"""Build the FusedMoE sequence and report its forward/backward timings."""
args = _parse_args()
recipe, num_experts, device, model = _build(args)
is_rank0 = dist.get_rank() == 0
_assert_fused(args, recipe, num_experts, device, model)
if is_rank0:
print(
f"\n=== FusedMoE fwd+bwd bench [{args.precision}] T/rank={args.tokens_per_rank} "
f"H={args.hidden_dim} FFN={args.ffn} top_k={args.top_k} E={num_experts} "
f"SMs={args.comm_sms} ===",
flush=True,
)

if args.mode in ("eager", "both"):
fwd, bwd, tot = _run_eager(args, recipe, num_experts, device, model)
if is_rank0:
print(f"EAGER fwd {fwd:.3f} ms | bwd {bwd:.3f} ms | fwd+bwd {tot:.3f} ms", flush=True)

if args.mode in ("graph", "both"):
fwd, bwd, tot = _run_graph(args, recipe, num_experts, device, model)
if is_rank0:
print(
f"GRAPH fwd {fwd:.3f} ms | bwd {bwd:.3f} ms (total - fwd) | fwd+bwd {tot:.3f} ms",
flush=True,
)

dist.barrier()
ep_finalize()
dist.destroy_process_group()


if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions qa/L0_pytorch_unittest/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ PYTORCH_JIT=0 NVTE_TORCH_COMPILE=0 python3 -m pytest --tb=auto --junitxml=$XML_L
PYTORCH_JIT=0 NVTE_TORCH_COMPILE=0 python3 -m pytest --tb=auto --junitxml=$XML_LOG_DIR/pytest_test_ops_grouped_linear_distributed_weight.xml $TE_PATH/tests/pytorch/test_ops_grouped_linear_distributed_weight.py || test_fail "test_ops_grouped_linear_distributed_weight.py"
PYTORCH_JIT=0 NVTE_TORCH_COMPILE=0 python3 -m pytest --tb=auto --junitxml=$XML_LOG_DIR/pytest_test_module_grouped_linear_distributed_weight.xml $TE_PATH/tests/pytorch/test_module_grouped_linear_distributed_weight.py || test_fail "test_module_grouped_linear_distributed_weight.py"
python3 -m pytest --tb=auto --junitxml=$XML_LOG_DIR/pytest_test_grouped_mlp.xml $TE_PATH/tests/pytorch/test_grouped_mlp.py || test_fail "test_grouped_mlp.py"
# The EP overlap kernel tests skip unless NVTE_MOE_OVERLAP=1; the CPU-only checks always run.
# TODO(phuonguyen): set NVTE_ENABLE_CUTEDSL_BACKEND=1 NVTE_MOE_OVERLAP=1 once TE builds CuTeDSL by default.
python3 -m pytest --tb=auto --junitxml=$XML_LOG_DIR/pytest_test_ep_gemm.xml $TE_PATH/tests/pytorch/test_ep_gemm.py || test_fail "test_ep_gemm.py"

if [ "$RET" -ne 0 ]; then
echo "Error in the following test cases:$FAILED_CASES"
Expand Down
Loading
Loading