https://github.com/halide/Halide
Revision 0da1354ba40c473c492182a70741289168fa906a authored by Steven Johnson on 25 June 2021, 23:24:33 UTC, committed by GitHub on 25 June 2021, 23:24:33 UTC
In the variant that tries to compute a good samples/iters value based on min_time, there's a pathological case if the environment's timer is relatively coarse, and the op being profiled is relatively fast; in this case, you can end up with timings that are very close to zero (or *literally* zero), and our attempt to calculate the number of iterations can explode into the billions, making the benchmark appear to hang (as it may take an absurd length of time to run). To fix this, add a maximum value for iters_per_sample, and smarten the calculation for when the measured time is tiny.
1 parent 3f3dd70
History
Tip revision: 0da1354ba40c473c492182a70741289168fa906a authored by Steven Johnson on 25 June 2021, 23:24:33 UTC
Avoid pathological cases in halide_benchmark() (#6110)
Tip revision: 0da1354
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 265 bytes
.clang-tidy -rw-r--r-- 1.7 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.1 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 5.5 KB
CMakePresets.json -rw-r--r-- 5.2 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 3.2 KB
Makefile -rw-r--r-- 101.2 KB
README.md -rw-r--r-- 16.5 KB
README_cmake.md -rw-r--r-- 69.3 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 8.6 KB
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.1 KB

README.md

back to top