Update on "Megacache integration"

This diff adds megacache integration for DynamoCache.

Because DynamoCache requires lazy serialization, i.e. it can only be serialized once all relevant backends have been compiled and we're ready for a save, we actually do the DynamoCache saving only on a call to `torch.compiler.save_cache_artifacts`.

Differential Revision: [D82735763](https://our.internmc.facebook.com/intern/diff/D82735763/)

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben Lucaskabela

[ghstack-poisoned]
This commit is contained in:
James Wu
2025-10-15 10:42:44 -07:00

View File

@ -1144,7 +1144,7 @@ class DiskDynamoCache(DiskDynamoStore):
package.install(results.backends)
return package
def path_prefix(self):
def path_prefix(self) -> str:
return os.path.join(cache_dir(), "dynamo")