Skip to content

Fix caching tutorial order #3278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions recipes_source/torch_compile_caching_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ Consider the following example. First, compile and save the cache artifacts.

artifacts = torch.compiler.save_cache_artifacts()

# Now, potentially store these artifacts in a database
assert artifacts is not None
artifact_bytes, cache_info = artifacts

# Now, potentially store artifact_bytes in a database
# You can use cache_info for logging

Later, you can jump-start the cache by the following:

.. code-block:: python

# Potentially download/fetch the artifacts from the database
assert artifacts is not None
artifact_bytes, cache_info = artifacts

torch.compiler.load_cache_artifacts(artifact_bytes)

This operation populates all the modular caches that will be discussed in the next section, including ``PGO``, ``AOTAutograd``, ``Inductor``, ``Triton``, and ``Autotuning``.
Expand Down
Loading