From 88e3c69fdce58352db1a3c5ff8ca0968b8e2c38e Mon Sep 17 00:00:00 2001 From: Alex Reinking Date: Mon, 24 Aug 2026 15:28:00 -0400 Subject: [PATCH] Upgrade halide-llvm to 22.1.8, 23.1.0rc3 LLVM 23.1's AlwaysInliner now checks target-attribute compatibility before inlining (llvm/llvm-project#209345), and without an explicit SME attribute a function defaults to requiring non-streaming mode. These frecpe/frecps-based helpers are safe in either mode but had no attribute saying so, so they stopped getting inlined into sme_streaming() bodies, leaving standalone functions that LLVM's AArch64 backend can't legalize: LLVM ERROR: Don't know how to legalize this scalable vector type Filed upstream at https://github.com/llvm/llvm-project/issues/217639 since the new inliner leaves un-inlinable IR behind instead of either erroring cleanly or still inlining, but the missing attribute here is the real bug: CodeGen_ARM.cpp's own dynamically-generated SVE intrinsic wrappers already set this attribute for the same reason. Co-Authored-By: Claude Sonnet 5 --- pyproject.toml | 6 +++--- src/runtime/aarch64.ll | 8 ++++---- uv.lock | 46 +++++++++++++++++++++--------------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7a259de5cc88..da64136e1c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,9 +40,9 @@ ci-base = [ { include-group = "apps" }, { include-group = "tools" }, ] -ci-llvm-main = [{ include-group = "ci-base" }, "halide-llvm~=23.0.0.dev0"] -ci-llvm-22 = [{ include-group = "ci-base" }, "halide-llvm~=22.1.0"] -ci-llvm-21 = [{ include-group = "ci-base" }, "halide-llvm~=21.1.0"] +ci-llvm-main = [{ include-group = "ci-base" }, "halide-llvm>=23.0.0.dev0,<24"] +ci-llvm-22 = [{ include-group = "ci-base" }, "halide-llvm>=22.0.0.dev0,<23"] +ci-llvm-21 = [{ include-group = "ci-base" }, "halide-llvm>=21.0.0.dev0,<22"] [tool.uv.sources] halide-bin = { workspace = true } diff --git a/src/runtime/aarch64.ll b/src/runtime/aarch64.ll index 98f27f5eed5b..985a29dfa50a 100644 --- a/src/runtime/aarch64.ll +++ b/src/runtime/aarch64.ll @@ -187,21 +187,21 @@ declare @llvm.aarch64.sve.frsqrte.x.nxv8f16( @llvm.aarch64.sve.frecps.x.nxv8f16( %x, %y) nounwind readnone; declare @llvm.aarch64.sve.frsqrts.x.nxv8f16( %x, %y) nounwind readnone; -define weak_odr @fast_inverse_f32nx4( %x) nounwind alwaysinline { +define weak_odr @fast_inverse_f32nx4( %x) nounwind alwaysinline "aarch64_pstate_sm_compatible" { %approx = tail call @llvm.aarch64.sve.frecpe.x.nxv4f32( %x) %correction = tail call @llvm.aarch64.sve.frecps.x.nxv4f32( %approx, %x) %result = fmul %approx, %correction ret %result } -define weak_odr @fast_inverse_f16nx8( %x) nounwind alwaysinline { +define weak_odr @fast_inverse_f16nx8( %x) nounwind alwaysinline "aarch64_pstate_sm_compatible" { %approx = tail call @llvm.aarch64.sve.frecpe.x.nxv8f16( %x) %correction = tail call @llvm.aarch64.sve.frecps.x.nxv8f16( %approx, %x) %result = fmul %approx, %correction ret %result } -define weak_odr @fast_inverse_sqrt_f32nx4( %x) nounwind alwaysinline { +define weak_odr @fast_inverse_sqrt_f32nx4( %x) nounwind alwaysinline "aarch64_pstate_sm_compatible" { %approx = tail call @llvm.aarch64.sve.frsqrte.x.nxv4f32( %x) %approx2 = fmul %approx, %approx %correction = tail call @llvm.aarch64.sve.frsqrts.x.nxv4f32( %approx2, %x) @@ -209,7 +209,7 @@ define weak_odr @fast_inverse_sqrt_f32nx4( %result } -define weak_odr @fast_inverse_sqrt_f16nx8( %x) nounwind alwaysinline { +define weak_odr @fast_inverse_sqrt_f16nx8( %x) nounwind alwaysinline "aarch64_pstate_sm_compatible" { %approx = tail call @llvm.aarch64.sve.frsqrte.x.nxv8f16( %x) %approx2 = fmul %approx, %approx %correction = tail call @llvm.aarch64.sve.frsqrts.x.nxv8f16( %approx2, %x) diff --git a/uv.lock b/uv.lock index 34840d322686..fa2fa6d66cd8 100644 --- a/uv.lock +++ b/uv.lock @@ -444,7 +444,7 @@ wheels = [ [[package]] name = "halide-llvm" -version = "22.1.7" +version = "22.1.8" source = { registry = "https://pypi.halide-lang.org/simple" } resolution-markers = [ "python_full_version >= '3.13' and platform_machine != 'armv7l' and platform_machine != 'armv8l'", @@ -456,19 +456,19 @@ resolution-markers = [ "python_full_version < '3.11' and platform_machine != 'armv7l' and platform_machine != 'armv8l'", ] wheels = [ - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:1f997a871da192c64abb267615cb0aee4491627ce6c705cad849fa6677f352f2" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-macosx_11_0_x86_64.whl", hash = "sha256:2dab547e28434bf3ac1202975969b753c208c6944bdeb786a8cabc3f02f840e9" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b81610ef7d7feb56540661dad5c59d71380a075cf193767c75c450707d15bd66" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b1eacd19a601a55c23b0ddc329a1caec039270fd29c5a3f94f3a913b3b42a937" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-manylinux_2_28_i686.whl", hash = "sha256:7a36e7e0f65cea51d4c3f5f85852dbd4ba94100970a893ef98fe2f2b7f154b44" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-manylinux_2_31_armv7l.whl", hash = "sha256:e9db509c0a3747e3ed0aba53e2d49246ca985efe0b8a1211b7a3c70d4866a3a6" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-win32.whl", hash = "sha256:1f1611454eb9e6dc1a12197ba4c87c6a4caa3fecc7e5ac5ecb767a8d21f025eb" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.7/halide_llvm-22.1.7-py3-none-win_amd64.whl", hash = "sha256:cefb720b2d4df5532ee4742445d55e7004140f3c1257daff8cfa0158d632e986" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:136acbeb8f9522f9e82f7eaf867f0ede1df420172db5276748a90d4fccce1534" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-macosx_11_0_x86_64.whl", hash = "sha256:dbba736c0bf5377e42d2710503762aca5acedf6be4a7130a8891673d1adb8e08" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9455ca95665a317ade5a27d86a47a3041d2d8e45af622d2cf6d8592551334067" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23e7bb3b1d4f7317fe14b53d769dde575565215571ec3d6bd3e80c6e769c1e6d" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-manylinux_2_28_i686.whl", hash = "sha256:606d0281a3cf212f8d3b673d856d2da55619b65904f81c31dda97cb8f3df01d3" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-manylinux_2_31_armv7l.whl", hash = "sha256:dff3f4a9c7ae559c97a69251087276f24b3300bde240c5c3d927fefc1a1ae7b8" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-win32.whl", hash = "sha256:8c662adf5f3899c3e495a87788e77ff8a2559d6339ce20d3987d55af8c5db019" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4022.1.8/halide_llvm-22.1.8-py3-none-win_amd64.whl", hash = "sha256:eb585e648cbc2e9e2e9c69cefdc857f930f7e2482f80eedbd191f3dd0750e41c" }, ] [[package]] name = "halide-llvm" -version = "23.0.0.dev100667+g9bf20bdf" +version = "23.1.0rc3" source = { registry = "https://pypi.halide-lang.org/simple" } resolution-markers = [ "python_full_version >= '3.13' and platform_machine != 'armv7l' and platform_machine != 'armv8l'", @@ -480,14 +480,14 @@ resolution-markers = [ "python_full_version < '3.11' and platform_machine != 'armv7l' and platform_machine != 'armv8l'", ] wheels = [ - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-macosx_11_0_arm64.whl", hash = "sha256:bc6ecef649b0eeb2d9b5827e8664652d6722ffe4ee98bac3febd3e223629d0d0" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-macosx_11_0_x86_64.whl", hash = "sha256:0fc4450b99b599300ff0088ed798082e1c7129e72a71a55a7ed29fd942d15886" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0c00ff01a0c1b43e321cf0491d70d568868c65dc738d59ba054df550b36de6f1" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9dfc5476b8647fb1eab8d6441303d34f065aabfea2d11d547afec94adb27b71b" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-manylinux_2_28_i686.whl", hash = "sha256:182725f20d81737cd3d03ea384eaf9f05fbb6070fe57d22880d5efd90b6eae78" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-manylinux_2_31_armv7l.whl", hash = "sha256:c14abaadf6781b2fbec4495c2d0558ae7fe25c17de05dde8e1b5e88f4de8fe33" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-win32.whl", hash = "sha256:0bff9d935c76af54c0d656f76dd9f9c935784ccc549bf194eb4fedf9f26ce36e" }, - { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.0.0.dev100667%2Bg9bf20bdf/halide_llvm-23.0.0.dev100667%2Bg9bf20bdf-py3-none-win_amd64.whl", hash = "sha256:0b32ab7ab02d63fb66664061da597dee70d5039c7be381a3f5ca73d30733b06f" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:678ac695e3f49b4c76817132c0e26b6812fc517e45e7e4b3baedbe506cfcba0a" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-macosx_11_0_x86_64.whl", hash = "sha256:392363cfb132fc275f31ccd9229486c4e8ae76fb678ad73635e5f7598204aaac" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:efea54578c029833cc13de1a2c5d4de2b8d23d2fe78d078de0ceb99fc9626377" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd88e8634ed1325a44b33862fcbdd463e2e8422399ee2fd924a7572ca411ff2a" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-manylinux_2_28_i686.whl", hash = "sha256:56fb9310046172fa51cae9e63388411d35c3b01043add088586a96549659f56e" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-manylinux_2_31_armv7l.whl", hash = "sha256:3cd6371b386d2d7399e7530dbb88ebd4f28c6ca6f3afa19c0d5b8c53f953c7fe" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-win32.whl", hash = "sha256:21e68346b01420f749872f125c64cda1f8b43660dd20590e01dd73916f8240fa" }, + { url = "https://github.com/halide/pypi/releases/download/halide-llvm%4023.1.0rc3/halide_llvm-23.1.0rc3-py3-none-win_amd64.whl", hash = "sha256:0119ce2a1f031e89b110d7037e16f1cf6fd523796c3d98b89af0409a89ec467c" }, ] [[package]] @@ -569,7 +569,7 @@ ci-llvm-21 = [ ] ci-llvm-22 = [ { name = "cmake" }, - { name = "halide-llvm", version = "22.1.7", source = { registry = "https://pypi.halide-lang.org/simple" } }, + { name = "halide-llvm", version = "22.1.8", source = { registry = "https://pypi.halide-lang.org/simple" } }, { name = "imageio", version = "2.37.4", source = { registry = "https://piwheels.org/simple" }, marker = "(platform_machine == 'armv7l' and extra == 'group-16-halide-workspace-ci-llvm-22') or (platform_machine == 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-22') or (extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-22') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-main')" }, { name = "imageio", version = "2.37.4", source = { registry = "https://pypi.org/simple" }, marker = "(platform_machine != 'armv7l' and platform_machine != 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-22') or (platform_machine == 'armv7l' and extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (platform_machine == 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-22') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-main')" }, { name = "ninja" }, @@ -591,7 +591,7 @@ ci-llvm-22 = [ ] ci-llvm-main = [ { name = "cmake" }, - { name = "halide-llvm", version = "23.0.0.dev100667+g9bf20bdf", source = { registry = "https://pypi.halide-lang.org/simple" } }, + { name = "halide-llvm", version = "23.1.0rc3", source = { registry = "https://pypi.halide-lang.org/simple" } }, { name = "imageio", version = "2.37.4", source = { registry = "https://piwheels.org/simple" }, marker = "(platform_machine == 'armv7l' and extra == 'group-16-halide-workspace-ci-llvm-main') or (platform_machine == 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-main') or (extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-22') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-main')" }, { name = "imageio", version = "2.37.4", source = { registry = "https://pypi.org/simple" }, marker = "(platform_machine != 'armv7l' and platform_machine != 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-main') or (platform_machine == 'armv7l' and extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (platform_machine == 'armv8l' and extra == 'group-16-halide-workspace-ci-llvm-22' and extra == 'group-16-halide-workspace-ci-llvm-main') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-22') or (extra == 'group-16-halide-workspace-ci-llvm-21' and extra == 'group-16-halide-workspace-ci-llvm-main')" }, { name = "ninja" }, @@ -670,7 +670,7 @@ ci-base = [ ] ci-llvm-21 = [ { name = "cmake", specifier = ">=3.28" }, - { name = "halide-llvm", specifier = "~=21.1.0", index = "https://pypi.halide-lang.org/simple" }, + { name = "halide-llvm", specifier = ">=21.0.0.dev0,<22", index = "https://pypi.halide-lang.org/simple" }, { name = "imageio", marker = "platform_machine != 'armv7l' and platform_machine != 'armv8l'", specifier = ">=2" }, { name = "imageio", marker = "platform_machine == 'armv7l' or platform_machine == 'armv8l'", specifier = ">=2", index = "https://piwheels.org/simple" }, { name = "ninja", specifier = ">=1.11,!=1.13.0" }, @@ -689,7 +689,7 @@ ci-llvm-21 = [ ] ci-llvm-22 = [ { name = "cmake", specifier = ">=3.28" }, - { name = "halide-llvm", specifier = "~=22.1.0", index = "https://pypi.halide-lang.org/simple" }, + { name = "halide-llvm", specifier = ">=22.0.0.dev0,<23", index = "https://pypi.halide-lang.org/simple" }, { name = "imageio", marker = "platform_machine != 'armv7l' and platform_machine != 'armv8l'", specifier = ">=2" }, { name = "imageio", marker = "platform_machine == 'armv7l' or platform_machine == 'armv8l'", specifier = ">=2", index = "https://piwheels.org/simple" }, { name = "ninja", specifier = ">=1.11,!=1.13.0" }, @@ -708,7 +708,7 @@ ci-llvm-22 = [ ] ci-llvm-main = [ { name = "cmake", specifier = ">=3.28" }, - { name = "halide-llvm", specifier = "~=23.0.0.dev0", index = "https://pypi.halide-lang.org/simple" }, + { name = "halide-llvm", specifier = ">=23.0.0.dev0,<24", index = "https://pypi.halide-lang.org/simple" }, { name = "imageio", marker = "platform_machine != 'armv7l' and platform_machine != 'armv8l'", specifier = ">=2" }, { name = "imageio", marker = "platform_machine == 'armv7l' or platform_machine == 'armv8l'", specifier = ">=2", index = "https://piwheels.org/simple" }, { name = "ninja", specifier = ">=1.11,!=1.13.0" },