forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[torch.compile] add dynamo time tracking (vllm-project#11005)
Signed-off-by: youkaichao <[email protected]>
- Loading branch information
1 parent
af7c4a9
commit d1c2e15
Showing
3 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import time | ||
|
||
from vllm.config import CompilationConfig, CompilationLevel | ||
from vllm.logger import init_logger | ||
|
||
logger = init_logger(__name__) | ||
|
||
torch_compile_start_time: float = 0.0 | ||
|
||
|
||
def start_monitoring_torch_compile(compilation_config: CompilationConfig): | ||
pass | ||
global torch_compile_start_time | ||
torch_compile_start_time = time.time() | ||
|
||
|
||
def end_monitoring_torch_compile(compilation_config: CompilationConfig): | ||
if compilation_config.level == CompilationLevel.PIECEWISE: | ||
logger.info("graph compilation takes %.2f s in total", | ||
logger.info("torch.compile takes %.2f s in total", | ||
compilation_config.compilation_time) |