halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.91k stars 1.07k forks source link

Rework LLVM into Find module and enact new component policy. #8379

Closed alexreinking closed 3 months ago

alexreinking commented 3 months ago

Refactor dependencies/llvm into a find module, FindHalide_LLVM.cmake, that encapsulates the way we use LLVM.

As per discussion at the dev meeting and offline with @steven-johnson and @abadams we now always include the GPU backends and all LLVM backends we support. At a minimum, we require WebAssembly and X86, as required by #8344.

The dependencies/ directory is now exclusively for private, optionally vendored dependencies. Going forward, if we need to take a dependency on a project that does not provide a CMake package (and upstream will not agree to a contribution of one), we will write a Find module in cmake/.

In keeping with the pattern of standardizing the names of our configuration points, the Halide_LLVM find module accepts Halide_LLVM_SHARED_LIBS as an argument for picking libLLVM.so/.dylib on Linux/macOS. This replaced the old Halide_SHARED_LLVM option, which is still accepted with a deprecation message.

Note: this commit temporarily breaks Halide_BUNDLE_LLVM, which will be replaced by Halide_BUNDLE_STATIC in the next few CMake advancement PRs.

alexreinking commented 3 months ago

python_tutorial_lesson_10_aot_compilation_run failure is caused by having Numpy 2 installed on mac-x86-worker-2. The code is wrong anyway. Opened as #8380

Not going to let this block the PR.