SIGN IN SIGN UP

RegCount max registers calculation (#4171)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/4171

This project adds an internal implementation of https://github.com/microsoft/ArchProbe.

This stack introduces a kernel that can be used to get the number of available registers on a mobile GPU by gradually increasing the number of accessed elements and detecting dramatic drops in performance. See [this paper](https://www.microsoft.com/en-us/research/uploads/prod/2022/02/mobigpu_mobicom22_camera.pdf), page 4, for more information.

This diffs finds the number of registers in a single thread by increasing the number of registers and finding changes in latency. For a Galaxy S22, the latency graph looks like this.

 {F1751910439}

We can easily spot the moment where there is a spill into memory.

Reviewed By: SS-JIA

Differential Revision: D59494644

fbshipit-source-id: 1bb3cc15977624544dd2291d848a8f0297511e02
E
Esteban Padilla Cerdio committed
09336a6b23b1420a5d3fde3f644d2de68cae801d
Parent: ac1c7d0
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 7/11/2024, 5:23:12 PM