Skip to content

Commit

Permalink
Add profiler opts
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Dec 7, 2024
1 parent 06f62d8 commit 5be21f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tritonbench/components/kineto/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def do_bench_kineto(
:param output_dir: Output directory to store the trace
:type output_dir: str, optional
"""
if profile_opts is None:
profile_opts = DEFAULT_PROFILE_OPTS
if use_cuda_graphs:
return do_bench_kineto_cudagraph(fn, warmup, grad_to_none, profile_opts, output_dir)
import torch
Expand Down Expand Up @@ -128,8 +130,6 @@ def do_bench_kineto(
profiler.ProfilerActivity.CUDA,
profiler.ProfilerActivity.CPU,
]
if profile_opts is None:
profile_opts = DEFAULT_PROFILE_OPTS
prefix = f"tritonbench_{fn._name}"
name = f"{prefix}_{datetime.now().strftime('%Y%m%d_%H%M%S')}_{''.join(random.choices(string.digits, k=10))}.json"
with profiler.profile(
Expand Down

0 comments on commit 5be21f0

Please sign in to comment.