Skip to content
Merged
Show file tree
Hide file tree
Changes from 182 commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
62fbfca
imports
Jan 19, 2026
db2f014
updated
Jan 19, 2026
ec9c645
stash changes for remote review
Jan 19, 2026
edc84f8
stash
Jan 19, 2026
3226011
we have startup, but incorrect answers
Jan 19, 2026
2b29629
stash
Jan 19, 2026
3507b6b
stash
Jan 19, 2026
372d131
stash
Jan 19, 2026
0c26ada
stash
Jan 19, 2026
c0dcdfb
stash
Jan 19, 2026
313638e
working again, had incorrect copy
Jan 19, 2026
cc1a2ea
remove loc
Jan 19, 2026
942b758
make trtllm use the inplace buffer
Jan 19, 2026
67758ba
remove debug loc
Jan 19, 2026
c273804
fix precommits
Jan 19, 2026
6a4be4d
fix precommits
Jan 19, 2026
dd32a16
fix precommits
Jan 19, 2026
2074c44
updates
Jan 19, 2026
bbd9c4c
add interfaces
Jan 19, 2026
22733be
nits
Jan 19, 2026
75627c8
update comments
Jan 19, 2026
6c44f2a
remove debug logging
Jan 19, 2026
22933ce
apply to compressed-tensors
Jan 19, 2026
80edbad
updated
Jan 19, 2026
30c99e4
remove the trtllm entrypoints
Jan 19, 2026
61b5012
remove typing
Jan 19, 2026
8bec44c
rename and move to a separate file
Jan 19, 2026
7e914f8
rename to fp8 moe
Jan 19, 2026
3d7abb6
pre-commit
Jan 19, 2026
457bd9d
add back missing file
Jan 19, 2026
aa92d52
add back missing file
Jan 19, 2026
8abae8c
able to launch with fp8
Jan 19, 2026
f195aea
remove the custom op for fp8 block
Jan 19, 2026
2196a01
scaffolding of per-tensor kernel
Jan 19, 2026
42a328e
basic poc with llama scout modelopt
Jan 19, 2026
e814e52
fix import
Jan 19, 2026
c0ce754
messing around with typrs
Jan 19, 2026
ff99bbe
remove stray namings
Jan 19, 2026
570821b
merge main
Jan 25, 2026
0532d55
stash
Jan 26, 2026
a6258a7
nitA
Jan 26, 2026
2e5c741
pre-commit
Jan 26, 2026
a1abf66
fix typing
Jan 26, 2026
311462d
remove FI TRTLLM specific logic from fp8 oracle
Jan 26, 2026
5adcf51
remove FI TRTLLM specific logic from nvfp4 oracle
Jan 26, 2026
41b6de8
add trtllm to backend_to_kernel_cls
Jan 26, 2026
6a53c7e
things are working with blockfp8
Jan 26, 2026
8465084
remove torch op
Jan 26, 2026
7c8778c
remove torch op
Jan 26, 2026
e2dadb8
remove
Jan 26, 2026
9226abc
updated
Jan 26, 2026
8ece09e
Merge remote-tracking branch 'origin/main' into monolithic-mk
Jan 26, 2026
9f0a8be
updated interface
Jan 26, 2026
2a61a6b
updated interface
Jan 26, 2026
c638627
updated interface
Jan 26, 2026
e744eeb
update comment
Jan 26, 2026
1b4a43f
add skip swizzle
Jan 26, 2026
5519fa2
updated
Jan 26, 2026
af04842
updated
Jan 26, 2026
89fa74f
updated
Jan 26, 2026
ad19472
convert deepep ht to use the scheme
Jan 26, 2026
76b0f86
convert some kernels to use _quantize_input
Jan 26, 2026
ffc6621
edit comment
Jan 26, 2026
23b347e
update how we pass around router data for monolithic case
Jan 26, 2026
261b20a
remove special case quant config
Jan 26, 2026
7ed64ef
remove flashinfer special case for fp8 config
Jan 26, 2026
8556637
updated docstring
Jan 26, 2026
7fccb8a
updated docstring
Jan 26, 2026
6c97015
remove stray function
Jan 26, 2026
a31519e
do the merge
Jan 27, 2026
9106794
do the merge
Jan 27, 2026
8e1f210
remove old info
Jan 27, 2026
7c1960e
remove the nvfp4 dp/ep hack for trtllm
Jan 27, 2026
9da1cc5
apply new signature to nvfp4 case
Jan 27, 2026
301cf49
make MNNVL work with TRTLLM
Jan 27, 2026
da40161
revert FI cutlass quant config changes
Jan 27, 2026
1bb5cc6
tests nit
Jan 27, 2026
7ba5feb
tests nit
Jan 27, 2026
999de41
tests nit
Jan 27, 2026
648e030
make the monolithic kernels work with naive P/F
Jan 27, 2026
b0c0fb4
update guards for monolithic mk
Jan 27, 2026
bbd9190
revert quantize input
Jan 27, 2026
15d2338
reduce LOC changed
Jan 27, 2026
71c1bde
reduce LOC changed
Jan 27, 2026
b6963ce
reduce LOC changed
Jan 27, 2026
19b2a48
fix pre-ciommits
Jan 27, 2026
e9e85e2
qwen nvfp4 working across all cases
Jan 27, 2026
d737e4b
fix deepep high throughput with nvfp4
Jan 27, 2026
564ad9b
updated
Jan 27, 2026
23df03f
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Jan 27, 2026
55d395a
reorder some stuff
Jan 27, 2026
def9c86
Remove debug cruft
Jan 27, 2026
89465f3
updated typing
Jan 29, 2026
39aa9c4
stash
Jan 30, 2026
8970309
update naming
Jan 30, 2026
8491254
update naming
Jan 30, 2026
68a21b2
update str
Jan 30, 2026
e8bc729
stash changes
Jan 30, 2026
d28138a
updated class heirarchy
Jan 31, 2026
edd45a1
update class heirarchy
Jan 31, 2026
0bb9770
seems to be working properly
Jan 31, 2026
610686b
change the type names
Jan 31, 2026
e2b4f86
nits
Jan 31, 2026
f709290
improve tping
Jan 31, 2026
b305b1b
updated comments
Jan 31, 2026
07eff72
update names
Jan 31, 2026
4646462
merge main
Feb 2, 2026
e00bec1
add bf16 config back
Feb 2, 2026
81bed13
fix test_flashinfer
Feb 2, 2026
408258e
fix tests
Feb 2, 2026
332b5bc
fix naive ep
Feb 2, 2026
517e61d
fix import
Feb 2, 2026
ab75572
fix up typing
Feb 2, 2026
caa511d
fix up naive EP issue
Feb 2, 2026
5fc3609
remove non-tuping
Feb 2, 2026
a2a462c
pre-commit on merge
Feb 16, 2026
0e718bb
updated moe_mk -> moe_kernel
Feb 16, 2026
af6d995
fix moe activation pre-commit
Feb 16, 2026
62471c0
clean up
Feb 16, 2026
15f4576
updated
Feb 16, 2026
7e78317
updated
Feb 16, 2026
691f84c
convert to composition over inheritance
Feb 16, 2026
b62f641
revert inplace changes
Feb 16, 2026
66ea6bd
revert inplace changes
Feb 16, 2026
1f2bb4d
remove forward
Feb 16, 2026
d8db16f
remove forward
Feb 16, 2026
658285e
updated
Feb 16, 2026
8ab8d93
revert comment
Feb 16, 2026
6e93977
remove the flashinfer prepare_dp_all_gather
Feb 16, 2026
36f3545
update to FusedMoEKernel
Feb 16, 2026
2e15cf2
remove select_gemm_impl
Feb 16, 2026
d897152
stash
Feb 16, 2026
0c29d09
fix bad tping
Feb 16, 2026
1deda4a
update import pathways
Feb 16, 2026
38aebe9
revert relative import
Feb 16, 2026
fb1cae4
move flashinfer monolithic kernels to experts folder
Feb 16, 2026
e133983
reduce length of names
Feb 16, 2026
c196803
remove commebnts
Feb 16, 2026
361ec4b
missed hitting save
Feb 16, 2026
be3db44
add back missing files
Feb 16, 2026
0c0e943
update to remove making a NoDPEPModular
Feb 16, 2026
2d6581c
convert to using maybe_make_prepare_finalize in the tests
Feb 16, 2026
3cf2b66
convert to using maybe_make_prepare_finalize in the tests
Feb 16, 2026
ad457cc
convert to using maybe_make_prepare_finalize in the tests
Feb 16, 2026
3797440
making tests pass
Feb 16, 2026
8b92a0c
making tests pass
Feb 16, 2026
2ed5dd3
plumb the activation type through
Feb 17, 2026
d4e7746
stash
Feb 17, 2026
44f90d2
fix .apply call
Feb 17, 2026
a72ba70
clean up
Feb 17, 2026
0825977
clean up
Feb 17, 2026
cb21b90
stash
Feb 17, 2026
72c173f
updated
Feb 17, 2026
b691c85
clean up test flashinfer moe
Feb 17, 2026
e8a0e71
fix test batched deepgemm
Feb 17, 2026
b6b0d55
fix test batched_moe
Feb 17, 2026
af51125
fix test batched_moe
Feb 17, 2026
38c8370
fix test batched_moe
Feb 17, 2026
083c3ae
fix test cutlass moe
Feb 17, 2026
134e36b
merge main
Feb 17, 2026
a8c9e3b
making progress on fixing kernel tests
Feb 17, 2026
dd1dfc0
make deepgemm pass
Feb 17, 2026
d4919e3
fix test marlin vs trtllm
Feb 17, 2026
026fdd2
fix up more tests
Feb 17, 2026
e642af8
fix mixtral
Feb 17, 2026
58ac35f
trying to fix pplx texts
Feb 17, 2026
4211f57
fix as many tests as possible
Feb 17, 2026
df7877e
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Feb 17, 2026
812cdfa
fix pre-commit
Feb 17, 2026
3e97991
Merge branch 'monolithic-mk' of https://github.com/robertgshaw2-redha…
Feb 17, 2026
049e2c2
fix xpuexperts typing
Feb 17, 2026
ac82875
fix workspacde shapes typing
Feb 17, 2026
827e837
fix blockfp8
Feb 17, 2026
bf9f9bb
updated to hopefully fix modular kernel combinations test
Feb 17, 2026
c71ea16
hopefully fix mk
Feb 17, 2026
ae069f8
add nemotron to blackwell moe test
Feb 17, 2026
d4f08de
add hopper moe tests
Feb 17, 2026
ac12320
skip fp8 nemotron
Feb 17, 2026
3d974c9
updated
Feb 17, 2026
89b0b6b
assert in trtllm nvfp4
Feb 17, 2026
7acbb50
remove .impl
Feb 17, 2026
3f76b61
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Feb 18, 2026
4ac6955
enforce trtllm kernel is multiple of 512
Feb 20, 2026
626607e
fix routed scaling factor
Feb 22, 2026
65b6dc6
merge main
Feb 22, 2026
9bcb3c4
fix assertion about routing method type
Feb 23, 2026
31ced86
fix use monolithic
Feb 23, 2026
1e71766
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Feb 23, 2026
08b7987
potentially fix flashinfer nvfp4
Feb 23, 2026
5d277fe
fix nemotron nvfp4
Feb 23, 2026
571b36b
stash
Feb 23, 2026
c7da363
revert
Feb 23, 2026
830a974
fix typo for flashinfer latency _supports_shape
Feb 23, 2026
cb9614d
fix fp8 oracle
Feb 23, 2026
2d0dcc5
fix fp8 trtllm for nemotron
Feb 23, 2026
5c4f163
update is_monolithic resolution time
robertgshaw2-redhat Feb 23, 2026
761ffd3
make DS example pass CI
robertgshaw2-redhat Feb 24, 2026
2cc0e48
updated
robertgshaw2-redhat Feb 24, 2026
903fcbb
update how flashinfer moe size padding is saved
Feb 24, 2026
6e11e54
hopefully fix docs build
robertgshaw2-redhat Feb 24, 2026
329ac68
add wait for memory to clear
robertgshaw2-redhat Feb 24, 2026
f07d0a3
try wait for memory to clear
robertgshaw2-redhat Feb 24, 2026
957a292
try wait for memory to clear
robertgshaw2-redhat Feb 24, 2026
fcdf3e0
try wait for memory to clear
robertgshaw2-redhat Feb 24, 2026
cdc34e4
fix readthedocs
robertgshaw2-redhat Feb 24, 2026
4ee6b97
deal with autotuner
robertgshaw2-redhat Feb 24, 2026
f9842b3
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Feb 24, 2026
73957d2
fix monolithic
robertgshaw2-redhat Feb 24, 2026
7bb4299
Merge branch 'monolithic-mk' of https://github.com/robertgshaw1-redha…
robertgshaw2-redhat Feb 24, 2026
49746c4
split modular oai triton into separate launch
robertgshaw2-redhat Feb 24, 2026
1906934
Merge remote-tracking branch 'origin/main' into monolithic-mk
robertgshaw2-redhat Feb 24, 2026
482d622
use global state to get around flashinfer autotuning
Mar 1, 2026
2eb1970
updated
Mar 1, 2026
7d359e6
merge main
Mar 1, 2026
120b466
fix nits
Mar 1, 2026
de8c00f
updated
Mar 1, 2026
c084de2
fix hopper moe
Mar 1, 2026
5925b13
fix hopper test issue
Mar 1, 2026
86e5ca9
tweak
Mar 1, 2026
c203082
remove hopper tests
Mar 1, 2026
95f79b3
fix blackwell tests
Mar 1, 2026
d795665
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Mar 1, 2026
27e142e
remove spurious
Mar 1, 2026
7540885
fix flashinfer import
Mar 2, 2026
a01b4fe
remove spurious test
Mar 2, 2026
0dac45a
fix the shuffle_weights
Mar 2, 2026
4df577e
remove llama 4 scout
Mar 2, 2026
899a474
Merge remote-tracking branch 'origin/main' into monolithic-mk
Mar 2, 2026
e26de5a
Merge branch 'main' into monolithic-mk
robertgshaw2-redhat Mar 3, 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
17 changes: 17 additions & 0 deletions .buildkite/test_areas/quantization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ steps:
commands:
- pytest -s -v tests/quantization/test_blackwell_moe.py

- label: Quantized MoE Test (H100)
timeout_in_minutes: 60
working_dir: "/vllm-workspace/"
device: h100
source_file_dependencies:
- tests/quantization/test_hopper_moe.py
- vllm/model_executor/models/deepseek_v2.py
- vllm/model_executor/models/gpt_oss.py
- vllm/model_executor/models/llama4.py
- vllm/model_executor/layers/fused_moe
- vllm/model_executor/layers/quantization/compressed_tensors
- vllm/model_executor/layers/quantization/modelopt.py
- vllm/model_executor/layers/quantization/mxfp4.py
- vllm/v1/attention/backends/flashinfer.py
commands:
- pytest -s -v tests/quantization/test_hopper_moe.py

- label: Quantized Models Test
timeout_in_minutes: 60
source_file_dependencies:
Expand Down
28 changes: 17 additions & 11 deletions benchmarks/kernels/benchmark_cutlass_moe_fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
from tests.kernels.moe.utils import make_dummy_moe_config
from vllm import _custom_ops as ops
from vllm.model_executor.layers.fused_moe.activation import MoEActivation
from vllm.model_executor.layers.fused_moe.all2all_utils import (
maybe_make_prepare_finalize,
)
from vllm.model_executor.layers.fused_moe.config import fp8_w8a8_moe_quant_config
from vllm.model_executor.layers.fused_moe.cutlass_moe import CutlassExpertsFp8
from vllm.model_executor.layers.fused_moe.fused_moe import fused_experts, fused_topk
from vllm.model_executor.layers.fused_moe.prepare_finalize import (
MoEPrepareAndFinalizeNoEP,
)
from vllm.platforms import current_platform
from vllm.utils.argparse_utils import FlexibleArgumentParser
from vllm.v1.worker.workspace import init_workspace_manager
Expand Down Expand Up @@ -137,15 +137,21 @@ def bench_run(
per_out_ch_quant=per_out_ch,
)

fn = mk.FusedMoEModularKernel(
MoEPrepareAndFinalizeNoEP(),
moe_config = make_dummy_moe_config(
num_experts=num_experts,
hidden_dim=k,
intermediate_size_per_partition=n,
in_dtype=a.dtype,
)
fn = mk.FusedMoEKernel(
maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
CutlassExpertsFp8(
moe_config=make_dummy_moe_config(
num_experts=num_experts,
hidden_dim=k,
intermediate_size_per_partition=n,
in_dtype=a.dtype,
),
moe_config=moe_config,
quant_config=quant_config,
),
)
Expand Down
35 changes: 26 additions & 9 deletions benchmarks/kernels/benchmark_cutlass_moe_nvfp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from tests.kernels.moe.utils import make_dummy_moe_config
from vllm import _custom_ops as ops
from vllm.config import ParallelConfig, VllmConfig, set_current_vllm_config
from vllm.model_executor.layers.fused_moe.all2all_utils import (
maybe_make_prepare_finalize,
)
from vllm.model_executor.layers.fused_moe.config import (
fp8_w8a8_moe_quant_config,
nvfp4_moe_quant_config,
Expand All @@ -23,9 +26,6 @@
CutlassExpertsFp4,
)
from vllm.model_executor.layers.fused_moe.fused_moe import fused_experts, fused_topk
from vllm.model_executor.layers.fused_moe.prepare_finalize import (
MoEPrepareAndFinalizeNoEP,
)
from vllm.scalar_type import scalar_types
from vllm.utils.argparse_utils import FlexibleArgumentParser
from vllm.v1.worker.workspace import init_workspace_manager
Expand Down Expand Up @@ -196,10 +196,21 @@ def run_cutlass_moe_fp4(
g2_alphas=w2_gs,
)

kernel = mk.FusedMoEModularKernel(
MoEPrepareAndFinalizeNoEP(),
moe_config = make_dummy_moe_config(
num_experts=num_experts,
hidden_dim=k,
intermediate_size_per_partition=n,
in_dtype=a.dtype,
)
kernel = mk.FusedMoEKernel(
maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
CutlassExpertsFp4(
make_dummy_moe_config(),
moe_config=moe_config,
quant_config=quant_config,
),
)
Expand Down Expand Up @@ -240,11 +251,17 @@ def run_cutlass_from_graph(
g1_alphas=w1_gs,
g2_alphas=w2_gs,
)
moe_config = make_dummy_moe_config()

kernel = mk.FusedMoEModularKernel(
MoEPrepareAndFinalizeNoEP(),
kernel = mk.FusedMoEKernel(
maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
CutlassExpertsFp4(
make_dummy_moe_config(),
moe_config=moe_config,
quant_config=quant_config,
),
)
Expand Down
50 changes: 31 additions & 19 deletions benchmarks/kernels/benchmark_grouped_gemm_cutlass.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
from tests.kernels.moe.utils import make_dummy_moe_config
from vllm import _custom_ops as ops
from vllm.config import ParallelConfig, VllmConfig, set_current_vllm_config
from vllm.model_executor.layers.fused_moe.all2all_utils import (
maybe_make_prepare_finalize,
)
from vllm.model_executor.layers.fused_moe.config import fp8_w8a8_moe_quant_config
from vllm.model_executor.layers.fused_moe.cutlass_moe import CutlassExpertsFp8
from vllm.model_executor.layers.fused_moe.fused_moe import (
fused_experts,
fused_topk,
)
from vllm.model_executor.layers.fused_moe.prepare_finalize import (
MoEPrepareAndFinalizeNoEP,
)
from vllm.utils.argparse_utils import FlexibleArgumentParser
from vllm.v1.worker.workspace import init_workspace_manager

Expand Down Expand Up @@ -131,16 +131,22 @@ def run_cutlass_moe(
w2_scale=w2_scale,
per_act_token_quant=per_act_token,
)
moe_config = make_dummy_moe_config(
num_experts=w2.shape[0],
hidden_dim=w2.shape[1],
intermediate_size_per_partition=w2.shape[2],
in_dtype=a.dtype,
)

fn = mk.FusedMoEModularKernel(
MoEPrepareAndFinalizeNoEP(),
fn = mk.FusedMoEKernel(
maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
CutlassExpertsFp8(
moe_config=make_dummy_moe_config(
num_experts=w2.shape[0],
hidden_dim=w2.shape[1],
intermediate_size_per_partition=w2.shape[2],
in_dtype=a.dtype,
),
moe_config=moe_config,
quant_config=quant_config,
),
)
Expand All @@ -163,16 +169,22 @@ def run_cutlass_from_graph(
w2_scale=w2_scale,
per_act_token_quant=per_act_token,
)
moe_config = make_dummy_moe_config(
num_experts=w2.shape[0],
hidden_dim=w2.shape[1],
intermediate_size_per_partition=w2.shape[2],
in_dtype=a.dtype,
)

fn = mk.FusedMoEModularKernel(
MoEPrepareAndFinalizeNoEP(),
fn = mk.FusedMoEKernel(
maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
CutlassExpertsFp8(
moe_config=make_dummy_moe_config(
num_experts=w2.shape[0],
hidden_dim=w2.shape[1],
intermediate_size_per_partition=w2.shape[2],
in_dtype=a.dtype,
),
moe_config=moe_config,
quant_config=quant_config,
),
)
Expand Down
54 changes: 37 additions & 17 deletions benchmarks/kernels/benchmark_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

from vllm.model_executor.layers.fused_moe import fused_topk
from vllm.model_executor.layers.fused_moe.activation import MoEActivation
from vllm.model_executor.layers.fused_moe.all2all_utils import (
maybe_make_prepare_finalize,
)
from vllm.model_executor.layers.fused_moe.config import (
FusedMoEConfig,
FusedMoEParallelConfig,
Expand Down Expand Up @@ -242,24 +245,33 @@ def run():

deep_gemm_experts = None
if use_deep_gemm:
deep_gemm_experts = mk.FusedMoEModularKernel(
prepare_finalize=MoEPrepareAndFinalizeNoEP(),
moe_config = (
FusedMoEConfig(
num_experts=num_experts,
experts_per_token=topk,
hidden_dim=hidden_size,
intermediate_size_per_partition=shard_intermediate_size,
num_local_experts=num_experts,
num_logical_experts=num_experts,
activation=MoEActivation.SILU,
moe_parallel_config=FusedMoEParallelConfig.make_no_parallel(),
in_dtype=init_dtype,
routing_method=RoutingMethodType.TopK,
device="cuda",
),
)
deep_gemm_experts = mk.FusedMoEKernel(
prepare_finalize=maybe_make_prepare_finalize(
moe=moe_config,
quant_config=quant_config,
allow_new_interface=True,
use_monolithic=False,
),
fused_experts=TritonOrDeepGemmExperts(
moe_config=FusedMoEConfig(
num_experts=num_experts,
experts_per_token=topk,
hidden_dim=hidden_size,
intermediate_size_per_partition=shard_intermediate_size,
num_local_experts=num_experts,
num_logical_experts=num_experts,
activation=MoEActivation.SILU,
moe_parallel_config=FusedMoEParallelConfig.make_no_parallel(),
in_dtype=init_dtype,
routing_method=RoutingMethodType.TopK,
device="cuda",
),
moe_config=moe_config,
quant_config=quant_config,
),
inplace=not disable_inplace(),
)

with override_config(config):
Expand All @@ -269,8 +281,16 @@ def run():

inplace = not disable_inplace()
if use_deep_gemm:
return deep_gemm_experts(
x, w1, w2, topk_weights, topk_ids, inplace=inplace
return deep_gemm_experts.apply(
x,
w1,
w2,
topk_weights,
topk_ids,
activation=MoEActivation.SILU,
global_num_experts=num_experts,
apply_router_weight_on_input=False,
expert_map=False,
)
return fused_experts(
x,
Expand Down
2 changes: 1 addition & 1 deletion docs/design/dbo.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The current implementation has all `dbo_yield` and `dbo_maybe_run_recv_hook` cal

The `make_ubatch_context` function initializes two `UBatchContexts`, one for each UBatch thread. It takes two CUDA streams, the preexisting `ForwardContexts` and a CPU thread barrier. This function should be used exclusively to instantiate `UBatchContexts`. It will handle all of the event initialization.

The `dbo_register_recv_hook` method registers a callback that can be returned by the `FusedMoEPrepareAndFinalize` class in the other UBatch thread’s `UBatchContext`. The callback will be run when the other thread calls `dbo_maybe_run_recv_hook`. This is typically used to wait on an all-to-all kernel.
The `dbo_register_recv_hook` method registers a callback that can be returned by the `FusedMoEPrepareAndFinalizeModular` class in the other UBatch thread’s `UBatchContext`. The callback will be run when the other thread calls `dbo_maybe_run_recv_hook`. This is typically used to wait on an all-to-all kernel.

The `dbo_maybe_run_recv_hook` method runs a callback that’s set by the `dbo_register_recv_hook` function if that callback exists.

Expand Down
Loading