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
{{ message }}
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.
Most modern Android phones use ARM big.LITTLE architecture where some cores are more power hungry but faster than other cores. When running benchmarks on these phones there can be significant variance between different runs of the benchmark. One way to reduce variance between runs is to set the CPU affinity before running the benchmark. On Android this can be done using the taskset command. E.g. for running the benchmark on big cores on Pixel 2 with a single thread one can use the following command:
The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU. Not all CPUs may exist on a given system but a mask may specify more CPUs than are present. A retrieved mask will reflect only the bits that correspond to CPUs physically on the system. If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned. The masks are typically given in hexadecimal. For example,
0x00000001
is processor #0
0x00000003
is processors #0 and #1
0xFFFFFFFF
is all processors (#0 through #31)
Reducing variance between runs on Android.
Most modern Android phones use ARM big.LITTLE architecture where some cores are more power hungry but faster than other cores. When running benchmarks on these phones there can be significant variance between different runs of the benchmark. One way to reduce variance between runs is to set the CPU affinity before running the benchmark. On Android this can be done using the taskset command. E.g. for running the benchmark on big cores on Pixel 2 with a single thread one can use the following command:
where f0 is the affinity mask for big cores on Pixel 2. Note: The affinity mask varies with the device.
ref: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/tools/benchmark#reducing-variance-between-runs-on-android
The text was updated successfully, but these errors were encountered: