vllm.model_executor.layers.fused_moe.oracle.unquantized
¶
Classes:
-
UnquantizedMoEKernelOracle–Class-based view of the unquantized MoE kernel oracle.
Functions:
-
aiter_moe_intermediate_alignment–Intermediate-size alignment required by AITER's CK 2stages MoE kernel.
-
map_unquantized_backend–Map user's MoEBackend to UnquantizedMoeBackend.
-
select_unquantized_moe_backend–Select the primary Unquantized MoE backend.
-
unquantized_round_up_hidden_size_and_intermediate_size–Round up dimensions before allocation to satisfy the selected kernel.
UnquantizedMoEKernelOracle
¶
Bases: MoEKernelOracle[UnquantizedMoeBackend]
Class-based view of the unquantized MoE kernel oracle.
Each method delegates to its module-level counterpart so that instantiating and calling this class is bit-identical to calling the standalone functions. Follow-up PRs may move logic from the module-level functions into these methods.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
_get_priority_backends(moe_config)
¶
Get available backends in priority order based on platform and config.
This function can be extended to become more complex as needed.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
_trtllm_bf16_lora_supported(moe_config)
¶
Gate for routing LoRA-enabled BF16 MoE to the FlashInfer TRT-LLM gemm1_lora_delta path (PR #3153).
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
_zero_intermediate_padding(moe_config, w13_weight, w2_weight)
¶
Zero intermediate padding; reloads rewrite only the checkpoint slices.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
aiter_moe_intermediate_alignment(intermediate)
¶
Intermediate-size alignment required by AITER's CK 2stages MoE kernel.
AITER dispatches on inter_dim <= 192: below the threshold both stages
use 64-wide tiles, above it at least one stage uses a 128-wide tile, and
CK's IsSupportedArgument rejects a size not divisible by that width.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
map_unquantized_backend(runner_backend)
¶
Map user's MoEBackend to UnquantizedMoeBackend.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
select_unquantized_moe_backend(moe_config)
¶
Select the primary Unquantized MoE backend. Note: Shape-specific fallbacks may still occur at runtime.
Source code in vllm/model_executor/layers/fused_moe/oracle/unquantized.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
unquantized_round_up_hidden_size_and_intermediate_size(backend, hidden_size, intermediate_size)
¶
Round up dimensions before allocation to satisfy the selected kernel.