Skip to content

Commit 87d954e

Browse files
masnesralfacebook-github-bot
authored andcommitted
Record how many parameters we're parsing within dynamo (#148508)
Summary: This allows us to track how many paramaters we have in compilations. X-link: pytorch/pytorch#148508 Approved by: https://github.com/jansel, https://github.com/anijain2305 Reviewed By: Camyll Differential Revision: D73119517 fbshipit-source-id: c00d3ca4e5ac834f293de1a497056a21c73c7807 Co-authored-by: Sam Larsen <[email protected]>
1 parent 2269ff7 commit 87d954e

File tree

1 file changed

+9
-0
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+9
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,15 @@ class CompilationMetrics:
12691269
python_version: Optional[str] = None
12701270
pgo_put_remote_code_state_time_us: Optional[int] = None
12711271
pgo_get_remote_code_state_time_us: Optional[int] = None
1272+
# The number of elements within parameters. This is classically what people
1273+
# think of when they think of parameters in a ML model.
1274+
param_numel: Optional[int] = None
1275+
# The number of elements counted by bytes - i.e. a float32 is 4 bytes
1276+
# per element.
1277+
param_bytes: Optional[int] = None
1278+
# The number of parameters counted by fields. This is mostly a proxy for
1279+
# the number of distinct type of params.
1280+
param_count: Optional[int] = None
12721281

12731282
@classmethod
12741283
def create(cls, metrics: dict[str, Any]):

0 commit comments

Comments
 (0)