fsdp_checkpointing_base() — pytorch Function Reference
Architecture documentation for the fsdp_checkpointing_base() function in dist_util.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD aa6a976a_820e_3084_1e1e_2603805389df["fsdp_checkpointing_base()"] ff4518e9_afbb_35ef_3d8f_c605ec26b945["apply_fsdp()"] ff4518e9_afbb_35ef_3d8f_c605ec26b945 -->|calls| aa6a976a_820e_3084_1e1e_2603805389df style aa6a976a_820e_3084_1e1e_2603805389df fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/dist_util.py lines 108–123
def fsdp_checkpointing_base(model, blocks):
"""apply activation checkpointing to model
returns None as model is updated directly
"""
non_reentrant_wrapper = functools.partial(
checkpoint_wrapper,
offload_to_cpu=False,
checkpoint_impl=CheckpointImpl.NO_REENTRANT,
)
def check_fn(submodule):
return isinstance(submodule, blocks)
apply_activation_checkpointing(
model, checkpoint_wrapper_fn=non_reentrant_wrapper, check_fn=check_fn
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does fsdp_checkpointing_base() do?
fsdp_checkpointing_base() is a function in the pytorch codebase.
What calls fsdp_checkpointing_base()?
fsdp_checkpointing_base() is called by 1 function(s): apply_fsdp.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free