← Back to events
ActiveAIRelease

viable/strict/1788202219: [AOTInductor] Fix user-managed constant handle leak (#194480) (#194480)

Photo: PyTorch Releases

What happened

Summary: MaybeOwningAtenTensorHandle created a shallow tensor handle for user-managed constants without owning it, leaking the allocated tensor wrapper and its reference to the underlying storage. Store every ConstantMap entry in RAIIAtenTensorHandle . For user-managed constants, create a checked shallow handle copy and immediately transfer ownership to the map. This preserves zero-copy tensor data and caller owners…

Summary assembled by rule from the sources below

Why it's spreading

Sources