#kernel #build #command-line #filter #building #compile #halide

bin+lib halide-build

A library/utility for building Halide kernels

13 unstable releases (5 breaking)

0.6.0 Oct 29, 2022
0.5.1 May 18, 2022
0.4.1 May 1, 2021
0.4.0 Sep 4, 2020
0.2.0 Dec 7, 2019

#65 in #building

40 downloads per month
Used in 2 crates (via halide-runtime)

ISC license

22KB
562 lines

halide-build

A build tool for Halide filters.

It can be used from within Rust code or from the command-line.

CLI

To build the command-line interface the bin feature must be activated:

$ cargo build --features=bin

Build

To build a kernel from Rust build.rs:

// Create the build context
let build = Build::new(halide_path, output_path);

// Add your source files
build.src.push("mykernel.cpp");

// Build
if build.build()? {
  // Run
  assert!(build.run()?);

  // Link the resulting library
  link_library("./libmykernel.a")
}


lib.rs:

halide-build is used to compile Halide kernels

Dependencies

~230KB