Skip to content

Commit

Permalink
if warmup_ms or num_warmups removed
Browse files Browse the repository at this point in the history
  • Loading branch information
amirakb89 committed Jan 13, 2025
1 parent 3196859 commit 39a852f
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions fbgemm_gpu/bench/bench_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,18 @@ def benchmark_requests(
num_warmups = num_warmups + 1 if num_warmups >= 0 else 1

# warm-up the GPU before profiling
if warmup_ms or num_warmups:
warmup(
requests[0],
warmup_ms,
num_warmups,
lambda indices, offsets, per_sample_weights: func(
indices.int(),
offsets.int(),
per_sample_weights,

),
bwd_only=bwd_only,
grad=grad,
)
warmup(
requests[0],
warmup_ms,
num_warmups,
lambda indices, offsets, per_sample_weights: func(
indices.int(),
offsets.int(),
per_sample_weights,
),
bwd_only=bwd_only,
grad=grad,
)

if callback_after_warmup is not None:
callback_after_warmup()
Expand Down

0 comments on commit 39a852f

Please sign in to comment.