Handle tensor memory offsets > 32 bits (#1792)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/1792 The `AllocationDetails.memory_offset` field is declared as a `uint`, so it can only handle offsets of 32 bits (4GB). Changing the type would break backward compatibility, so instead add a new field for the high 32 bits. Based on some experimentation, this doesn't seem to increase the size of existing .pte files; there's a decent chance that it's sneaking its way into an alignment hole. While I'm in here, add checks for negative values and values too big to fit in 64 bits, so that users see an error in python instead of during the flatc step. Reviewed By: JacobSzwejbka Differential Revision: D53293800 fbshipit-source-id: 88ef87778cd58aacc7ae20299e0c6d7093f52152
D
Dave Bort committed
f57ca1eb51d268a6f85b9b3c9be09cd8435269c7
Parent: ac841ad
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 2/8/2024, 7:37:49 PM