Move unnecessary input_addr capture under debug mode flag for speed-up (#13690)

This commit is contained in:
Binyao Jiang
2025-11-22 11:42:26 -08:00
committed by GitHub
parent 3990b84bd3
commit b29769f3b6
5 changed files with 24 additions and 8 deletions

View File

@@ -5,10 +5,16 @@ from typing import List
# TODO(Yuwei): support better compile config support
class CompilationConfig:
def __init__(self, capture_sizes: List[int], compiler: str = "eager"):
def __init__(
self,
capture_sizes: List[int],
compiler: str = "eager",
enable_debug_mode: bool = False,
):
self.traced_files = set()
self.capture_sizes = capture_sizes
self.compiler = compiler
self.enable_debug_mode = enable_debug_mode
def add_traced_file(self, file_path: str):
self.traced_files.add(file_path)
@@ -18,3 +24,6 @@ class CompilationConfig:
def get_capture_sizes(self):
return self.capture_sizes
def get_enable_debug_mode(self):
return self.enable_debug_mode