Home / Function/ maybe_fresh_cache() — pytorch Function Reference

maybe_fresh_cache() — pytorch Function Reference

Architecture documentation for the maybe_fresh_cache() function in common.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  06048c7c_b216_de58_82e5_19ecf074c96a["maybe_fresh_cache()"]
  60550900_f047_a85b_c5ab_ff80b30486b4["main()"]
  60550900_f047_a85b_c5ab_ff80b30486b4 -->|calls| 06048c7c_b216_de58_82e5_19ecf074c96a
  style 06048c7c_b216_de58_82e5_19ecf074c96a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/common.py lines 3742–3749

def maybe_fresh_cache(args):
    cache_dir_assigned = "TORCHINDUCTOR_CACHE_DIR" in os.environ
    if not cache_dir_assigned and (
        args.cold_start_latency or args.warm_start_latency or args.ci
    ):
        return fresh_cache()
    else:
        return contextlib.nullcontext()

Subdomains

Called By

Frequently Asked Questions

What does maybe_fresh_cache() do?
maybe_fresh_cache() is a function in the pytorch codebase.
What calls maybe_fresh_cache()?
maybe_fresh_cache() is called by 1 function(s): main.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free