Skip to content

Commit

Permalink
Log the tool usage details using PyTorchAdhocBenchmark Logger
Browse files Browse the repository at this point in the history
Summary: To better understand how frequently people are using torchbench, log the run command to scuba and hive using the pytorch adhoc logger.

Reviewed By: FindHao

Differential Revision: D48395757

fbshipit-source-id: 18b77c286e6af2b193bb472cf324098821033c0d
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Aug 16, 2023
1 parent 6a1bb40 commit db19b5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@


if not hasattr(torch.version, "git_version"):
from pytorch.benchmark.fb.run_utils import trace_handler
from pytorch.benchmark.fb.run_utils import trace_handler, usage_report_logger
else:
usage_report_logger = lambda: None


WARMUP_ROUNDS = 3
Expand Down Expand Up @@ -375,6 +377,9 @@ def _validate_profile_options(profile_options: str):
print("cuda device required to use --cudastreams option!")
exit(-1)

# Log the tool usage
usage_report_logger()

found = False
Model = None

Expand Down

0 comments on commit db19b5c

Please sign in to comment.