Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

[WONT FIX] tensorflow lite没有设置绑定大核,taskset #37

Open
@ysh329

Description

@ysh329

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:

adb shell taskset f0 /data/local/tmp/benchmark_model \
  --graph=/data/local/tmp/mobilenet_quant_v1_224.tflite \
  --num_threads=1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions