halide 19.0.0__cp310-cp310-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.
Files changed (84) hide show
  1. halide/__init__.py +39 -0
  2. halide/_generator_helpers.py +835 -0
  3. halide/bin/adams2019_retrain_cost_model +0 -0
  4. halide/bin/adams2019_weightsdir_to_weightsfile +0 -0
  5. halide/bin/anderson2021_retrain_cost_model +0 -0
  6. halide/bin/anderson2021_weightsdir_to_weightsfile +0 -0
  7. halide/bin/featurization_to_sample +0 -0
  8. halide/bin/gengen +0 -0
  9. halide/bin/get_host_target +0 -0
  10. halide/halide_.cpython-310-x86_64-linux-gnu.so +0 -0
  11. halide/imageio.py +60 -0
  12. halide/include/Halide.h +35293 -0
  13. halide/include/HalideBuffer.h +2618 -0
  14. halide/include/HalidePyTorchCudaHelpers.h +64 -0
  15. halide/include/HalidePyTorchHelpers.h +120 -0
  16. halide/include/HalideRuntime.h +2221 -0
  17. halide/include/HalideRuntimeCuda.h +89 -0
  18. halide/include/HalideRuntimeD3D12Compute.h +91 -0
  19. halide/include/HalideRuntimeHexagonDma.h +104 -0
  20. halide/include/HalideRuntimeHexagonHost.h +157 -0
  21. halide/include/HalideRuntimeMetal.h +112 -0
  22. halide/include/HalideRuntimeOpenCL.h +119 -0
  23. halide/include/HalideRuntimeQurt.h +32 -0
  24. halide/include/HalideRuntimeVulkan.h +137 -0
  25. halide/include/HalideRuntimeWebGPU.h +44 -0
  26. halide/lib64/cmake/Halide/FindHalide_LLVM.cmake +152 -0
  27. halide/lib64/cmake/Halide/FindV8.cmake +33 -0
  28. halide/lib64/cmake/Halide/Halide-shared-deps.cmake +0 -0
  29. halide/lib64/cmake/Halide/Halide-shared-targets-release.cmake +29 -0
  30. halide/lib64/cmake/Halide/Halide-shared-targets.cmake +154 -0
  31. halide/lib64/cmake/Halide/HalideConfig.cmake +162 -0
  32. halide/lib64/cmake/Halide/HalideConfigVersion.cmake +65 -0
  33. halide/lib64/cmake/HalideHelpers/FindHalide_WebGPU.cmake +27 -0
  34. halide/lib64/cmake/HalideHelpers/Halide-Interfaces-release.cmake +116 -0
  35. halide/lib64/cmake/HalideHelpers/Halide-Interfaces.cmake +236 -0
  36. halide/lib64/cmake/HalideHelpers/HalideGeneratorHelpers.cmake +1056 -0
  37. halide/lib64/cmake/HalideHelpers/HalideHelpersConfig.cmake +28 -0
  38. halide/lib64/cmake/HalideHelpers/HalideHelpersConfigVersion.cmake +54 -0
  39. halide/lib64/cmake/HalideHelpers/HalideTargetHelpers.cmake +99 -0
  40. halide/lib64/cmake/HalideHelpers/MutexCopy.ps1 +31 -0
  41. halide/lib64/cmake/HalideHelpers/TargetExportScript.cmake +55 -0
  42. halide/lib64/cmake/Halide_Python/Halide_Python-targets-release.cmake +30 -0
  43. halide/lib64/cmake/Halide_Python/Halide_Python-targets.cmake +125 -0
  44. halide/lib64/cmake/Halide_Python/Halide_PythonConfig.cmake +26 -0
  45. halide/lib64/cmake/Halide_Python/Halide_PythonConfigVersion.cmake +65 -0
  46. halide/lib64/libHalide.so +0 -0
  47. halide/lib64/libHalidePyStubs.a +0 -0
  48. halide/lib64/libHalide_GenGen.a +0 -0
  49. halide/lib64/libautoschedule_adams2019.so +0 -0
  50. halide/lib64/libautoschedule_anderson2021.so +0 -0
  51. halide/lib64/libautoschedule_li2018.so +0 -0
  52. halide/lib64/libautoschedule_mullapudi2016.so +0 -0
  53. halide/share/doc/Halide/LICENSE.txt +233 -0
  54. halide/share/doc/Halide/README.md +439 -0
  55. halide/share/doc/Halide/doc/BuildingHalideWithCMake.md +626 -0
  56. halide/share/doc/Halide/doc/CodeStyleCMake.md +393 -0
  57. halide/share/doc/Halide/doc/FuzzTesting.md +104 -0
  58. halide/share/doc/Halide/doc/HalideCMakePackage.md +812 -0
  59. halide/share/doc/Halide/doc/Hexagon.md +73 -0
  60. halide/share/doc/Halide/doc/Python.md +844 -0
  61. halide/share/doc/Halide/doc/RunGen.md +283 -0
  62. halide/share/doc/Halide/doc/Testing.md +125 -0
  63. halide/share/doc/Halide/doc/Vulkan.md +287 -0
  64. halide/share/doc/Halide/doc/WebAssembly.md +228 -0
  65. halide/share/doc/Halide/doc/WebGPU.md +128 -0
  66. halide/share/tools/RunGen.h +1470 -0
  67. halide/share/tools/RunGenMain.cpp +642 -0
  68. halide/share/tools/adams2019_autotune_loop.sh +227 -0
  69. halide/share/tools/anderson2021_autotune_loop.sh +591 -0
  70. halide/share/tools/halide_benchmark.h +240 -0
  71. halide/share/tools/halide_image.h +31 -0
  72. halide/share/tools/halide_image_info.h +318 -0
  73. halide/share/tools/halide_image_io.h +2794 -0
  74. halide/share/tools/halide_malloc_trace.h +102 -0
  75. halide/share/tools/halide_thread_pool.h +161 -0
  76. halide/share/tools/halide_trace_config.h +559 -0
  77. halide-19.0.0.data/data/share/cmake/Halide/HalideConfig.cmake +6 -0
  78. halide-19.0.0.data/data/share/cmake/Halide/HalideConfigVersion.cmake +65 -0
  79. halide-19.0.0.data/data/share/cmake/HalideHelpers/HalideHelpersConfig.cmake +6 -0
  80. halide-19.0.0.data/data/share/cmake/HalideHelpers/HalideHelpersConfigVersion.cmake +54 -0
  81. halide-19.0.0.dist-info/METADATA +301 -0
  82. halide-19.0.0.dist-info/RECORD +84 -0
  83. halide-19.0.0.dist-info/WHEEL +6 -0
  84. halide-19.0.0.dist-info/licenses/LICENSE.txt +233 -0
Binary file
Binary file
halide/bin/gengen ADDED
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)