Skip to content

Commit 04ad0dc

Browse files
authored
[benchmark] Add triton version in the moe tuned config (vllm-project#24769)
Signed-off-by: Jee Jee Li <[email protected]>
1 parent 238c4c1 commit 04ad0dc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

benchmarks/kernels/benchmark_moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def save_configs(
560560
filename = os.path.join(save_dir, filename)
561561
print(f"Writing best config to {filename}...")
562562
with open(filename, "w") as f:
563-
json.dump(configs, f, indent=4)
563+
json.dump({"triton_version": triton.__version__, **configs}, f, indent=4)
564564
f.write("\n")
565565

566566

vllm/model_executor/layers/fused_moe/fused_moe.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,10 @@ def get_moe_configs(
720720
logger.info("Using configuration from %s for MoE layer.",
721721
config_file_path)
722722
# If a configuration has been found, return it
723-
return {int(key): val for key, val in json.load(f).items()}
723+
tuned_config = json.load(f)
724+
# Delete triton_version from tuned_config
725+
tuned_config.pop("triton_version", None)
726+
return {int(key): val for key, val in tuned_config.items()}
724727

725728
# If no optimized configuration is available, we will use the default
726729
# configuration

vllm/triton_utils/importing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class TritonPlaceholder(types.ModuleType):
6868

6969
def __init__(self):
7070
super().__init__("triton")
71-
self.__version__ = "3.3.0"
71+
self.__version__ = "3.4.0"
7272
self.jit = self._dummy_decorator("jit")
7373
self.autotune = self._dummy_decorator("autotune")
7474
self.heuristics = self._dummy_decorator("heuristics")

0 commit comments

Comments
 (0)