pytorch
f0679725 - Make memory overlap a little less precise so it works with null data ptr (#54710)

Commit
4 years ago
Make memory overlap a little less precise so it works with null data ptr (#54710) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54710 I'm going to make meta tensors have storage (but DataPtr is always null) so that I can accurately report memory overlap error checking, but I now have a problem which is that if memory overlap test looks at the actual data pointer, everything is going to look like it aliases! A more conservative test is to just see if the Storage objects themselves alias, and assume that the data pointers are unique if they don't. The loss of precision stems from if you unsafely have two distinct storage objects that point to the same data pointer. This situation is pretty rare and so I think it is worth it (and I am hoping no tests trigger by this.) Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: bdhirsh Differential Revision: D27338810 Pulled By: ezyang fbshipit-source-id: 5ebaf81c22824494c47c1ae78982d9c0e5cba59f
Author
Parents
Loading