halide 19.0.0__cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- halide/__init__.py +39 -0
- halide/_generator_helpers.py +835 -0
- halide/bin/adams2019_retrain_cost_model +0 -0
- halide/bin/adams2019_weightsdir_to_weightsfile +0 -0
- halide/bin/anderson2021_retrain_cost_model +0 -0
- halide/bin/anderson2021_weightsdir_to_weightsfile +0 -0
- halide/bin/featurization_to_sample +0 -0
- halide/bin/gengen +0 -0
- halide/bin/get_host_target +0 -0
- halide/halide_.cpython-312-x86_64-linux-gnu.so +0 -0
- halide/imageio.py +60 -0
- halide/include/Halide.h +35293 -0
- halide/include/HalideBuffer.h +2618 -0
- halide/include/HalidePyTorchCudaHelpers.h +64 -0
- halide/include/HalidePyTorchHelpers.h +120 -0
- halide/include/HalideRuntime.h +2221 -0
- halide/include/HalideRuntimeCuda.h +89 -0
- halide/include/HalideRuntimeD3D12Compute.h +91 -0
- halide/include/HalideRuntimeHexagonDma.h +104 -0
- halide/include/HalideRuntimeHexagonHost.h +157 -0
- halide/include/HalideRuntimeMetal.h +112 -0
- halide/include/HalideRuntimeOpenCL.h +119 -0
- halide/include/HalideRuntimeQurt.h +32 -0
- halide/include/HalideRuntimeVulkan.h +137 -0
- halide/include/HalideRuntimeWebGPU.h +44 -0
- halide/lib64/cmake/Halide/FindHalide_LLVM.cmake +152 -0
- halide/lib64/cmake/Halide/FindV8.cmake +33 -0
- halide/lib64/cmake/Halide/Halide-shared-deps.cmake +0 -0
- halide/lib64/cmake/Halide/Halide-shared-targets-release.cmake +29 -0
- halide/lib64/cmake/Halide/Halide-shared-targets.cmake +154 -0
- halide/lib64/cmake/Halide/HalideConfig.cmake +162 -0
- halide/lib64/cmake/Halide/HalideConfigVersion.cmake +65 -0
- halide/lib64/cmake/HalideHelpers/FindHalide_WebGPU.cmake +27 -0
- halide/lib64/cmake/HalideHelpers/Halide-Interfaces-release.cmake +116 -0
- halide/lib64/cmake/HalideHelpers/Halide-Interfaces.cmake +236 -0
- halide/lib64/cmake/HalideHelpers/HalideGeneratorHelpers.cmake +1056 -0
- halide/lib64/cmake/HalideHelpers/HalideHelpersConfig.cmake +28 -0
- halide/lib64/cmake/HalideHelpers/HalideHelpersConfigVersion.cmake +54 -0
- halide/lib64/cmake/HalideHelpers/HalideTargetHelpers.cmake +99 -0
- halide/lib64/cmake/HalideHelpers/MutexCopy.ps1 +31 -0
- halide/lib64/cmake/HalideHelpers/TargetExportScript.cmake +55 -0
- halide/lib64/cmake/Halide_Python/Halide_Python-targets-release.cmake +30 -0
- halide/lib64/cmake/Halide_Python/Halide_Python-targets.cmake +125 -0
- halide/lib64/cmake/Halide_Python/Halide_PythonConfig.cmake +26 -0
- halide/lib64/cmake/Halide_Python/Halide_PythonConfigVersion.cmake +65 -0
- halide/lib64/libHalide.so +0 -0
- halide/lib64/libHalidePyStubs.a +0 -0
- halide/lib64/libHalide_GenGen.a +0 -0
- halide/lib64/libautoschedule_adams2019.so +0 -0
- halide/lib64/libautoschedule_anderson2021.so +0 -0
- halide/lib64/libautoschedule_li2018.so +0 -0
- halide/lib64/libautoschedule_mullapudi2016.so +0 -0
- halide/share/doc/Halide/LICENSE.txt +233 -0
- halide/share/doc/Halide/README.md +439 -0
- halide/share/doc/Halide/doc/BuildingHalideWithCMake.md +626 -0
- halide/share/doc/Halide/doc/CodeStyleCMake.md +393 -0
- halide/share/doc/Halide/doc/FuzzTesting.md +104 -0
- halide/share/doc/Halide/doc/HalideCMakePackage.md +812 -0
- halide/share/doc/Halide/doc/Hexagon.md +73 -0
- halide/share/doc/Halide/doc/Python.md +844 -0
- halide/share/doc/Halide/doc/RunGen.md +283 -0
- halide/share/doc/Halide/doc/Testing.md +125 -0
- halide/share/doc/Halide/doc/Vulkan.md +287 -0
- halide/share/doc/Halide/doc/WebAssembly.md +228 -0
- halide/share/doc/Halide/doc/WebGPU.md +128 -0
- halide/share/tools/RunGen.h +1470 -0
- halide/share/tools/RunGenMain.cpp +642 -0
- halide/share/tools/adams2019_autotune_loop.sh +227 -0
- halide/share/tools/anderson2021_autotune_loop.sh +591 -0
- halide/share/tools/halide_benchmark.h +240 -0
- halide/share/tools/halide_image.h +31 -0
- halide/share/tools/halide_image_info.h +318 -0
- halide/share/tools/halide_image_io.h +2794 -0
- halide/share/tools/halide_malloc_trace.h +102 -0
- halide/share/tools/halide_thread_pool.h +161 -0
- halide/share/tools/halide_trace_config.h +559 -0
- halide-19.0.0.data/data/share/cmake/Halide/HalideConfig.cmake +6 -0
- halide-19.0.0.data/data/share/cmake/Halide/HalideConfigVersion.cmake +65 -0
- halide-19.0.0.data/data/share/cmake/HalideHelpers/HalideHelpersConfig.cmake +6 -0
- halide-19.0.0.data/data/share/cmake/HalideHelpers/HalideHelpersConfigVersion.cmake +54 -0
- halide-19.0.0.dist-info/METADATA +301 -0
- halide-19.0.0.dist-info/RECORD +84 -0
- halide-19.0.0.dist-info/WHEEL +6 -0
- halide-19.0.0.dist-info/licenses/LICENSE.txt +233 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
halide/bin/gengen
ADDED
Binary file
|
Binary file
|
Binary file
|
halide/imageio.py
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
try:
|
2
|
+
import imageio.v2 as imageio
|
3
|
+
except:
|
4
|
+
import imageio
|
5
|
+
import numpy as np
|
6
|
+
|
7
|
+
|
8
|
+
def is_interleaved(im):
|
9
|
+
"""If the given buffer is 3-dimensional and appears to have an interleaved
|
10
|
+
layout, return True. Otherwise, return False."""
|
11
|
+
|
12
|
+
# Assume that 'interleaved' will only apply to channels <= 4
|
13
|
+
mv = memoryview(im)
|
14
|
+
return mv.ndim == 3 and mv.strides[2] == 1 and mv.shape[2] in [1, 2, 3, 4]
|
15
|
+
|
16
|
+
|
17
|
+
def copy_to_interleaved(im):
|
18
|
+
"""If the given buffer is 3-dimensional and appears to be planar
|
19
|
+
layout, return a copy that is in interleaved form. Otherwise, return
|
20
|
+
an unchanged copy of the input. Note that this call will always return
|
21
|
+
a copy, leaving the input unchanged."""
|
22
|
+
mv = memoryview(im)
|
23
|
+
if mv.ndim == 3 and not is_interleaved(mv):
|
24
|
+
# We are presumably planar, in (c, y, x) order; we need (y, x, c) order
|
25
|
+
mv = np.moveaxis(mv, 0, 2)
|
26
|
+
mv = np.copy(mv, order="F")
|
27
|
+
return mv
|
28
|
+
else:
|
29
|
+
return im
|
30
|
+
|
31
|
+
|
32
|
+
def copy_to_planar(im):
|
33
|
+
"""If the given buffer is 3-dimensional and appears to be interleaved
|
34
|
+
layout, return a copy that is in planar form. Otherwise, return
|
35
|
+
an unchanged copy of the input. Note that this call will always return
|
36
|
+
a copy, leaving the input unchanged."""
|
37
|
+
mv = memoryview(im)
|
38
|
+
if is_interleaved(mv):
|
39
|
+
# Interleaved will be in (y, x, c) order; we want (c, y, x) order
|
40
|
+
# (which hl.Buffer will reverse into x, y, c order)
|
41
|
+
mv = np.moveaxis(mv, 2, 0)
|
42
|
+
mv = np.copy(mv, order="C")
|
43
|
+
return mv
|
44
|
+
else:
|
45
|
+
return im
|
46
|
+
|
47
|
+
|
48
|
+
def imread(uri, format=None, **kwargs):
|
49
|
+
"""halide.imageio.imread is a thin wrapper around imagio.imread,
|
50
|
+
except that for 3-dimensional images that appear to be interleaved,
|
51
|
+
the result is converted to a planar layout before returning."""
|
52
|
+
return copy_to_planar(imageio.imread(uri, format, **kwargs))
|
53
|
+
|
54
|
+
|
55
|
+
def imwrite(uri, im, format=None, **kwargs):
|
56
|
+
"""halide.imageio.imwrite is a thin wrapper around imagio.imwrite,
|
57
|
+
except that for 3-dimensional images that appear to be planar,
|
58
|
+
a temporary interleaved copy of the input is made, which is used for
|
59
|
+
writing."""
|
60
|
+
imageio.imwrite(uri, copy_to_interleaved(im), format, **kwargs)
|