← Back to events
ActiveAIRelease

trunk/5dcd9df0140aae22a6bc1809ec6e8e1bdde5bf60: Make iinfo and finfo hashable (#193290)

Photo: PyTorch Releases

What happened

iinfo and finfo compare by their stored ScalarType but did not define a matching hash. This made generated Python code objects unhashable when Dynamo preserved type-info values across graph breaks. Hash the same ScalarType field used by equality, and re-enable the integer clamp test under Dynamo. Allows one to use torch.iinfo with torch.compile (see #193288 for more details) Authored with assistance from Codex, an A…

Summary assembled by rule from the sources below

Why it's spreading

Sources