Skip to content

Make models/functions optimized with torch.compile hashable #5839

@mariosasko

Description

@mariosasko

As reported in #5819, hashing functions/transforms that reference a model, or a function, optimized with torch.compile currently fails due to them not being picklable (the concrete error can be found in the linked issue).

The solutions to consider:

  1. hashing/pickling the original, uncompiled version of a compiled model/function (attributes _orig_mod/_torchdynamo_orig_callable) (less precise than the 2nd option as it ignores the other params of torch.compute)
  2. wait for Make compiled models serializable pytorch/pytorch#101107 to be resolved

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions