Skip to content

Commit

Permalink
[easy] Set feature use for aot autograd remote cache (pytorch#143674)
Browse files Browse the repository at this point in the history
Use set_feature_use for logging aot autograd cache so that dynamo_compile has this data as well as PT2 Compile Events.

Differential Revision: [D67536293](https://our.internmc.facebook.com/intern/diff/D67536293/)
Pull Request resolved: pytorch#143674
Approved by: https://github.com/bobrenjc93
  • Loading branch information
jamesjwu authored and pytorchmergebot committed Dec 21, 2024
1 parent ffd1b53 commit 9cb743d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torch/_functorch/aot_autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
dynamo_timed,
get_chromium_event_logger,
preserve_rng_state,
set_feature_use,
)
from torch._guards import detect_fake_mode
from torch._inductor.output_code import OutputCode
Expand Down Expand Up @@ -1165,6 +1166,7 @@ def dispatch_and_compile():
local = should_use_local_autograd_cache()
remote = should_use_remote_autograd_cache()
if local or remote:
set_feature_use("aot_autograd_remote_cache", remote)
compiled_fn = AOTAutogradCache.load(
dispatch_and_compile,
mod,
Expand Down

0 comments on commit 9cb743d

Please sign in to comment.