Revision 22a302bc93e1fdc035972e2313ac26a1aab952f8 authored by Steven Johnson on 08 December 2022, 23:59:07 UTC, committed by Steven Johnson on 08 December 2022, 23:59:07 UTC
This makes a couple of changes to the behavior/implementation of `halide_malloc()`:

* Currently, halide_malloc must return a pointer aligned to the maximum meaningful alignment for the platform for the purpose of vector loads and stores. This PR also adds the requirement that the memory returned must be legal to access in an integral multple of alignment >= the requested size (in other words: you should be able to do vector load/stores "off the end" without causing any faults).

* Currently, the `halide_malloc_alignment()` function is used to determine the default alignment; this cannot be overridden by user code (well, it can be, but the override will have no useful effect). It is intended to be "internal only" but is used in at least one place outside the runtime (apps/hannk). This change removes the call entirely, in favor of a call that is harder to access from outside the runtime and much less likely for end users to attempt to call. (It also changes apps/hannk to stop using it.)
1 parent 8fa8221
Raw File
setup.py
import pybind11
from setuptools import find_packages
from skbuild import setup
from pathlib import Path

this_directory = Path(__file__).parent
long_description = (this_directory / "README_python.md").read_text()

setup(
    name="halide",
    version='16.0.0',
    author="The Halide team",
    author_email="halide-dev@lists.csail.mit.edu",
    description="Halide is a programming language designed to make it easier "
                "to write high-performance image and array processing code.",
    long_description=long_description,
    long_description_content_type='text/markdown',
    python_requires=">=3.8",
    packages=find_packages(where="python_bindings/src"),
    package_dir={"": "python_bindings/src"},
    cmake_source_dir="python_bindings",
    cmake_args=[
        f"-Dpybind11_ROOT={pybind11.get_cmake_dir()}",
        "-DCMAKE_REQUIRE_FIND_PACKAGE_pybind11=YES",
        "-DHalide_INSTALL_PYTHONDIR=python_bindings/src",
        "-DCMAKE_INSTALL_RPATH=$<IF:$<PLATFORM_ID:Darwin>,@loader_path,$ORIGIN>",
        "-DHalide_Python_INSTALL_IMPORTED_DEPS=ON",
        "-DWITH_TESTS=NO",
        "-DWITH_TUTORIALS=NO",
        "-DWITH_PYTHON_STUBS=NO",
        "-DCMAKE_PREFIX_PATH=$ENV{CMAKE_PREFIX_PATH}",
        "--no-warn-unused-cli",
    ],
)
back to top