pytorch
09117751 - Rearrange the fields in at::OperandInfo to reduce padding. (#98037)

Commit
1 year ago
Rearrange the fields in at::OperandInfo to reduce padding. (#98037) Summary: Rearrange the fields in at::OperandInfo to reduce padding. The current class layout is {64,3,1,1,8,1,1,1,16,16,8,8}. Moving the 5th element in the class allows the small bytes/bools to be packed together. This class is frequently read from places like the stack trace below, so compacting the class could speed things up. c10/util/MaybeOwned.h:198 operator* aten/src/ATen/TensorIterator.h:187 tensor_base aten/src/ATen/TensorIterator.h:322 tensor_base aten/src/ATen/TensorIterator.cpp:1194 compute_mem_overlaps aten/src/ATen/TensorIterator.cpp:1475 build Test Plan: Rely on unit tests. Differential Revision: D44559604 Pull Request resolved: https://github.com/pytorch/pytorch/pull/98037 Approved by: https://github.com/swolchok
Author
Committer
Parents
Loading