Skip to content

Commit

Permalink
pytorch/feature: Record if inductor fx cache is enabled (#141059)
Browse files Browse the repository at this point in the history
Summary:
This uses the underlying infrastructure and records if the fx cache is
enabled.

X-link: pytorch/pytorch#141059
Approved by: https://github.com/masnesral

Reviewed By: izaitsevfb

Differential Revision: D66405260

Pulled By: c00w

fbshipit-source-id: c88823ec4fd752d90385ed1d55f49a3e47fc78b0
  • Loading branch information
c00w authored and facebook-github-bot committed Nov 23, 2024
1 parent 03e12ce commit 0fd86c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3599,4 +3599,6 @@ def set_feature_use(feature: str, usage: bool):
Records whether we are using a feature
Generally a feature is a JK.
"""
get_metrics_context().set_key_value("feature_usage", feature, usage)
# Note that sometimes (tests etc...) we're not in a context which we can record into
if get_metrics_context().in_progress():
get_metrics_context().set_key_value("feature_usage", feature, usage)

0 comments on commit 0fd86c0

Please sign in to comment.