Skip to content

Commit

Permalink
Merge pull request #8412
Browse files Browse the repository at this point in the history
* Update pip package metadata

* Link to the CMake package docs from Doxygen

* Fix invalid Doxygen annotation in Serialization.h
  • Loading branch information
alexreinking committed Sep 6, 2024
1 parent 63609cc commit 37300e3
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 5 deletions.
24 changes: 24 additions & 0 deletions packaging/pip/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Halide is a programming language designed to make it easier to write
high-performance image and array processing code on modern machines. Halide
currently targets:

- CPU architectures: X86, ARM, Hexagon, PowerPC, RISC-V
- Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT
- GPU Compute APIs: CUDA, OpenCL, Apple Metal, Microsoft Direct X 12, Vulkan

Rather than being a standalone programming language, Halide is embedded in
Python. This means you write Python code that builds an in-memory representation
of a Halide pipeline using Halide's Python API. You can then compile this
representation to an object file, or JIT-compile it and run it in the same
process.

## Using Halide from C++
Halide is also available as a C++ library. This package provides the development
files necessary to use Halide from C++, including a CMake package. On Linux and
macOS, CMake's `find_package` command should find Halide as long as you're in
the same virtual environment you installed it in. On Windows, you will need to
add the virtual environment root directory to `CMAKE_PREFIX_PATH`. This can be
done by running `set CMAKE_PREFIX_PATH=%VIRTUAL_ENV%` in `cmd`.

Other build systems can find the Halide root path by running `python -c
"import halide; print(halide.install_dir())"`.
53 changes: 49 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,65 @@ build-backend = "scikit_build_core.build"
[project]
name = "halide"
authors = [{ name = "The Halide team", email = "halide-dev@lists.csail.mit.edu" }]
maintainers = [{ name = "Alex Reinking", email = "areinking@adobe.com" }]
description = "Halide is a programming language designed to make it easier to write high-performance image and array processing code."
license = { file = "LICENSE.txt" }
readme = "README.md"
readme = "./packaging/pip/README.md"
requires-python = ">=3.8"
dependencies = [
"numpy",
"imageio",
]
dynamic = ['version']
keywords = [
"array",
"compiler",
"domain-specific language",
"dsl",
"gpu",
"hexagon",
"image processing",
"machine learning",
"performance",
"programming language",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: GPU",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: WebAssembly",
"Intended Audience :: Developers",
"Intended Audience :: Science / Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Multimedia :: Graphics",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Libraries",
]

[project.urls]
homepage = "https://halide-lang.org"
documentation = "https://halide-lang.org/docs"
repository = "https://github.com/halide/Halide.git"
Homepage = "https://halide-lang.org"
Documentation = "https://github.com/halide/Halide/blob/main/doc/Python.md"
"Documentation (C++)" = "https://halide-lang.org/docs"
Issues = "https://github.com/halide/Halide/issues"
Repository = "https://github.com/halide/Halide.git"

[tool.scikit-build]
cmake.version = ">=3.28"
Expand Down
4 changes: 4 additions & 0 deletions src/MainPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
* particular check out local_laplacian, bilateral_grid, and
* interpolate.
*
* If you plan to build your program with CMake, you might be interested in
* documentation for <a href="https://github.com/halide/Halide/blob/main/doc/HalideCMakePackage.md">
* the Halide CMake helpers</a>.
*
* Below are links to the documentation for the important classes in Halide.
*
* For defining, scheduling, and evaluating basic pipelines:
Expand Down
1 change: 0 additions & 1 deletion src/Serialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace Halide {
/// @brief Serialize a Halide pipeline into the given data buffer.
/// @param pipeline The Halide pipeline to serialize.
/// @param data The data buffer to store the serialized Halide pipeline into. Any existing contents will be destroyed.
/// @param params Map of named parameters which will get populated during serialization (can be used to bind external parameters to objects in the pipeline by name).
void serialize_pipeline(const Pipeline &pipeline, std::vector<uint8_t> &data);

/// @brief Serialize a Halide pipeline into the given data buffer.
Expand Down

0 comments on commit 37300e3

Please sign in to comment.