Repository navigation
Commit 79e3eae
authored
Arm backend: Fix Cortex-M55 CPU cycle measurements (pytorch#21833)
The affected GCC Arm Cortex-M55 build defines __ARM_ARCH_8M_MAIN__, so
the existing __ARM_ARCH_8_1M_MAIN__ guard excludes PMU initialization
and counter reads. Consequently, inference runtime is always reported as
zero CPU cycles on the Cortex-M55 FPGA.
Guard PMU access using the CMSIS __PMU_PRESENT device capability. This
describes the hardware requirement directly and avoids relying on
architecture macros or a list of specific processor names.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218
@Sebastian-Larsson @robell @rascani
Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>1 parent 09ba075 commit 79e3eae
2 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
0 commit comments