Skip to content

Commit 2c47425

Browse files
committed
Skip Lesson 5 in CMake rather than the code.
1 parent b1a53b6 commit 2c47425

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

tutorial/CMakeLists.txt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,20 @@ add_tutorial(lesson_01_basics.cpp)
5151
add_tutorial(lesson_02_input_image.cpp WITH_IMAGE_IO)
5252
add_tutorial(lesson_03_debugging_1.cpp)
5353
add_tutorial(lesson_04_debugging_2.cpp GROUPS multithreaded)
54-
add_tutorial(lesson_05_scheduling_1.cpp GROUPS multithreaded)
54+
55+
if (Halide_BUILDING_IN_CI AND
56+
Halide_LLVM_VERSION VERSION_LESS 22 AND
57+
Halide_HOST_TARGET MATCHES "arm-64-linux")
58+
# We can't reliably detect SVE2 without having first built Halide, but the
59+
# SVE2 backend has the below LLVM issue which has been fixed in LLVM 22.
60+
# This issue breaks lesson 5 on the GitHub Actions ARM64 runners, which have
61+
# SVE2 support.
62+
# "Request for a fixed element count on a scalable object"
63+
# See: https://github.com/llvm/llvm-project/issues/160127
64+
else ()
65+
add_tutorial(lesson_05_scheduling_1.cpp GROUPS multithreaded)
66+
endif ()
67+
5568
add_tutorial(lesson_06_realizing_over_shifted_domains.cpp)
5669
add_tutorial(lesson_07_multi_stage_pipelines.cpp WITH_IMAGE_IO)
5770
add_tutorial(lesson_08_scheduling_2.cpp WITH_IMAGE_IO WITH_OPENMP GROUPS multithreaded)

tutorial/lesson_05_scheduling_1.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@
2424
using namespace Halide;
2525

2626
int main() {
27-
// SVE2 backend has the below LLVM issue which has been fixed in LLVM 22.
28-
// "Request for a fixed element count on a scalable object"
29-
// https://github.com/llvm/llvm-project/issues/160127
30-
if (Internal::get_llvm_version() < 220 &&
31-
get_jit_target_from_environment().has_feature(Target::SVE2)) {
32-
printf("[SKIP] LLVM %d has known SVE backend bugs for this test.\n",
33-
Internal::get_llvm_version());
34-
return 0;
35-
}
3627

3728
// We're going to define and schedule our gradient function in
3829
// several different ways, and see what order pixels are computed

0 commit comments

Comments
 (0)