Files
Bin Bao 1dd80c3849 [AOTI] Fix proxy executor ScalarType/MemoryFormat/Layout deserialization (#173562)
Summary: Fixes https://github.com/pytorch/pytorch/issues/169157.

The proxy executor was incorrectly deserializing enum arguments by directly casting serialized integer values to c10 enum types. However, the serialized format (torch._export.serde.schema) uses different enum values than c10. This caused custom ops with dtype arguments (e.g., torch.int8) to receive wrong types at runtime, leading to errors like "unsupport output type". The fix addes enum value mappings and auto-generates C++ conversion code using scripts/export/update_schema.py.

Co-authored-by: Claude

Pull Request resolved: https://github.com/pytorch/pytorch/pull/173562
Approved by: https://github.com/yushangdi
2026-02-19 02:33:44 +00:00
..