[Bugfix] Fix kernel benchmark (#33752)

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
Jee Jee Li
2026-02-22 21:18:08 -08:00
committed by GitHub
parent 987506bca6
commit 7291d1b288
14 changed files with 26 additions and 0 deletions
+12
View File
@@ -5,6 +5,7 @@ import argparse
import json
import math
import os
from contextlib import contextmanager
from typing import Any
@@ -117,3 +118,14 @@ def write_to_json(filename: str, records: list) -> None:
cls=InfEncoder,
default=lambda o: f"<{type(o).__name__} is not JSON serializable>",
)
@contextmanager
def default_vllm_config():
"""Set a default VllmConfig for cases that directly test CustomOps or pathways
that use get_current_vllm_config() outside of a full engine context.
"""
from vllm.config import VllmConfig, set_current_vllm_config
with set_current_vllm_config(VllmConfig()):
yield