You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arm backend: Refactor scalar handling (pytorch#18402)
## Arm backend: use scalars instead of fulls in TFA
Scalars are then converted to buffers by the
ScalarsToAttribute pass. This both simplifies the code,
and allows affected ops to be moved to device with
model.to(device=...).
Note that this does not solve all issues with device
kwargs after TFA, only specifically for scalar cases.
## Arm backend: Clean up some pass inefficiencies.
- The ScalarToAttribute pass went through all submodules
for each node, it only needs to do it once.
- Some exir passes used full_like for scalars. This creates
very buffers of the same size as the input, when a single
value is enough.
cc @digantdesai@freddan80@per@zingo@oscarandersson8218@mansnils@Sebastian-Larsson@robell
---------
Signed-off-by: Erik Lundell <erik.lundell@arm.com>
0 commit comments