From d0b54c0d40b77d8442696f49bafcfa6c853696ea Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Fri, 6 Mar 2026 00:13:46 -0500 Subject: [PATCH 1/4] Remove x86-32-windows and x86-32-linux --- master/master.cfg | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/master/master.cfg b/master/master.cfg index 856cbe2a..4852decf 100644 --- a/master/master.cfg +++ b/master/master.cfg @@ -144,13 +144,13 @@ class HalideWorker(Worker): c["workers"] = [ - HalideWorker("linux-worker-1", max_builds=4, arch="x86", bits=[32, 64], os="linux"), - HalideWorker("linux-worker-4", max_builds=4, arch="x86", bits=[32, 64], os="linux"), + HalideWorker("linux-worker-1", max_builds=4, arch="x86", bits=[64], os="linux"), + HalideWorker("linux-worker-4", max_builds=4, arch="x86", bits=[64], os="linux"), HalideWorker("mac-arm-worker-1", max_builds=2, arch="arm", bits=[64], os="osx"), HalideWorker("mac-x86-worker-2", max_builds=2, arch="x86", bits=[64], os="osx"), HalideWorker("mac-x86-worker-3", max_builds=2, arch="x86", bits=[64], os="osx"), - HalideWorker("win-worker-3", max_builds=1, arch="x86", bits=[32, 64], os="windows"), - HalideWorker("win-worker-4", max_builds=1, arch="x86", bits=[32, 64], os="windows"), + HalideWorker("win-worker-3", max_builds=1, arch="x86", bits=[64], os="windows"), + HalideWorker("win-worker-4", max_builds=1, arch="x86", bits=[64], os="windows"), ] _SANITIZERS = [ @@ -1236,18 +1236,14 @@ def create_build_factory(builder_type): def get_interesting_targets(): for arch in ["arm", "x86"]: - for bits in [32, 64]: - for os in ["linux", "osx", "windows"]: - if arch == "arm" and os == "windows": - # No buildbots for windows-on-arm (yet) - continue - if arch == "arm" and os == "linux": - # ARM Linux builds run on GitHub Actions instead. - continue - if os == "osx" and bits != 64: - # osx is 64-bit only, period - continue - yield arch, bits, os + for os in ["linux", "osx", "windows"]: + if arch == "arm" and os == "windows": + # No buildbots for windows-on-arm (yet) + continue + if arch == "arm" and os == "linux": + # ARM Linux builds run on GitHub Actions instead. + continue + yield arch, 64, os def create_builder(arch, bits, os, llvm_branch): From ca006ccd614938d3e1f6b450deed0105eb646ff5 Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Fri, 6 Mar 2026 00:17:32 -0500 Subject: [PATCH 2/4] Ignore *.pyc --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b37871d3..57bc0eee 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ state.sqlite state.sqlite-shm state.sqlite-wal worker/llvm* +*.pyc From b038cc8f029822fd310626fcfcd9ef33a88bbf9c Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Fri, 6 Mar 2026 00:29:00 -0500 Subject: [PATCH 3/4] Simplify after removing 32-bit builders --- master/master.cfg | 217 +++++++++++----------------------------------- 1 file changed, 50 insertions(+), 167 deletions(-) diff --git a/master/master.cfg b/master/master.cfg index 4852decf..8be1fa2f 100644 --- a/master/master.cfg +++ b/master/master.cfg @@ -128,6 +128,8 @@ LLVM_BRANCHES = { LLVM_RELEASE_20: VersionedBranch(ref="llvmorg-20.1.8", version=Version(20, 1, 8)), } +BITS = 64 + # WORKERS # The 'workers' list defines the set of recognized build workers. Each element @@ -144,13 +146,13 @@ class HalideWorker(Worker): c["workers"] = [ - HalideWorker("linux-worker-1", max_builds=4, arch="x86", bits=[64], os="linux"), - HalideWorker("linux-worker-4", max_builds=4, arch="x86", bits=[64], os="linux"), - HalideWorker("mac-arm-worker-1", max_builds=2, arch="arm", bits=[64], os="osx"), - HalideWorker("mac-x86-worker-2", max_builds=2, arch="x86", bits=[64], os="osx"), - HalideWorker("mac-x86-worker-3", max_builds=2, arch="x86", bits=[64], os="osx"), - HalideWorker("win-worker-3", max_builds=1, arch="x86", bits=[64], os="windows"), - HalideWorker("win-worker-4", max_builds=1, arch="x86", bits=[64], os="windows"), + HalideWorker("linux-worker-1", max_builds=4, arch="x86", bits=BITS, os="linux"), + HalideWorker("linux-worker-4", max_builds=4, arch="x86", bits=BITS, os="linux"), + HalideWorker("mac-arm-worker-1", max_builds=2, arch="arm", bits=BITS, os="osx"), + HalideWorker("mac-x86-worker-2", max_builds=2, arch="x86", bits=BITS, os="osx"), + HalideWorker("mac-x86-worker-3", max_builds=2, arch="x86", bits=BITS, os="osx"), + HalideWorker("win-worker-3", max_builds=1, arch="x86", bits=BITS, os="windows"), + HalideWorker("win-worker-4", max_builds=1, arch="x86", bits=BITS, os="windows"), ] _SANITIZERS = [ @@ -193,7 +195,7 @@ class HalideBuilder(BuilderConfig): def __init__(self, arch, bits, os, llvm_branch, sanitizer=None): assert arch in ["arm", "x86"] - assert bits in [32, 64] + assert bits == BITS assert os in ["linux", "windows", "osx"] assert llvm_branch in LLVM_BRANCHES, f"{llvm_branch} not recognized" @@ -215,23 +217,16 @@ class HalideBuilder(BuilderConfig): tags=self.builder_tags(), ) - # We don't support the Python bindings on 32-bit at all. def handles_python(self): - if self.bits == 32: - return False - - if self.sanitizer_preset() is not None: - return False - - return True + return self.sanitizer_preset() is None # Serialization-via-JIT testing could run anywhere, but we limit it # to x64-linux to avoid redundancy. def handles_serialization_jit_testing(self): - return self.arch == "x86" and self.bits == 64 and self.os == "linux" and self.llvm_branch == LLVM_MAIN + return self.arch == "x86" and self.os == "linux" and self.llvm_branch == LLVM_MAIN def handles_sanitizers(self): - return self.arch == "x86" and self.bits == 64 and self.os == "linux" and self.llvm_branch == LLVM_MAIN + return self.arch == "x86" and self.os == "linux" and self.llvm_branch == LLVM_MAIN def sanitizer_preset(self): if self.handles_sanitizers(): @@ -243,26 +238,21 @@ class HalideBuilder(BuilderConfig): return None def handles_hexagon(self): - return self.arch == "x86" and self.bits == 64 and self.os == "linux" and self.llvm_branch == LLVM_MAIN + return self.arch == "x86" and self.os == "linux" and self.llvm_branch == LLVM_MAIN def handles_wasm(self): - is_linux_x64 = self.arch == "x86" and self.bits == 64 and self.os == "linux" - - return self.llvm_branch == LLVM_MAIN and (is_linux_x64 or self.os == "osx") - - def handles_wasm_wabt(self): - return self.handles_wasm() + return self.llvm_branch == LLVM_MAIN and ((self.arch == "x86" and self.os == "linux") or self.os == "osx") def handles_wasm_v8(self): # OSX machines don't have V8 installed return self.handles_wasm() and self.os == "linux" def has_nvidia(self): - return self.arch == "x86" and self.bits == 64 and self.os in ["windows", "linux"] + return self.arch == "x86" and self.os in ["windows", "linux"] def handles_vulkan(self): # Stick with Windows on x86-64 for now. Others TBD. - return self.arch == "x86" and self.bits == 64 and self.os == "windows" + return self.arch == "x86" and self.os == "windows" def handles_webgpu(self): # At the moment, the WebGPU team recommends the OSX versions of Dawn/Node @@ -272,11 +262,7 @@ class HalideBuilder(BuilderConfig): return self.os == "osx" def has_tflite(self): - if self.arch == "x86" and self.bits == 64 and self.os == "linux": - return True - if self.arch == "arm" and self.bits == 64 and self.os == "osx": - return True - return False + return (self.arch == "x86" and self.os == "linux") or (self.arch == "arm" and self.os == "osx") def has_ccache(self): return self.os in ["osx", "linux"] @@ -296,7 +282,7 @@ class HalideBuilder(BuilderConfig): return self.builder_label().split("-") def is_compatible_with(self, worker): - return self.arch == worker.arch and self.bits in worker.bits and self.os == worker.os + return self.arch == worker.arch and self.bits == worker.bits and self.os == worker.os def __str__(self): return self.halide_target() @@ -400,10 +386,6 @@ def save_environment(prop, allowlist): def get_msvc_config_steps(factory, builder_type): - # ensure that we use the x64 host compiler, not the x86 host compiler - arch_for_bits = {32: "x64_x86", 64: "x64"} - vcvarsall = f"vcvarsall.bat {arch_for_bits[builder_type.bits]} && set" - # TODO: surely there is a better way of locating vcvarsall # vcvarsdir = "c:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build" vcvarsdir = "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build" @@ -418,7 +400,7 @@ def get_msvc_config_steps(factory, builder_type): workdir=vcvarsdir, locks=[performance_lock.access("counting")], haltOnFailure=True, - command=vcvarsall, + command="vcvarsall.bat x64 && set", extract_fn=save_environment("env", VCVARSALL_ENV_VARS), ) ) @@ -444,8 +426,8 @@ def get_ctest_options(builder_type): # at test time (just at configure time). # return {'preset': builder_type.sanitizer_preset(), 'test_dir': build_dir} return {"build_config": builder_type.sanitizer_preset()} - else: - return {"build_config": "Release"} + + return {"build_config": "Release"} def get_cmake_definitions(builder_type, halide_target="host", wasm_jit="wabt", extra_cmake_defs=None): @@ -511,9 +493,7 @@ def get_build_command(build_dir, targets=None): def add_create_venv_step(factory, builder_type): llvm_ver = LLVM_BRANCHES[builder_type.llvm_branch].short_version - platform_tag = _PIP_PLATFORM_TAGS[(builder_type.arch, builder_type.bits, builder_type.os)] - - group = f"ci-llvm-{llvm_ver}" if platform_tag is None else "ci-base" + group = f"ci-llvm-{llvm_ver}" if builder_type.os == "windows": activate = r'"%UV_PROJECT_ENVIRONMENT%\Scripts\activate"' @@ -543,101 +523,17 @@ def add_create_venv_step(factory, builder_type): ) ) - -_PIP_PLATFORM_TAGS = { - # (arch, bits, os) -> pip --platform tag; None means native (no flag needed) - ("x86", 64, "linux"): None, - ("x86", 32, "linux"): "manylinux_2_28_i686", - ("x86", 64, "osx"): None, - ("arm", 64, "osx"): None, - ("x86", 64, "windows"): None, - ("x86", 32, "windows"): "win32", -} - - -def add_install_llvm_step(factory, builder_type): - llvm = LLVM_BRANCHES[builder_type.llvm_branch].short_version - platform_tag = _PIP_PLATFORM_TAGS[(builder_type.arch, builder_type.bits, builder_type.os)] - - if platform_tag is None: - # Native-install: halide-llvm was already installed by uv sync - factory.addStep( - SetPropertyFromCommand( - name=f"Get LLVM {llvm} prefix", - locks=[performance_lock.access("counting")], - workdir=get_source_path(), - haltOnFailure=True, - env=Property("env"), - command="halide-llvm --prefix", - property="HALIDE_LLVM_ROOT", - ) - ) - else: - # Cross-install: use pip to install halide-llvm for a foreign platform - extra_index = "https://pypi.halide-lang.org/simple/" - target_dir = get_builddir_subpath("halide-llvm-cross") - - factory.addStep( - ShellCommand( - name="Install pip", - locks=[performance_lock.access("counting")], - workdir=get_source_path(), - haltOnFailure=True, - env=Property("env"), - command="uv pip install pip", - ) - ) - - factory.addStep( - SetPropertyFromCommand( - name=f"Get halide-llvm {llvm} version", - locks=[performance_lock.access("counting")], - workdir=get_source_path(), - haltOnFailure=True, - command=( - f"uv export --group ci-llvm-{llvm} --format requirements.txt " - "--no-hashes --no-annotate --no-header --no-emit-project" - ), - extract_fn=lambda _rc, stdout, _stderr: { - "HALIDE_LLVM_PIP_VERSION": re.search(r"^halide-llvm==.+$", stdout, re.M).group() # type: ignore[union-attr] - }, - ) - ) - - factory.addStep( - RemoveDirectory( - name=f"Remove old halide-llvm {llvm} cross dir", - locks=[performance_lock.access("counting")], - dir=target_dir, - haltOnFailure=False, - ) - ) - - factory.addStep( - ShellCommand( - name=f"Install halide-llvm {llvm} ({platform_tag})", - locks=[performance_lock.access("counting")], - workdir=get_source_path(), - haltOnFailure=True, - env=Property("env"), - command=Interpolate("python -m pip install --pre --target ") - + target_dir - + Interpolate( - f" --platform {platform_tag} --only-binary=:all: " - '"%(prop:HALIDE_LLVM_PIP_VERSION)s" ' - f"--extra-index-url {extra_index}" - ), - ) - ) - - # The prefix is the data directory inside the installed package - llvm_root = get_builddir_subpath("halide-llvm-cross/halide_llvm/data") - factory.addStep( - SetProperties( - name=f"Set LLVM {llvm} prefix (cross)", - properties={"HALIDE_LLVM_ROOT": llvm_root}, - ) + factory.addStep( + SetPropertyFromCommand( + name=f"Get LLVM {llvm_ver} prefix", + locks=[performance_lock.access("counting")], + workdir=get_source_path(), + haltOnFailure=True, + env=Property("env"), + command="halide-llvm --prefix", + property="HALIDE_LLVM_ROOT", ) + ) def add_env_setup_step(factory, builder_type): @@ -645,26 +541,20 @@ def add_env_setup_step(factory, builder_type): # do this first because the SetPropertyFromCommand step isn't smart enough to merge get_msvc_config_steps(factory, builder_type) - cxx = "c++" - cc = "cc" - ld = "ld" - if builder_type.os == "linux": cc = "gcc-9" cxx = "g++-9" - ld = "ld" - if builder_type.arch == "x86" and builder_type.bits == 32: - cxx += " -m32" - cc += " -m32" - ld += " -melf_i386" elif builder_type.os == "windows": cxx = "cl.exe" cc = "cl.exe" + else: + cxx = "c++" + cc = "cc" env: dict[str, Renderable] = { "CC": cc, "CXX": cxx, - "LD": ld, + "LD": "ld", } factory.addStep( @@ -913,9 +803,8 @@ def get_test_labels(builder_type): if builder_type.arch == "x86": t = f"x86-{builder_type.bits}-{builder_type.os}" targets[t].extend(["correctness"]) - # on x86-64, also test with SSE4.1 (but nothing else that 'host' might sniff) - if builder_type.bits == 64: - targets[f"{t}-sse41"].extend(["correctness"]) + # Also test with SSE4.1 (but nothing else that 'host' might sniff). + targets[f"{t}-sse41"].extend(["correctness"]) # Test a subset of things on GPU/DSP targets, as appropriate for t, is_simulator in get_gpu_dsp_targets(builder_type): @@ -944,17 +833,12 @@ def get_test_labels(builder_type): ) if builder_type.handles_wasm(): - if builder_type.handles_wasm_wabt(): - # TODO: this is a horrid hack. For now, we want to test JIT with both WABT and V8. - # Add as a horrible wart on the target string. - targets["wasm-32-wasmrt-wasm_simd128/wabt"].extend( - ["internal", "correctness", "generator", "error", "warning"] - ) + # TODO: this is a horrid hack. For now, we want to test JIT with both WABT and V8. + # Add as a horrible wart on the target string. + targets["wasm-32-wasmrt-wasm_simd128/wabt"].extend(["internal", "correctness", "generator", "error", "warning"]) - # Do at least some testing with "baseline-only" wasm - targets["wasm-32-wasmrt-wasm_mvponly/wabt"].extend( - ["internal", "correctness", "generator", "error", "warning"] - ) + # Do at least some testing with "baseline-only" wasm + targets["wasm-32-wasmrt-wasm_mvponly/wabt"].extend(["internal", "correctness", "generator", "error", "warning"]) if builder_type.handles_wasm_v8(): # TODO: this is a horrid hack. For now, we want to test JIT with both WABT and V8. @@ -1102,8 +986,8 @@ def add_test_steps(factory, builder_type): exclude_tests.append("lens_blur") exclude_tests.append("unsharp") - if builder_type.os == "linux" or builder_type.bits == 32: - # TODO: disable tutorial_lesson_12_using_the_gpu (both C++ and python) on linux and 32-bit + if builder_type.os == "linux": + # TODO: disable tutorial_lesson_12_using_the_gpu (both C++ and python) on linux exclude_tests.append("tutorial_lesson_12") if builder_type.sanitizer == "asan": @@ -1111,8 +995,8 @@ def add_test_steps(factory, builder_type): # so just exclude it when doing ASAN exclude_tests.append("tutorial_lesson_19") - if builder_type.arch == "arm" or builder_type.bits == 32: - # TODO: disable lesson_19 on ARM and 32-bit targets + if builder_type.arch == "arm": + # TODO: disable lesson_19 on ARM targets # https://github.com/halide/Halide/issues/5224 exclude_tests.append("tutorial_lesson_19") @@ -1228,7 +1112,6 @@ def create_build_factory(builder_type): add_env_setup_step(factory, builder_type) add_get_source_steps(factory) add_create_venv_step(factory, builder_type) - add_install_llvm_step(factory, builder_type) add_build_steps(factory, builder_type) add_test_steps(factory, builder_type) return factory @@ -1243,7 +1126,7 @@ def get_interesting_targets(): if arch == "arm" and os == "linux": # ARM Linux builds run on GitHub Actions instead. continue - yield arch, 64, os + yield arch, BITS, os def create_builder(arch, bits, os, llvm_branch): @@ -1269,7 +1152,7 @@ def create_builders(): # Test pull requests for Halide master against the current and previous LLVM, for at least one target. for llvm_branch in LLVM_BRANCHES: if llvm_branch != LLVM_MAIN: - yield from create_builder("x86", 64, "linux", llvm_branch) + yield from create_builder("x86", BITS, "linux", llvm_branch) c["builders"] = list(create_builders()) From c33810aaa4703503cd61f0c7eaddee9c5a12d601 Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Sun, 8 Mar 2026 23:39:46 -0400 Subject: [PATCH 4/4] Drop unused toolchain file --- master/toolchain.linux-arm32.cmake | 33 ------------------------------ 1 file changed, 33 deletions(-) delete mode 100644 master/toolchain.linux-arm32.cmake diff --git a/master/toolchain.linux-arm32.cmake b/master/toolchain.linux-arm32.cmake deleted file mode 100644 index d1276645..00000000 --- a/master/toolchain.linux-arm32.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Toolchain for cross-compiling to Linux-arm32 on a Linux-x86-64 or Linux-aarch64 host. -# -# If you just want to crosscompile, you need to install: -# -# apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf -# -# On an aarch64 host, you can also run the results if you: -# -# dpkg --add-architecture armhf -# apt-get install libc6:armhf libstdc++6:armhf - -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR arm) - -if (NOT DEFINED CMAKE_C_COMPILER) - set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc) -endif () -if (NOT DEFINED CMAKE_CXX_COMPILER) - set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++) -endif () - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - -# add_custom_command() will make bad decisions about running the command -# when crosscompiling (it won't expand the target into a full path). -# Setting CMAKE_CROSSCOMPILING_EMULATOR to /usr/bin/env tricks it into -# doing the right thing (ie, running it directly). Note that if you want -# to build/run on x86-64 systems, you could set this to some qemu command\ -# (though the results will likely be very slow). -set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/env)