Skip to content

Commit 9f00d1e

Browse files
Merge branch 'master' into sync_msft_3_6_26
2 parents b86c5f9 + 8da5e91 commit 9f00d1e

134 files changed

Lines changed: 5529 additions & 628 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/windows_cuda.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ jobs:
157157
runs-on: [
158158
"self-hosted",
159159
"1ES.Pool=onnxruntime-github-Win2022-GPU-A10",
160-
"1ES.ImageOverride=onnxruntime-Win-CPU-VS2022-Latest-NVMe-x64-test",
161160
"JobId=windows-cuda-test-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
162161
]
163162
steps:

.github/workflows/windows_cuda_plugin.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ jobs:
127127
runs-on: [
128128
"self-hosted",
129129
"1ES.Pool=onnxruntime-github-Win2022-GPU-A10",
130-
"1ES.ImageOverride=onnxruntime-Win-CPU-VS2022-Latest-NVMe-x64-test",
131130
"JobId=windows-cuda-plugin-test-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
132131
]
133132
steps:

cmake/external/cuda_configuration.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,14 @@ macro(setup_cuda_architectures)
189189

190190
set(ARCHITECTURES_WITH_KERNELS "80" "86" "89" "90" "100" "110" "120")
191191
foreach(CUDA_ARCH IN LISTS ARCHITECTURES_WITH_KERNELS)
192-
if(NOT "${CUDA_ARCH}" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG)
192+
unset(HAS_CUDA_ARCH)
193+
foreach(CUDA_ARCH_ORIG IN LISTS CMAKE_CUDA_ARCHITECTURES_ORIG)
194+
if(CUDA_ARCH_ORIG MATCHES "^${CUDA_ARCH}([af])?$")
195+
set(HAS_CUDA_ARCH ON)
196+
break()
197+
endif()
198+
endforeach()
199+
if(NOT HAS_CUDA_ARCH)
193200
add_definitions("-DEXCLUDE_SM_${CUDA_ARCH}")
194201
message(STATUS "Excluding SM ${CUDA_ARCH}")
195202
endif()

cmake/onnxruntime_cuda_source_filters.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,5 +241,7 @@ function(onnxruntime_add_cuda_plugin_object_library)
241241
target_compile_options("${_ARG_NAME}" PRIVATE
242242
${_ARG_COMPILE_OPTIONS}
243243
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--threads \"${_ARG_NVCC_THREADS}\">")
244+
# Ensure generated headers (e.g. onnx-ml.pb.h from onnx_proto) exist before compiling.
245+
add_dependencies("${_ARG_NAME}" ${onnxruntime_EXTERNAL_DEPENDENCIES})
244246
target_link_libraries("${_ARG_PARENT}" PRIVATE "${_ARG_NAME}")
245247
endfunction()

cmake/onnxruntime_providers_cuda.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@
323323
endif()
324324
325325
if(MSVC)
326+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:/Zc:preprocessor>")
326327
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:__cplusplus>")
328+
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:preprocessor>")
327329
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>")
328330
# /permissive is required for CUTLASS cute headers and to work around MSVC template resolution
329331
# issues with abseil headers when compiled through nvcc.
@@ -385,14 +387,16 @@
385387
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xptxas=-w>)
386388
target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-DCUTLASS_ENABLE_GDC_FOR_SM90=1>)
387389
target_compile_definitions(${target} PRIVATE COMPILE_HOPPER_TMA_GEMMS)
388-
target_compile_definitions(${target} PRIVATE COMPILE_HOPPER_TMA_GROUPED_GEMMS)
390+
if(NOT MSVC)
391+
target_compile_definitions(${target} PRIVATE COMPILE_HOPPER_TMA_GROUPED_GEMMS)
392+
endif()
389393
if (MSVC)
390394
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>")
391395
target_compile_options(${target} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4172>")
392396
endif()
393397
endif()
394398
395-
if("120" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG)
399+
if("120" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG AND NOT MSVC)
396400
target_compile_definitions(${target} PRIVATE COMPILE_BLACKWELL_SM120_TMA_GROUPED_GEMMS)
397401
endif()
398402

cmake/onnxruntime_providers_cuda_plugin.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,12 @@ if (MSVC)
172172
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4127>"
173173
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4211>"
174174
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:__cplusplus>"
175+
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:preprocessor>"
175176
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>"
176177
)
177178

178179
target_compile_options(onnxruntime_providers_cuda_plugin PRIVATE
180+
"$<$<COMPILE_LANGUAGE:CXX>:/Zc:preprocessor>"
179181
# /permissive is required for CUTLASS cute headers (cute::stride.hpp, cute::Layout etc.)
180182
"$<$<COMPILE_LANGUAGE:CXX>:/permissive>"
181183
# /permissive disables C++ alternative tokens (or, and, not, etc.).
@@ -228,6 +230,7 @@ if (MSVC)
228230
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4127>"
229231
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /wd4211>"
230232
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:__cplusplus>"
233+
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Zc:preprocessor>"
231234
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /bigobj>"
232235
)
233236
endif()
@@ -241,9 +244,11 @@ if(ORT_HAS_SM90_OR_LATER)
241244
"$<$<COMPILE_LANGUAGE:CUDA>:-Xptxas=-w>"
242245
"$<$<COMPILE_LANGUAGE:CUDA>:-DCUTLASS_ENABLE_GDC_FOR_SM90=1>")
243246
target_compile_definitions(onnxruntime_providers_cuda_plugin PRIVATE COMPILE_HOPPER_TMA_GEMMS)
244-
target_compile_definitions(onnxruntime_providers_cuda_plugin PRIVATE COMPILE_HOPPER_TMA_GROUPED_GEMMS)
247+
if(NOT MSVC)
248+
target_compile_definitions(onnxruntime_providers_cuda_plugin PRIVATE COMPILE_HOPPER_TMA_GROUPED_GEMMS)
249+
endif()
245250
endif()
246-
if("120" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG)
251+
if("120" IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG AND NOT MSVC)
247252
target_compile_definitions(onnxruntime_providers_cuda_plugin PRIVATE COMPILE_BLACKWELL_SM120_TMA_GROUPED_GEMMS)
248253
endif()
249254

@@ -371,6 +376,9 @@ onnxruntime_add_include_to_target(
371376
flatbuffers::flatbuffers
372377
)
373378

379+
# Ensure generated headers (e.g. onnx-ml.pb.h) are available before compiling.
380+
add_dependencies(onnxruntime_providers_cuda_plugin ${onnxruntime_EXTERNAL_DEPENDENCIES})
381+
374382
# Link libraries
375383
target_link_libraries(onnxruntime_providers_cuda_plugin PRIVATE
376384
CUDA::cudart

cmake/patches/abseil/absl_cuda_warnings.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ index 1234567..abcdefg 100644
1111
"Hashing C arrays is not allowed. For string literals, wrap the literal "
1212
"in absl::string_view(). To hash the array contents, use "
1313
"absl::MakeSpan() or make the array an std::array. To hash the array "
14+
@@ -1265,7 +1265,7 @@ class ABSL_DLL MixingHashState : public HashStateBase<MixingHashState> {
15+
}
16+
17+
private:
18+
- friend class MixingHashState::HashStateBase;
19+
+ friend class HashStateBase<MixingHashState>;
20+
template <typename H>
21+
friend H absl::hash_internal::hash_weakly_mixed_integer(H,
22+
WeaklyMixedInteger);
1423
diff --git a/absl/hash/hash.h b/absl/hash/hash.h
1524
index 1234567..abcdefg 100644
1625
--- a/absl/hash/hash.h
@@ -25,6 +34,15 @@ index 1234567..abcdefg 100644
2534
s.Init(state);
2635
return s;
2736
}
37+
@@ -368,7 +369,7 @@ class HashState : public hash_internal::HashStateBase<HashState> {
38+
private:
39+
HashState() = default;
40+
41+
- friend class HashState::HashStateBase;
42+
+ friend class hash_internal::HashStateBase<HashState>;
43+
friend struct hash_internal::CombineRaw;
44+
45+
template <typename T>
2846
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h
2947
index 1234567..abcdefg 100644
3048
--- a/absl/container/internal/raw_hash_set.h

cmake/vcpkg-ports/abseil/absl_cuda_warnings.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ index 1234567..abcdefg 100644
1111
"Hashing C arrays is not allowed. For string literals, wrap the literal "
1212
"in absl::string_view(). To hash the array contents, use "
1313
"absl::MakeSpan() or make the array an std::array. To hash the array "
14+
@@ -1265,7 +1265,7 @@ class ABSL_DLL MixingHashState : public HashStateBase<MixingHashState> {
15+
}
16+
17+
private:
18+
- friend class MixingHashState::HashStateBase;
19+
+ friend class HashStateBase<MixingHashState>;
20+
template <typename H>
21+
friend H absl::hash_internal::hash_weakly_mixed_integer(H,
22+
WeaklyMixedInteger);
1423
diff --git a/absl/hash/hash.h b/absl/hash/hash.h
1524
index 1234567..abcdefg 100644
1625
--- a/absl/hash/hash.h
@@ -25,6 +34,15 @@ index 1234567..abcdefg 100644
2534
s.Init(state);
2635
return s;
2736
}
37+
@@ -368,7 +369,7 @@ class HashState : public hash_internal::HashStateBase<HashState> {
38+
private:
39+
HashState() = default;
40+
41+
- friend class HashState::HashStateBase;
42+
+ friend class hash_internal::HashStateBase<HashState>;
43+
friend struct hash_internal::CombineRaw;
44+
45+
template <typename T>
2846
diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h
2947
index 1234567..abcdefg 100644
3048
--- a/absl/container/internal/raw_hash_set.h

docs/OperatorKernels.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,8 @@ The **OpSet Version** column uses the following notation:
834834
|||[13, 18]|**B** = tensor(bool)<br/> **I** = tensor(int64)<br/> **V** = seq(tensor(bfloat16)), seq(tensor(bool)), seq(tensor(double)), seq(tensor(float)), seq(tensor(float16)), seq(tensor(int16)), seq(tensor(int32)), seq(tensor(int64)), seq(tensor(int8)), seq(tensor(string)), seq(tensor(uint16)), seq(tensor(uint32)), seq(tensor(uint64)), seq(tensor(uint8)), tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
835835
|||[11, 12]|**B** = tensor(bool)<br/> **I** = tensor(int64)<br/> **V** = tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
836836
|||[1, 10]|**B** = tensor(bool)<br/> **I** = tensor(int64)<br/> **V** = tensor(bfloat16), tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8)|
837+
|LpNormalization|*in* input:**T**<br> *out* output:**T**|22+|**T** = tensor(float), tensor(float16)|
838+
|||[1, 21]|**T** = tensor(float), tensor(float16)|
837839
|MatMul|*in* A:**T**<br> *in* B:**T**<br> *out* Y:**T**|13+|**T** = tensor(bfloat16), tensor(double), tensor(float), tensor(float16)|
838840
|||[9, 12]|**T** = tensor(double), tensor(float), tensor(float16)|
839841
|||[1, 8]|**T** = tensor(double), tensor(float), tensor(float16)|

docs/contrib_ops/cuda/moe_qmoe.md

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ input tokens → router (top-k softmax) → permute by expert
6161
| Attribute | Type | Default | Description |
6262
|-----------|------|---------|-------------|
6363
| `k` | int | 1 | Top-K experts selected per token. |
64-
| `activation_type` | string | `"relu"` | `"relu"`, `"gelu"`, `"silu"`, `"swiglu"`, `"identity"`. |
64+
| `activation_type` | string | `"relu"` | One of `"relu"`, `"gelu"`, `"silu"`, `"swiglu"`, `"identity"`. These are the only values accepted end-to-end (attribute parsing); other kernel-internal types are not reachable from ONNX. |
6565
| `normalize_routing_weights` | int | 0 | Re-normalize the top-k weights to sum to 1. |
6666
| `use_sparse_mixer` | int | 0 | Enable sparse-mixer routing variant. |
6767
| `swiglu_fusion` | int | 0 | 0=no fusion, 1=interleaved (Gate/Value), 2=block (Gate;Value). See [§8](#8-swiglu-fusion). |
68-
| `swiglu_limit`, `activation_alpha`, `activation_beta` | float || SwiGLU clamp / alpha / beta. |
68+
| `activation_alpha` | float | `1.0` | SwiGLU alpha. Default `1.0` (Standard SwiGLU); GPT-OSS uses `1.702`. |
69+
| `activation_beta` | float | `0.0` | SwiGLU beta. Default `0.0` (Standard SwiGLU); GPT-OSS uses `1.0`. |
70+
| `swiglu_limit` | float | unset (`+inf`) | SwiGLU clamp limit. Unset means no clamp (Standard SwiGLU); GPT-OSS uses `7.0`. |
6971
| `expert_weight_bits` (QMoE only) | int | 4 | 4 (INT4/MXFP4) or 8 (INT8/FP8). |
7072
| `block_size` (QMoE only) | int | -1 | Group size for INT4/INT8 group-wise quantization. -1 = per-output-channel. |
7173
| `quant_type` (QMoE only) | string | `"int"` | `"int"`, `"fp4"`, `"fp8"`, `"wfp4afp8"`. See [§3](#3-quantization-modes). |
@@ -410,16 +412,42 @@ weights are interchangeable across SMs:
410412
SwiGLU formula:
411413

412414
```
413-
SwiGLU(x) = Gate × Sigmoid(alpha × Gate) × (Value + beta)
415+
SwiGLU(x) = G × Sigmoid(alpha × G) × (L + beta)
416+
G = clamp(Gate, max=limit)
417+
L = clamp(Value, min=-limit, max=limit)
414418
```
415419

420+
`Gate` and `Value` are the two halves of the FC1 output. The behavior is controlled
421+
by `activation_alpha` (alpha), `activation_beta` (beta) and `swiglu_limit` (limit).
422+
423+
| Parameter | Attribute | Default | Standard SwiGLU | GPT-OSS SwiGLU |
424+
|-----------|-----------|---------|-----------------|----------------|
425+
| alpha | `activation_alpha` | `1.0` | `1.0` | `1.702` |
426+
| beta | `activation_beta` | `0.0` | `0.0` | `1.0` |
427+
| limit | `swiglu_limit` | unset → `+inf` (no clamp) | unset / `+inf` | `7.0` |
428+
429+
The attribute **defaults are exactly Standard SwiGLU**, which reduces to:
430+
431+
```
432+
SwiGLU(x) = Gate × Sigmoid(Gate) × Value = SiLU(Gate) × Value
433+
```
434+
435+
This is the activation used by Llama- and Gemma-style MoE. GPT-OSS SwiGLU instead
436+
uses `alpha=1.702`, `beta=1.0`, `limit=7.0`. Both variants run on the same CUDA
437+
kernel; when `alpha=1.0`, `beta=0.0` and `limit=+inf`, the kernel takes the plain
438+
`SiLU(Gate) × Value` path (no clamping).
439+
416440
The operator supports three fusion modes via the `swiglu_fusion` attribute:
417441

418442
| `swiglu_fusion` | Inputs | FC1 layout | Notes |
419443
|----------------:|--------|------------|-------|
420444
| 0 | `fc1`, `fc2`, `fc3` | separate Gate / Value / Up | Conceptually three GEMMs. |
421-
| 1 (interleaved) | `fc1`, `fc2` | `[Gate_0, Value_0, Gate_1, Value_1, …]``[E, 2×inter, hidden]` | Recommended for newer architectures. |
422-
| 2 (block) | `fc1`, `fc2` | `[Gate_0…Gate_N | Value_0…Value_N]``[E, 2×inter, hidden]` | Concatenated halves. |
445+
| 1 (interleaved) | `fc1`, `fc2` | `[Gate_0, Value_0, Gate_1, Value_1, …]``[E, 2×inter, hidden]` | GPT-OSS layout. |
446+
| 2 (block) | `fc1`, `fc2` | `[Gate_0…Gate_N | Value_0…Value_N]``[E, 2×inter, hidden]` | Concatenated halves; Llama/Gemma layout. |
447+
448+
> **CPU note**: The CPU MoE/QMoE implementation only supports the **interleaved**
449+
> SwiGLU layout (`swiglu_fusion=1`). The concatenated layout (`swiglu_fusion=2`)
450+
> throws `ORT_NOT_IMPLEMENTED` on CPU; use the CUDA EP for concatenated SwiGLU.
423451
424452
### Standard MoE runtime fc3 fusion
425453

@@ -776,6 +804,10 @@ The block-scaled tensor op path is fundamentally more efficient because the
776804
hardware fuses dequantization with the matrix multiply, vs. the in-register
777805
software dequant of the mixed-input path.
778806

807+
> **MSVC note**: Native SM90/SM120 TMA grouped MoE kernels are disabled in Windows/MSVC
808+
> builds because CUDA 13 generates host stubs that MSVC rejects for over-aligned
809+
> TMA parameters. See [§14.1](#141-msvc-and-tma-grouped-moe-gemm).
810+
779811
---
780812

781813
## 12. Future / Deferred Modes
@@ -796,7 +828,7 @@ will not change the operator interface.
796828

797829
| Test file | Coverage |
798830
|-----------|----------|
799-
| [test_moe_cuda.py](onnxruntime/test/python/transformers/test_moe_cuda.py) | Standard MoE on CUDA: FP16/BF16, SiLU/GeLU/SwiGLU, routing, GEMM parity. |
831+
| [test_moe_cuda.py](onnxruntime/test/python/transformers/test_moe_cuda.py) | Standard MoE on CUDA: FP16/BF16, SiLU/GeLU/SwiGLU, routing, GEMM parity. SwiGLU coverage includes both GPT-OSS (`TestSwigluMoE`: interleaved, alpha=1.702/beta=1.0/limit=7.0) and Standard/Llama-Gemma (`TestStandardSwigluMoE`: concatenated `swiglu_fusion=2`, alpha=1.0/beta=0.0/no limit → `SiLU(Gate)×Value`). |
800832
| [test_moe_cpu.py](onnxruntime/test/python/transformers/test_moe_cpu.py) | Standard MoE on CPU (smoke). |
801833
| [test_qmoe_cuda.py](onnxruntime/test/python/transformers/test_qmoe_cuda.py) | INT4/INT8 QMoE — primary regression signal for the production QMoE path. Exercises `pack_weights_for_cuda_mixed_gemm` and dequant-then-matmul reference. |
802834
| [test_qmoe_cpu.py](onnxruntime/test/python/transformers/test_qmoe_cpu.py) | INT4/INT8 QMoE on CPU (smoke). |
@@ -866,6 +898,41 @@ if(NOT onnxruntime_USE_FP8_QMOE)
866898
endif()
867899
```
868900

901+
### 14.1 MSVC and TMA grouped MoE GEMM
902+
903+
Windows/MSVC builds intentionally do not define the grouped TMA MoE compile
904+
switches:
905+
906+
- `COMPILE_HOPPER_TMA_GROUPED_GEMMS`
907+
- `COMPILE_BLACKWELL_SM120_TMA_GROUPED_GEMMS`
908+
909+
The generated grouped TMA launchers pass CUTLASS TMA descriptor types through
910+
NVCC-generated host stubs. With CUDA 13 and MSVC, those stubs contain formal
911+
parameters with 128-byte alignment requirements, which triggers MSVC `C2719`:
912+
the requested alignment for a by-value formal parameter cannot be guaranteed.
913+
This affects the generated SM90/SM120 grouped MoE TMA launcher translation units,
914+
including the native SM120 QMoE FP4 / FP8×FP4 launchers.
915+
916+
The source files are still present in the build graph, but the generated launcher
917+
bodies are guarded by the compile switches above, so they become empty units on
918+
MSVC. Runtime dispatch mirrors this build-time choice:
919+
920+
- Standard FP16/BF16 MoE may skip TMA configs and use the existing SM80/Ampere
921+
grouped GEMM fallback.
922+
- QMoE modes that require grouped TMA kernels do not silently fall back to SM80.
923+
This includes FP4/block-scaled modes such as native SM120 `fp4`, `wfp4afp8`,
924+
and other TMA-only mixed quantized paths. They fail with a clear error saying
925+
the required TMA grouped MoE GEMM was not compiled.
926+
- `wfp4a16` on SM120 normally routes through the SM90 mixed-input TMA kernel set
927+
for forward compatibility, but it is also unavailable when the Hopper grouped
928+
TMA switch is disabled by MSVC.
929+
930+
The intent is to keep Windows CUDA packaging builds working while avoiding a
931+
misleading or invalid fallback for QMoE configurations whose data layout requires
932+
TMA/block-scaled kernels. Re-enable these switches for MSVC only after the CUDA
933+
host-stub alignment issue is fixed or the launcher ABI is changed to avoid
934+
over-aligned by-value parameters.
935+
869936
---
870937

871938
## 15. Limitations & Known Issues
@@ -881,6 +948,10 @@ endif()
881948
FP4, the QMoE op currently routes only `sm_ >= 120` through the native FP4
882949
runner. SM90/SM100 fall back to dequantization. (Remove `sm_ < 120` and
883950
rebuild to enable native FP4 on those SMs once validated.)
951+
- **Windows/MSVC native TMA QMoE**: grouped TMA MoE kernels are disabled on MSVC
952+
because CUDA 13 host stubs hit MSVC `C2719` with over-aligned TMA parameters.
953+
Standard MoE can fall back to SM80 kernels; native QMoE FP4/block-scaled modes
954+
cannot. See [§14.1](#141-msvc-and-tma-grouped-moe-gemm).
884955
- **WFP4AFP8 native** requires SM100+ hardware; only the dequant fallback path
885956
is validated end-to-end so far.
886957
- **Hopper W4A8** (INT4 weight + FP8 activation) is not supported — TRT-LLM gates

0 commit comments

Comments
 (0)