Integrate axis mapping into naive matrix multiplication shaders (#5277)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5277 ## Context Give similar treatment as https://github.com/pytorch/executorch/pull/5223 to integrate axis mapping into the naive matrix multiplication shaders. As with the previous diff, code cleanup is performed as well to consolidate shaders and improve code readability. ## Performance impact Running the matrix multiplication operator benchmark, we can observe the following results: | commit | matmul_naive_texture3d_float | linear_naive_texture3d_float | |-------------|------------------------------|------------------------------| | master | 6.53645 | 6.98834 | | this commit | 6.61293 | 6.34905 | Evidently, accounting for axis mapping did not have any significant adverse impact on shader latency. ghstack-source-id: 242452079 exported-using-ghexport Reviewed By: jorgep31415 Differential Revision: D62518403 fbshipit-source-id: de873164fa6202b9b3312d1f62ff1dc2cec86db8
S
Stephen Jia committed
31e652db61bb99a70d93e53647f61f34eacff3e3
Parent: 71602a0
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/13/2024, 10:04:38 PM