Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Moore <[email protected]>
  • Loading branch information
SageMoore committed Dec 6, 2024
1 parent 553d99c commit 774559d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
19 changes: 11 additions & 8 deletions benchmarks/benchmark_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def run_to_completion(profile_dir: Optional[str] = None):
profile_dir = args.profile_result_dir
if not profile_dir:
profile_dir = Path(
".") / "vllm_benchmark_result" / f"latency_result_{time.time()}"
"."
) / "vllm_benchmark_result" / f"latency_result_{time.time()}"
print(f"Profiling (results will be saved to '{profile_dir}')...")
run_to_completion(profile_dir=profile_dir)
return
Expand Down Expand Up @@ -117,19 +118,21 @@ def run_to_completion(profile_dir: Optional[str] = None):
type=int,
default=30,
help='Number of iterations to run.')
parser.add_argument('--profile',
action='store_true',
help='profile the generation process of a single batch')
parser.add_argument(
'--profile',
action='store_true',
help='profile the generation process of a single batch')
parser.add_argument(
'--profile-result-dir',
type=str,
default=None,
help=('path to save the pytorch profiler output. Can be visualized '
'with ui.perfetto.dev or Tensorboard.'))
parser.add_argument('--output-json',
type=str,
default=None,
help='Path to save the latency results in JSON format.')
parser.add_argument(
'--output-json',
type=str,
default=None,
help='Path to save the latency results in JSON format.')

parser = EngineArgs.add_cli_args(parser)
args = parser.parse_args()
Expand Down
3 changes: 2 additions & 1 deletion vllm/compilation/activation_quant_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def __call__(self, graph: torch.fx.Graph):
self.dump_graph(graph, "before_act_quant_fusion")

count = self.patterns.apply(graph)
logger.debug("Replaced %s patterns in ActivationQuantFusionPass", count)
logger.debug("Replaced %s patterns in ActivationQuantFusionPass",
count)
self.dump_graph(graph, "after_pattern_match")

self.dump_graph(graph, "after_act_quant_fusion")
Expand Down

0 comments on commit 774559d

Please sign in to comment.