diff --git a/README.md b/README.md index 51b9c11..948fe56 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ scripts/Run-Android.ps1 [-Verbose] ### Prebuilt Binaries -Prebuilt binaries will be available [here](https://github.com/PENGUINLIONG/graphi-t/releases). +Prebuilt binaries will be available [here](https://github.com/Microsoft/ArchProbe/releases). ## How to Interpret Outputs @@ -44,6 +44,13 @@ If the `-v` flag is given, ArchProbe prints extra human-readable logs to `stdout Experiment data gathered from Google Pixel 4 can be found [here](examples/adreno640/Google_Pixel_4). +## Tweaking ArchProbe + +ArchProbe allows you to adjsut the sensitivity of the probing algorithms in each aspect. In the config file (by default the generated `ArchProbe.json`), each aspect has a `Threshold` for the algorithm to decide whether the difference in timing is significant enough to be identified as a numerical jump; `Compensate` helps the algorithm to smooth out step-like outputs, for example in cache hierarchy probing. +In some of the aspects (like `RegCount`) ArchProbe also allows you to choose the parameter space, namely `XxxMin`, `XxxMax` and `XxxStep`. But in most of the cases, you can rely on the default ranges ArchProbe derived from the device. + +Although ArchProbe has algorithms to conclude semantical data like bandwidth and computational throughput from execution timing, these algorithms are susceptible to noisy outputs especially under thermal throttling. So it's too recommended to plot the timing data in `.csv` files to have a better understanding of the architecture. + ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a diff --git a/scripts/Pull-AndroidArtifacts.ps1 b/scripts/Pull-AndroidArtifacts.ps1 index 6ee1353..668e38d 100644 --- a/scripts/Pull-AndroidArtifacts.ps1 +++ b/scripts/Pull-AndroidArtifacts.ps1 @@ -2,4 +2,4 @@ if (-not(Test-Path tmp)) { New-Item -ItemType Directory tmp } -adb pull /data/local/tmp/gpu-testbench ./tmp/ +adb pull /data/local/tmp/archprobe ./tmp/ diff --git a/scripts/Remove-AndroidArtifacts.ps1 b/scripts/Remove-AndroidArtifacts.ps1 index 8b1d136..27146d4 100644 --- a/scripts/Remove-AndroidArtifacts.ps1 +++ b/scripts/Remove-AndroidArtifacts.ps1 @@ -1,5 +1,5 @@ -if (Test-Path tmp/gpu-testbench) { - Remove-Item tmp/gpu-testbench -Recurse -Force +if (Test-Path tmp/archprobe) { + Remove-Item tmp/archprobe -Recurse -Force } -adb shell rm -r /data/local/tmp/gpu-testbench +adb shell rm -r /data/local/tmp/archprobe diff --git a/scripts/Run-Android.ps1 b/scripts/Run-Android.ps1 index a8e12f9..b0cda28 100644 --- a/scripts/Run-Android.ps1 +++ b/scripts/Run-Android.ps1 @@ -1,11 +1,16 @@ param( [switch] $Verbose, [switch] $BuildOnly, - [string] $ClearAspect + [string] $ClearAspect, + [string] $Arch ) -if (-not(Test-Path "build-android-aarch64")) { - New-Item "build-android-aarch64" -ItemType Directory +if (-not $Arch) { + $Arch = "armeabi-v7a" +} + +if (-not(Test-Path "build-android-$Arch")) { + New-Item "build-android-$Arch" -ItemType Directory } $NdkHome = $null @@ -21,8 +26,8 @@ if ($NdkHome -eq $null) { return -1 } -Push-Location "build-android-aarch64" -cmake -DCMAKE_TOOLCHAIN_FILE="$NdkHome/build/cmake/android.toolchain.cmake" -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-28 -G "Ninja" .. +Push-Location "build-android-$Arch" +cmake -DCMAKE_TOOLCHAIN_FILE="$NdkHome/build/cmake/android.toolchain.cmake" -DANDROID_ABI="$Arch" -DANDROID_PLATFORM=android-28 -G "Ninja" .. cmake --build . -t ArchProbe Pop-Location @@ -39,7 +44,7 @@ if ($ClearAspect) { } adb reconnect offline -adb push ./build-android-aarch64/assets/ /data/local/tmp/gpu-testbench/ -adb push ./build-android-aarch64/bin/ /data/local/tmp/gpu-testbench/ -adb shell chmod 777 /data/local/tmp/gpu-testbench/bin/ArchProbe -adb shell "cd /data/local/tmp/gpu-testbench/bin && ./ArchProbe $Args" +adb push ./build-android-$Arch/assets/ /data/local/tmp/archprobe/ +adb push ./build-android-$Arch/bin/ /data/local/tmp/archprobe/ +adb shell chmod 777 /data/local/tmp/archprobe/bin/ArchProbe +adb shell "cd /data/local/tmp/archprobe/bin && ./ArchProbe $Args"