[MISC] Rename the torch profiler filename as instance_id+rank_id for merging the Profiler results of each Rank (#25867)

Signed-off-by: wang.yuqi <noooop@126.com>
This commit is contained in:
wang.yuqi
2025-10-12 17:29:08 +08:00
committed by GitHub
parent 82e64c7a20
commit 76852017ea
3 changed files with 8 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import copy
import hashlib
import json
import os
import time
from contextlib import contextmanager
from dataclasses import field, replace
from functools import lru_cache
@@ -270,6 +271,9 @@ class VllmConfig:
def __post_init__(self):
"""Verify configs are valid & consistent with each other."""
# To give each torch profile run a unique instance name.
self.instance_id = f"{time.time_ns()}"
self.try_verify_and_update_config()
if self.model_config is not None: