Halide icon indicating copy to clipboard operation
Halide copied to clipboard

Slow test case: tutorial_lesson_15_build_gens

Open jayaddison opened this issue 2 years ago • 3 comments

This bug report may be low on details while I'm collecting them - I'll provide more information as I learn more about the problem.

While compiling halide v14.0.0 from source on Debian bookworm locally, I've noticed an extremely slow (perhaps infinite loop) unit test behaviour: the tutorial_lesson_15_build_gens test seems to run for minutes, consuming large amounts of CPU time.

I'll try to narrow down the problem by reducing the test's code and build script.

jayaddison avatar Jan 14 '23 12:01 jayaddison

The steps to replicate the failure are approximately the following, within a debian:bookworm-based container:

# first, use your favourite EDITOR to add a 'deb-src' entry for 'bookworm main' in /etc/apt/sources.list
# and then:
apt update && apt upgrade -y
apt install -y build-essential devscripts

# retrieve the source package
apt source halide

# install dependencies, and then build and test
mk-build-deps -i
dpkg-buildpackage -b

jayaddison avatar Jan 14 '23 17:01 jayaddison

Ok: the test does complete eventually -- it takes a relatively long time, though.

563/569 Test #563: tutorial_lesson_15_build_gens ..............................   Passed  1186.17 sec

(compared to single-digit seconds for other tests)

After attaching strace during a recent run of the test, I saw the UnrollLoops.cpp file being accessed - that seemed strange? Is some of the previously-compiled source code being accessed during a unit test? (perhaps a rebuild of some of the tooling, for some reason?)

jayaddison avatar Jan 14 '23 18:01 jayaddison

Ping @alexreinking - sorry to nag directly - it's OK to close this if it's not likely to see much attention. I'm going through a few old issues/pull requests I've opened to do some cleanup, and it seems that you still poke at the build system here from time to time.

jayaddison avatar Oct 04 '23 16:10 jayaddison