├── .clang-format ├── .clang-format-ignore ├── .clang-tidy ├── .git_archival.txt ├── .gitattributes ├── .github └── workflows │ ├── pip.yml │ └── presubmit.yml ├── .gitignore ├── .gitmodules ├── .lldbinit ├── CMakeLists.txt ├── CMakePresets.json ├── CODE_OF_CONDUCT.md ├── LICENSE.txt ├── Makefile ├── README.md ├── apps ├── CMakeLists.txt ├── CMakePresets.json ├── HelloAndroid │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── README.md │ ├── ant.properties │ ├── build-gradle.sh │ ├── build.gradle │ ├── build.sh │ ├── build.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ ├── hello_generator.cpp │ │ └── hello_wrapper.cpp │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── layout │ │ │ └── main.xml │ │ └── values │ │ │ └── strings.xml │ └── src │ │ └── com │ │ └── example │ │ └── hellohalide │ │ ├── CameraActivity.java │ │ ├── CameraPreview.java │ │ └── FrameHandler.java ├── HelloAndroidCamera2 │ ├── .gitignore │ ├── AndroidManifest.xml │ ├── README.md │ ├── ant.properties │ ├── build-gradle.sh │ ├── build.gradle │ ├── build.sh │ ├── build.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── jni │ │ ├── Android.mk │ │ ├── AndroidBufferUtilities.cpp │ │ ├── AndroidBufferUtilities.h │ │ ├── Application.mk │ │ ├── HalideFilters.cpp │ │ ├── LockedSurface.cpp │ │ ├── LockedSurface.h │ │ ├── YuvBufferT.cpp │ │ ├── YuvBufferT.h │ │ ├── deinterleave_generator.cpp │ │ └── edge_detect_generator.cpp │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── layout │ │ │ ├── activity_camera.xml │ │ │ ├── fragment_camera2_basic.xml │ │ │ └── main.xml │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ └── src │ │ └── com │ │ ├── android │ │ └── ex │ │ │ └── camera2 │ │ │ ├── blocking │ │ │ ├── BlockingCameraManager.java │ │ │ ├── BlockingCaptureCallback.java │ │ │ ├── BlockingSessionCallback.java │ │ │ └── BlockingStateCallback.java │ │ │ ├── exceptions │ │ │ └── TimeoutRuntimeException.java │ │ │ ├── pos │ │ │ └── AutoFocusStateMachine.java │ │ │ └── utils │ │ │ ├── StateChangeListener.java │ │ │ ├── StateWaiter.java │ │ │ └── SysTrace.java │ │ └── example │ │ └── helloandroidcamera2 │ │ ├── AndroidBufferUtilities.java │ │ ├── AutoFitSurfaceView.java │ │ ├── Camera2BasicFragment.java │ │ ├── CameraActivity.java │ │ ├── HalideFilters.java │ │ ├── HalideYuvBufferT.java │ │ └── NativeSurfaceHandle.java ├── HelloBaremetal │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ ├── add_generator.cpp │ ├── cmake-external_project │ │ ├── CMakeLists.txt │ │ ├── build.sh │ │ ├── generator │ │ │ └── CMakeLists.txt │ │ └── run.sh │ ├── cmake-super_build │ │ ├── CMakeLists.txt │ │ ├── app │ │ │ └── CMakeLists.txt │ │ ├── build.sh │ │ ├── generator │ │ │ └── CMakeLists.txt │ │ └── run.sh │ ├── cmake-twice │ │ ├── CMakeLists.txt │ │ ├── build.sh │ │ └── run.sh │ ├── cmake │ │ └── toolchain.noos-arm32-sample.cmake │ ├── enable_neon.s │ ├── filter.cpp │ └── run_baremetal.sh ├── HelloPyTorch │ ├── Makefile │ ├── README.md │ ├── modules.py │ ├── setup.cfg │ ├── setup.py │ ├── src │ │ └── add_generator.cpp │ └── test.py ├── HelloWasm │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── core.cpp │ ├── index.html │ ├── main.js │ ├── reaction_diffusion_generator.cpp │ └── sw.js ├── HelloiOS │ ├── HelloiOS.xcodeproj │ │ └── project.pbxproj │ └── HelloiOS │ │ ├── AppDelegate.h │ │ ├── AppDelegate.mm │ │ ├── HalideView.h │ │ ├── HalideView.mm │ │ ├── HalideViewController.h │ │ ├── HalideViewController.mm │ │ ├── HelloiOS-Info.plist │ │ ├── HelloiOS-Prefix.pch │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── main.mm │ │ └── reaction_diffusion_2_generator.cpp ├── auto_viz │ ├── Makefile │ ├── auto_viz_demo.cpp │ └── auto_viz_demo_generator.cpp ├── bgu │ ├── CMakeLists.txt │ ├── Makefile │ ├── bgu_generator.cpp │ └── filter.cpp ├── bilateral_grid │ ├── CMakeLists.txt │ ├── Makefile │ ├── bilateral_grid_generator.cpp │ ├── filter.cpp │ └── viz.sh ├── blur │ ├── CMakeLists.txt │ ├── Makefile │ ├── adb_run_on_device.sh │ ├── halide_blur_generator.cpp │ └── test.cpp ├── c_backend │ ├── CMakeLists.txt │ ├── Makefile │ ├── pipeline_cpp_generator.cpp │ ├── pipeline_generator.cpp │ ├── run.cpp │ └── run_cpp.cpp ├── camera_pipe │ ├── CMakeLists.txt │ ├── Makefile │ ├── camera_pipe_generator.cpp │ ├── process.cpp │ └── viz.sh ├── compositing │ ├── CMakeLists.txt │ ├── Makefile │ ├── compositing_generator.cpp │ └── process.cpp ├── conv_layer │ ├── CMakeLists.txt │ ├── Makefile │ ├── conv_layer_generator.cpp │ └── process.cpp ├── cuda_mat_mul │ ├── CMakeLists.txt │ ├── Makefile │ ├── mat_mul_generator.cpp │ └── runner.cpp ├── depthwise_separable_conv │ ├── CMakeLists.txt │ ├── Makefile │ ├── depthwise_separable_conv_generator.cpp │ ├── process.cpp │ └── tf_separable_conv.py ├── fft │ ├── CMakeLists.txt │ ├── Makefile │ ├── complex.h │ ├── fft.cpp │ ├── fft.h │ ├── fft_aot_test.cpp │ ├── fft_generator.cpp │ ├── funct.h │ └── main.cpp ├── hannk │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── benchmark.cpp │ ├── cmake │ │ └── superbuild │ │ │ └── CMakeLists.txt │ ├── compare_vs_tflite.cpp │ ├── configure_cmake.sh │ ├── delegate │ │ ├── CMakeLists.txt │ │ ├── exported_symbols.ldscript │ │ ├── exported_symbols.osx │ │ ├── hannk_delegate.cpp │ │ ├── hannk_delegate.h │ │ ├── hannk_delegate_adaptor.cpp │ │ └── hannk_delegate_provider.cpp │ ├── halide │ │ ├── CMakeLists.txt │ │ ├── common_halide.cpp │ │ ├── common_halide.h │ │ ├── common_halide_test.cpp │ │ ├── constants.h │ │ ├── conv_generator.cpp │ │ ├── copy_generator.cpp │ │ ├── depthwise_conv_generator.cpp │ │ ├── docs │ │ │ └── approx_log2_and_applications.ipynb │ │ ├── elementwise_generator.cpp │ │ ├── fill_generator.cpp │ │ ├── normalizations_generator.cpp │ │ ├── pool_generator.cpp │ │ └── reductions_generator.cpp │ ├── interpreter │ │ ├── CMakeLists.txt │ │ ├── allocation_planner.cpp │ │ ├── allocation_planner.h │ │ ├── elementwise_program.cpp │ │ ├── elementwise_program.h │ │ ├── interpreter.cpp │ │ ├── interpreter.h │ │ ├── interval.cpp │ │ ├── interval.h │ │ ├── lower.cpp │ │ ├── lower.h │ │ ├── model.cpp │ │ ├── model.h │ │ ├── ops.cpp │ │ ├── ops.h │ │ ├── stubs.cpp │ │ ├── tensor.cpp │ │ ├── tensor.h │ │ ├── transforms.cpp │ │ └── transforms.h │ ├── run_benchmark_on_device.sh │ ├── run_benchmark_on_hexagon_sim.sh │ ├── run_compare_on_device.sh │ ├── test │ │ ├── inception_v2_224_quant │ │ │ └── 000.DEPTHWISE_CONV_2D.tflite │ │ ├── inception_v4_299_quant │ │ │ ├── 000.CONV_2D.tflite │ │ │ ├── 001.CONV_2D.tflite │ │ │ ├── 002.CONV_2D.tflite │ │ │ ├── 003.MAX_POOL_2D.tflite │ │ │ ├── 004.CONV_2D.tflite │ │ │ ├── 006.CONV_2D.tflite │ │ │ ├── 008.CONV_2D.tflite │ │ │ ├── 009.CONV_2D.tflite │ │ │ ├── 013.MAX_POOL_2D.tflite │ │ │ ├── 015.CONCATENATION.tflite │ │ │ ├── 016.AVERAGE_POOL_2D.tflite │ │ │ ├── 024.CONCATENATION.tflite │ │ │ ├── 044.CONV_2D.tflite │ │ │ ├── 045.CONV_2D.tflite │ │ │ ├── 049.CONV_2D.tflite │ │ │ ├── 052.MAX_POOL_2D.tflite │ │ │ ├── 054.CONV_2D.tflite │ │ │ ├── 057.CONCATENATION.tflite │ │ │ ├── 069.CONCATENATION.tflite │ │ │ ├── 081.CONCATENATION.tflite │ │ │ ├── 093.CONCATENATION.tflite │ │ │ ├── 105.CONCATENATION.tflite │ │ │ ├── 117.CONCATENATION.tflite │ │ │ ├── 118.AVERAGE_POOL_2D.tflite │ │ │ ├── 129.CONCATENATION.tflite │ │ │ ├── 140.CONV_2D.tflite │ │ │ ├── 141.CONCATENATION.tflite │ │ │ ├── 142.MAX_POOL_2D.tflite │ │ │ ├── 149.CONCATENATION.tflite │ │ │ ├── 178.AVERAGE_POOL_2D.tflite │ │ │ ├── 189.CONCATENATION.tflite │ │ │ ├── 191.CONCATENATION.tflite │ │ │ ├── 192.AVERAGE_POOL_2D.tflite │ │ │ └── 194.SOFTMAX.tflite │ │ ├── misc │ │ │ ├── L2_NORMALIZATION.tflite │ │ │ ├── LOGISTIC.tflite │ │ │ ├── MUL.tflite │ │ │ ├── SPACE_TO_DEPTH.2.tflite │ │ │ ├── SPACE_TO_DEPTH.4.tflite │ │ │ ├── SPLIT.1_1_1.tflite │ │ │ ├── SPLIT_V.36_5_7.tflite │ │ │ ├── TRANSPOSE.2_0_1.tflite │ │ │ ├── bad_broadcast_add.tflite │ │ │ ├── bad_broadcast_mul.tflite │ │ │ ├── bad_broadcast_sub.tflite │ │ │ └── bad_fully_connected.tflite │ │ ├── mobilenet_v1_0.25_128_quant │ │ │ ├── 000.CONV_2D.tflite │ │ │ ├── 001.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 002.CONV_2D.tflite │ │ │ ├── 003.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 004.CONV_2D.tflite │ │ │ ├── 005.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 006.CONV_2D.tflite │ │ │ ├── 007.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 008.CONV_2D.tflite │ │ │ ├── 009.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 010.CONV_2D.tflite │ │ │ ├── 011.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 012.CONV_2D.tflite │ │ │ ├── 013.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 014.CONV_2D.tflite │ │ │ ├── 019.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 022.CONV_2D.tflite │ │ │ ├── 025.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 027.AVERAGE_POOL_2D.tflite │ │ │ ├── 029.RESHAPE.tflite │ │ │ └── 030.SOFTMAX.tflite │ │ ├── mobilenet_v1_1.0_224_quant │ │ │ ├── 000.CONV_2D.tflite │ │ │ ├── 001.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 002.CONV_2D.tflite │ │ │ ├── 003.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 004.CONV_2D.tflite │ │ │ ├── 005.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 006.CONV_2D.tflite │ │ │ ├── 007.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 008.CONV_2D.tflite │ │ │ ├── 009.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 013.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 025.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 027.AVERAGE_POOL_2D.tflite │ │ │ ├── 029.RESHAPE.tflite │ │ │ └── 030.SOFTMAX.tflite │ │ └── mobilenet_v2_1.0_224_quant │ │ │ ├── 000.CONV_2D.tflite │ │ │ ├── 001.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 002.CONV_2D.tflite │ │ │ ├── 003.CONV_2D.tflite │ │ │ ├── 004.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 005.CONV_2D.tflite │ │ │ ├── 008.CONV_2D.tflite │ │ │ ├── 009.ADD.tflite │ │ │ ├── 012.CONV_2D.tflite │ │ │ ├── 015.CONV_2D.tflite │ │ │ ├── 016.ADD.tflite │ │ │ ├── 020.ADD.tflite │ │ │ ├── 021.CONV_2D.tflite │ │ │ ├── 022.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 023.CONV_2D.tflite │ │ │ ├── 027.ADD.tflite │ │ │ ├── 031.ADD.tflite │ │ │ ├── 032.CONV_2D.tflite │ │ │ ├── 033.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 034.CONV_2D.tflite │ │ │ ├── 035.ADD.tflite │ │ │ ├── 038.CONV_2D.tflite │ │ │ ├── 040.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 042.ADD.tflite │ │ │ ├── 045.CONV_2D.tflite │ │ │ ├── 046.ADD.tflite │ │ │ ├── 047.CONV_2D.tflite │ │ │ ├── 049.CONV_2D.tflite │ │ │ ├── 053.ADD.tflite │ │ │ ├── 054.CONV_2D.tflite │ │ │ ├── 056.CONV_2D.tflite │ │ │ ├── 057.ADD.tflite │ │ │ ├── 059.DEPTHWISE_CONV_2D.tflite │ │ │ ├── 062.AVERAGE_POOL_2D.tflite │ │ │ └── 064.RESHAPE.tflite │ ├── tflite │ │ ├── CMakeLists.txt │ │ ├── tflite_parser.cpp │ │ └── tflite_parser.h │ └── util │ │ ├── CMakeLists.txt │ │ ├── buffer_util.h │ │ ├── error_util.cpp │ │ ├── error_util.h │ │ ├── file_util.h │ │ ├── hannk_log.h │ │ ├── hannk_log_stderr.cpp │ │ ├── hannk_log_tflite.cpp │ │ ├── model_runner.cpp │ │ ├── model_runner.h │ │ └── small_vector.h ├── harris │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── harris_generator.cpp ├── hexagon_benchmarks │ ├── CMakeLists.txt │ ├── Makefile │ ├── adb_run_on_device.sh │ ├── conv3x3_generator.cpp │ ├── dilate3x3_generator.cpp │ ├── gaussian5x5_generator.cpp │ ├── median3x3_generator.cpp │ ├── process.cpp │ ├── process.h │ └── sobel_generator.cpp ├── hexagon_dma │ ├── Makefile │ ├── mock_dma_implementation.cpp │ ├── pipeline_raw_linear_interleaved_basic.cpp │ ├── pipeline_yuv_linear_basic.cpp │ ├── process_raw_linear_interleaved_basic.cpp │ └── process_yuv_linear_basic.cpp ├── hist │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── hist_generator.cpp ├── iir_blur │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── iir_blur_generator.cpp ├── images │ ├── bayer_raw.png │ ├── bayer_small.png │ ├── gray.png │ ├── gray_small.pgm │ ├── gray_small.png │ ├── low_res_in.png │ ├── matrix_3200.mat │ ├── matrix_7000.mat │ ├── rgb.png │ ├── rgb_small.png │ ├── rgb_small16.png │ └── rgba.png ├── interpolate │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── interpolate_generator.cpp ├── lens_blur │ ├── CMakeLists.txt │ ├── Makefile │ ├── lens_blur_generator.cpp │ └── process.cpp ├── linear_algebra │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile │ ├── benchmarks │ │ ├── CMakeLists.txt │ │ ├── cblas_benchmarks.cpp │ │ ├── clock.h │ │ ├── eigen_benchmarks.cpp │ │ ├── halide_benchmarks.cpp │ │ └── macros.h │ ├── include │ │ └── cblas.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── blas_l1_generators.cpp │ │ ├── blas_l2_generators.cpp │ │ ├── blas_l3_generators.cpp │ │ ├── halide_blas.cpp │ │ └── halide_blas.h │ └── tests │ │ ├── CMakeLists.txt │ │ └── test_halide_blas.cpp ├── linear_blur │ ├── linear_blur_generator.cpp │ ├── linear_to_srgb_generator.cpp │ ├── run_linear_blur.cpp │ ├── simple_blur_generator.cpp │ └── srgb_to_linear_generator.cpp ├── local_laplacian │ ├── CMakeLists.txt │ ├── Makefile │ ├── local_laplacian_generator.cpp │ ├── process.cpp │ └── viz.sh ├── max_filter │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── max_filter_generator.cpp ├── nl_means │ ├── CMakeLists.txt │ ├── Makefile │ ├── nl_means_generator.cpp │ └── process.cpp ├── onnx │ ├── Makefile │ ├── benchmarking_utils.h │ ├── common_types.h │ ├── denormal_disabler.h │ ├── halide_as_onnx_backend.py │ ├── halide_as_onnx_backend_test.py │ ├── model.cpp │ ├── model.py │ ├── model_test.py │ ├── onnx_converter.cc │ ├── onnx_converter.h │ ├── onnx_converter_generator.cc │ ├── onnx_converter_generator_test.cc │ ├── onnx_converter_test.cc │ └── test_model_proto.txt ├── resize │ ├── CMakeLists.txt │ ├── Makefile │ ├── resize.cpp │ └── resize_generator.cpp ├── resnet_50 │ ├── Makefile │ ├── Resnet50Generator.cpp │ ├── load_weights.py │ ├── process.cpp │ └── validate_resnet50_output.py ├── simd_op_check │ ├── Makefile │ └── driver.cpp ├── stencil_chain │ ├── CMakeLists.txt │ ├── Makefile │ ├── process.cpp │ └── stencil_chain_generator.cpp ├── support │ ├── Makefile.inc │ └── viz_auto.sh ├── unsharp │ ├── CMakeLists.txt │ ├── Makefile │ ├── filter.cpp │ └── unsharp_generator.cpp └── wavelet │ ├── CMakeLists.txt │ ├── Makefile │ ├── README.md │ ├── daubechies_constants.h │ ├── daubechies_x_generator.cpp │ ├── haar_x_generator.cpp │ ├── inverse_daubechies_x_generator.cpp │ ├── inverse_haar_x_generator.cpp │ └── wavelet.cpp ├── cmake ├── BundleStatic.cmake ├── CheckFilesExist.cmake ├── FindHalide_LLVM.cmake ├── FindHalide_WebGPU.cmake ├── FindHexagonSDK.cmake ├── FindNodeJS.cmake ├── FindV8.cmake ├── HalideFeatures.cmake ├── HalideGeneratorHelpers.cmake ├── HalidePackageConfigHelpers.cmake ├── HalideTargetHelpers.cmake ├── HalideTestHelpers.cmake ├── MutexCopy.ps1 ├── TargetExportScript.cmake ├── WipeStandardFlags.cmake ├── dependencies.cmake ├── toolchain.linux-aarch64.cmake ├── toolchain.linux-arm32.cmake ├── toolchain.linux-i386.cmake ├── toolchain.linux-x64-asan.cmake ├── toolchain.linux-x64-fuzzer.cmake └── vcpkg │ ├── llvm │ ├── portfile.cmake │ └── vcpkg.json │ └── python3 │ ├── portfile.cmake │ └── vcpkg.json ├── dependencies ├── README.md ├── spirv │ ├── LICENSE │ ├── include │ │ └── spirv │ │ │ └── unified1 │ │ │ ├── GLSL.std.450.h │ │ │ └── spirv.h │ └── share │ │ └── cmake │ │ └── SPIRV-Headers │ │ ├── SPIRV-HeadersConfig.cmake │ │ ├── SPIRV-HeadersConfigVersion.cmake │ │ └── SPIRV-HeadersTargets.cmake ├── update-spirv.sh ├── update-vulkan.sh └── vulkan │ ├── LICENSE.md │ ├── include │ ├── vk_video │ │ ├── vulkan_video_codec_av1std.h │ │ ├── vulkan_video_codec_av1std_decode.h │ │ ├── vulkan_video_codec_h264std.h │ │ ├── vulkan_video_codec_h264std_decode.h │ │ ├── vulkan_video_codec_h264std_encode.h │ │ ├── vulkan_video_codec_h265std.h │ │ ├── vulkan_video_codec_h265std_decode.h │ │ ├── vulkan_video_codec_h265std_encode.h │ │ └── vulkan_video_codecs_common.h │ └── vulkan │ │ ├── vk_icd.h │ │ ├── vk_layer.h │ │ ├── vk_platform.h │ │ ├── vulkan.h │ │ ├── vulkan_android.h │ │ ├── vulkan_beta.h │ │ ├── vulkan_core.h │ │ ├── vulkan_directfb.h │ │ ├── vulkan_fuchsia.h │ │ ├── vulkan_ggp.h │ │ ├── vulkan_ios.h │ │ ├── vulkan_macos.h │ │ ├── vulkan_metal.h │ │ ├── vulkan_screen.h │ │ ├── vulkan_vi.h │ │ ├── vulkan_wayland.h │ │ ├── vulkan_win32.h │ │ ├── vulkan_xcb.h │ │ ├── vulkan_xlib.h │ │ └── vulkan_xlib_xrandr.h │ └── share │ └── cmake │ └── VulkanHeaders │ ├── VulkanHeadersConfig.cmake │ └── VulkanHeadersConfigVersion.cmake ├── doc ├── BuildingHalideWithCMake.md ├── CMakeLists.txt ├── CodeStyleCMake.md ├── FuzzTesting.md ├── HalideCMakePackage.md ├── Hexagon.md ├── Python.md ├── RunGen.md ├── Testing.md ├── Vulkan.md ├── WebAssembly.md └── WebGPU.md ├── packaging ├── CMakeLists.txt ├── common │ ├── Description.txt │ ├── HalideConfig.cmake │ ├── HalideHelpersConfig.cmake │ └── Welcome.txt ├── pip │ ├── CMakeLists.txt │ ├── README.md │ └── TrampolineConfig.cmake.in ├── tgz │ ├── config.cmake │ └── package.sh └── zip │ └── package.bat ├── pyproject.toml ├── python_bindings ├── CMakeLists.txt ├── apps │ ├── CMakeLists.txt │ ├── bilateral_grid_app.py │ ├── bilateral_grid_generator.py │ ├── blur_app.py │ ├── blur_generator.py │ ├── interpolate_app.py │ ├── interpolate_generator.py │ ├── local_laplacian_app.py │ └── local_laplacian_generator.py ├── cmake │ └── AddPythonTest.cmake ├── packaging │ ├── CMakeLists.txt │ └── Halide_PythonConfig.cmake.in ├── src │ ├── CMakeLists.txt │ └── halide │ │ ├── CMakeLists.txt │ │ ├── __init__.py │ │ ├── _generator_helpers.py │ │ ├── halide_ │ │ ├── PyArgument.cpp │ │ ├── PyArgument.h │ │ ├── PyBinaryOperators.h │ │ ├── PyBoundaryConditions.cpp │ │ ├── PyBoundaryConditions.h │ │ ├── PyBuffer.cpp │ │ ├── PyBuffer.h │ │ ├── PyCallable.cpp │ │ ├── PyCallable.h │ │ ├── PyConciseCasts.cpp │ │ ├── PyConciseCasts.h │ │ ├── PyDerivative.cpp │ │ ├── PyDerivative.h │ │ ├── PyEnums.cpp │ │ ├── PyEnums.h │ │ ├── PyError.cpp │ │ ├── PyError.h │ │ ├── PyExpr.cpp │ │ ├── PyExpr.h │ │ ├── PyExternFuncArgument.cpp │ │ ├── PyExternFuncArgument.h │ │ ├── PyFunc.cpp │ │ ├── PyFunc.h │ │ ├── PyFuncRef.cpp │ │ ├── PyFuncRef.h │ │ ├── PyGenerator.cpp │ │ ├── PyGenerator.h │ │ ├── PyHalide.cpp │ │ ├── PyHalide.h │ │ ├── PyIROperator.cpp │ │ ├── PyIROperator.h │ │ ├── PyImageParam.cpp │ │ ├── PyImageParam.h │ │ ├── PyInlineReductions.cpp │ │ ├── PyInlineReductions.h │ │ ├── PyLambda.cpp │ │ ├── PyLambda.h │ │ ├── PyLoopLevel.cpp │ │ ├── PyLoopLevel.h │ │ ├── PyModule.cpp │ │ ├── PyModule.h │ │ ├── PyParam.cpp │ │ ├── PyParam.h │ │ ├── PyParameter.cpp │ │ ├── PyParameter.h │ │ ├── PyPipeline.cpp │ │ ├── PyPipeline.h │ │ ├── PyRDom.cpp │ │ ├── PyRDom.h │ │ ├── PyScheduleMethods.h │ │ ├── PyStage.cpp │ │ ├── PyStage.h │ │ ├── PyTarget.cpp │ │ ├── PyTarget.h │ │ ├── PyTuple.cpp │ │ ├── PyTuple.h │ │ ├── PyType.cpp │ │ ├── PyType.h │ │ ├── PyVar.cpp │ │ ├── PyVar.h │ │ ├── PyVarOrRVar.cpp │ │ └── PyVarOrRVar.h │ │ └── imageio.py ├── stub │ ├── CMakeLists.txt │ └── PyStubImpl.cpp ├── test │ ├── CMakeLists.txt │ ├── correctness │ │ ├── CMakeLists.txt │ │ ├── addconstant_test.py │ │ ├── atomics.py │ │ ├── autodiff.py │ │ ├── basics.py │ │ ├── bit_test.py │ │ ├── boundary_conditions.py │ │ ├── buffer.py │ │ ├── callable.py │ │ ├── compile_to.py │ │ ├── division.py │ │ ├── extern.py │ │ ├── float_precision_test.py │ │ ├── iroperator.py │ │ ├── multi_method_module_test.py │ │ ├── multipass_constraints.py │ │ ├── negate_test.py │ │ ├── pystub.py │ │ ├── rdom.py │ │ ├── realize_warnings.py │ │ ├── target.py │ │ ├── the_sort_function.c │ │ ├── tuple_select.py │ │ ├── type.py │ │ ├── user_context_test.py │ │ └── var.py │ └── generators │ │ ├── CMakeLists.txt │ │ ├── addconstantcpp_generator.cpp │ │ ├── addconstantpy_generator.py │ │ ├── bitcpp_generator.cpp │ │ ├── bitpy_generator.py │ │ ├── complexcpp_generator.cpp │ │ ├── complexpy_generator.py │ │ ├── simplecpp_generator.cpp │ │ ├── simplepy_generator.py │ │ └── user_context_generator.cpp └── tutorial │ ├── CMakeLists.txt │ ├── lesson_01_basics.py │ ├── lesson_02_input_image.py │ ├── lesson_03_debugging_1.py │ ├── lesson_04_debugging_2.py │ ├── lesson_05_scheduling_1.py │ ├── lesson_06_realizing_over_shifted_domains.py │ ├── lesson_07_multi_stage_pipelines.py │ ├── lesson_08_scheduling_2.py │ ├── lesson_09_update_definitions.py │ ├── lesson_10_aot_compilation_generate.py │ ├── lesson_10_aot_compilation_run.py │ ├── lesson_11_cross_compilation.py │ ├── lesson_12_using_the_gpu.py │ ├── lesson_13_tuples.py │ └── lesson_14_types.py ├── requirements.txt ├── run-clang-format.sh ├── run-clang-tidy.sh ├── src ├── AbstractGenerator.cpp ├── AbstractGenerator.h ├── AddAtomicMutex.cpp ├── AddAtomicMutex.h ├── AddImageChecks.cpp ├── AddImageChecks.h ├── AddParameterChecks.cpp ├── AddParameterChecks.h ├── AddSplitFactorChecks.cpp ├── AddSplitFactorChecks.h ├── AlignLoads.cpp ├── AlignLoads.h ├── AllocationBoundsInference.cpp ├── AllocationBoundsInference.h ├── ApplySplit.cpp ├── ApplySplit.h ├── Argument.cpp ├── Argument.h ├── AssociativeOpsTable.cpp ├── AssociativeOpsTable.h ├── Associativity.cpp ├── Associativity.h ├── AsyncProducers.cpp ├── AsyncProducers.h ├── AutoScheduleUtils.cpp ├── AutoScheduleUtils.h ├── BoundConstantExtentLoops.cpp ├── BoundConstantExtentLoops.h ├── BoundSmallAllocations.cpp ├── BoundSmallAllocations.h ├── BoundaryConditions.cpp ├── BoundaryConditions.h ├── Bounds.cpp ├── Bounds.h ├── BoundsInference.cpp ├── BoundsInference.h ├── Buffer.cpp ├── Buffer.h ├── CMakeLists.txt ├── CPlusPlusMangle.cpp ├── CPlusPlusMangle.h ├── CSE.cpp ├── CSE.h ├── Callable.cpp ├── Callable.h ├── CanonicalizeGPUVars.cpp ├── CanonicalizeGPUVars.h ├── ClampUnsafeAccesses.cpp ├── ClampUnsafeAccesses.h ├── Closure.cpp ├── Closure.h ├── CodeGen_ARM.cpp ├── CodeGen_C.cpp ├── CodeGen_C.h ├── CodeGen_C_prologue.template.cpp ├── CodeGen_C_vectors.template.cpp ├── CodeGen_D3D12Compute_Dev.cpp ├── CodeGen_D3D12Compute_Dev.h ├── CodeGen_GPU_Dev.cpp ├── CodeGen_GPU_Dev.h ├── CodeGen_Hexagon.cpp ├── CodeGen_Internal.cpp ├── CodeGen_Internal.h ├── CodeGen_LLVM.cpp ├── CodeGen_LLVM.h ├── CodeGen_Metal_Dev.cpp ├── CodeGen_Metal_Dev.h ├── CodeGen_OpenCL_Dev.cpp ├── CodeGen_OpenCL_Dev.h ├── CodeGen_PTX_Dev.cpp ├── CodeGen_PTX_Dev.h ├── CodeGen_Posix.cpp ├── CodeGen_Posix.h ├── CodeGen_PowerPC.cpp ├── CodeGen_PyTorch.cpp ├── CodeGen_PyTorch.h ├── CodeGen_RISCV.cpp ├── CodeGen_Targets.h ├── CodeGen_Vulkan_Dev.cpp ├── CodeGen_Vulkan_Dev.h ├── CodeGen_WebAssembly.cpp ├── CodeGen_WebGPU_Dev.cpp ├── CodeGen_WebGPU_Dev.h ├── CodeGen_X86.cpp ├── CompilerLogger.cpp ├── CompilerLogger.h ├── ConciseCasts.h ├── ConstantBounds.cpp ├── ConstantBounds.h ├── ConstantInterval.cpp ├── ConstantInterval.h ├── Debug.cpp ├── Debug.h ├── DebugArguments.cpp ├── DebugArguments.h ├── DebugToFile.cpp ├── DebugToFile.h ├── Definition.cpp ├── Definition.h ├── Deinterleave.cpp ├── Deinterleave.h ├── Derivative.cpp ├── Derivative.h ├── DerivativeUtils.cpp ├── DerivativeUtils.h ├── Deserialization.cpp ├── Deserialization.h ├── DeviceAPI.h ├── DeviceArgument.cpp ├── DeviceArgument.h ├── DeviceInterface.cpp ├── DeviceInterface.h ├── Dimension.cpp ├── Dimension.h ├── DistributeShifts.cpp ├── DistributeShifts.h ├── EarlyFree.cpp ├── EarlyFree.h ├── Elf.cpp ├── Elf.h ├── EliminateBoolVectors.cpp ├── EliminateBoolVectors.h ├── EmulateFloat16Math.cpp ├── EmulateFloat16Math.h ├── Error.cpp ├── Error.h ├── Expr.cpp ├── Expr.h ├── ExprUsesVar.h ├── Extern.h ├── ExternFuncArgument.h ├── ExtractTileOperations.cpp ├── ExtractTileOperations.h ├── FastIntegerDivide.cpp ├── FastIntegerDivide.h ├── FindCalls.cpp ├── FindCalls.h ├── FindIntrinsics.cpp ├── FindIntrinsics.h ├── FlattenNestedRamps.cpp ├── FlattenNestedRamps.h ├── Float16.cpp ├── Float16.h ├── Func.cpp ├── Func.h ├── Function.cpp ├── Function.h ├── FunctionPtr.h ├── FuseGPUThreadLoops.cpp ├── FuseGPUThreadLoops.h ├── FuzzFloatStores.cpp ├── FuzzFloatStores.h ├── Generator.cpp ├── Generator.h ├── HexagonAlignment.h ├── HexagonOffload.cpp ├── HexagonOffload.h ├── HexagonOptimize.cpp ├── HexagonOptimize.h ├── IR.cpp ├── IR.h ├── IREquality.cpp ├── IREquality.h ├── IRMatch.cpp ├── IRMatch.h ├── IRMutator.cpp ├── IRMutator.h ├── IROperator.cpp ├── IROperator.h ├── IRPrinter.cpp ├── IRPrinter.h ├── IRVisitor.cpp ├── IRVisitor.h ├── ImageParam.cpp ├── ImageParam.h ├── InferArguments.cpp ├── InferArguments.h ├── InjectHostDevBufferCopies.cpp ├── InjectHostDevBufferCopies.h ├── Inline.cpp ├── Inline.h ├── InlineReductions.cpp ├── InlineReductions.h ├── IntegerDivisionTable.cpp ├── IntegerDivisionTable.h ├── Interval.cpp ├── Interval.h ├── IntrusivePtr.h ├── JITModule.cpp ├── JITModule.h ├── LICM.cpp ├── LICM.h ├── LLVM_Headers.h ├── LLVM_Output.cpp ├── LLVM_Output.h ├── LLVM_Runtime_Linker.cpp ├── LLVM_Runtime_Linker.h ├── Lambda.cpp ├── Lambda.h ├── Lerp.cpp ├── Lerp.h ├── LoopCarry.cpp ├── LoopCarry.h ├── LoopPartitioningDirective.h ├── Lower.cpp ├── Lower.h ├── LowerParallelTasks.cpp ├── LowerParallelTasks.h ├── LowerWarpShuffles.cpp ├── LowerWarpShuffles.h ├── MainPage.h ├── Memoization.cpp ├── Memoization.h ├── Module.cpp ├── Module.h ├── ModulusRemainder.cpp ├── ModulusRemainder.h ├── Monotonic.cpp ├── Monotonic.h ├── ObjectInstanceRegistry.cpp ├── ObjectInstanceRegistry.h ├── OffloadGPULoops.cpp ├── OffloadGPULoops.h ├── OptimizeShuffles.cpp ├── OptimizeShuffles.h ├── OutputImageParam.cpp ├── OutputImageParam.h ├── ParallelRVar.cpp ├── ParallelRVar.h ├── Param.h ├── Parameter.cpp ├── Parameter.h ├── PartitionLoops.cpp ├── PartitionLoops.h ├── Pipeline.cpp ├── Pipeline.h ├── Prefetch.cpp ├── Prefetch.h ├── PrefetchDirective.h ├── PrintLoopNest.cpp ├── PrintLoopNest.h ├── Profiling.cpp ├── Profiling.h ├── PurifyIndexMath.cpp ├── PurifyIndexMath.h ├── PythonExtensionGen.cpp ├── PythonExtensionGen.h ├── Qualify.cpp ├── Qualify.h ├── RDom.cpp ├── RDom.h ├── Random.cpp ├── Random.h ├── Realization.cpp ├── Realization.h ├── RealizationOrder.cpp ├── RealizationOrder.h ├── RebaseLoopsToZero.cpp ├── RebaseLoopsToZero.h ├── Reduction.cpp ├── Reduction.h ├── RegionCosts.cpp ├── RegionCosts.h ├── RemoveDeadAllocations.cpp ├── RemoveDeadAllocations.h ├── RemoveExternLoops.cpp ├── RemoveExternLoops.h ├── RemoveUndef.cpp ├── RemoveUndef.h ├── Schedule.cpp ├── Schedule.h ├── ScheduleFunctions.cpp ├── ScheduleFunctions.h ├── Scope.h ├── SelectGPUAPI.cpp ├── SelectGPUAPI.h ├── Serialization.cpp ├── Serialization.h ├── Simplify.cpp ├── Simplify.h ├── SimplifyCorrelatedDifferences.cpp ├── SimplifyCorrelatedDifferences.h ├── SimplifySpecializations.cpp ├── SimplifySpecializations.h ├── Simplify_Add.cpp ├── Simplify_And.cpp ├── Simplify_Call.cpp ├── Simplify_Cast.cpp ├── Simplify_Div.cpp ├── Simplify_EQ.cpp ├── Simplify_Exprs.cpp ├── Simplify_Internal.h ├── Simplify_LT.cpp ├── Simplify_Let.cpp ├── Simplify_Max.cpp ├── Simplify_Min.cpp ├── Simplify_Mod.cpp ├── Simplify_Mul.cpp ├── Simplify_Not.cpp ├── Simplify_Or.cpp ├── Simplify_Reinterpret.cpp ├── Simplify_Select.cpp ├── Simplify_Shuffle.cpp ├── Simplify_Stmts.cpp ├── Simplify_Sub.cpp ├── SkipStages.cpp ├── SkipStages.h ├── SlidingWindow.cpp ├── SlidingWindow.h ├── Solve.cpp ├── Solve.h ├── SpirvIR.cpp ├── SpirvIR.h ├── SplitTuples.cpp ├── SplitTuples.h ├── StageStridedLoads.cpp ├── StageStridedLoads.h ├── StmtToHTML.cpp ├── StmtToHTML.h ├── StorageFlattening.cpp ├── StorageFlattening.h ├── StorageFolding.cpp ├── StorageFolding.h ├── StrictifyFloat.cpp ├── StrictifyFloat.h ├── StripAsserts.cpp ├── StripAsserts.h ├── Substitute.cpp ├── Substitute.h ├── Target.cpp ├── Target.h ├── TargetQueryOps.cpp ├── TargetQueryOps.h ├── Tracing.cpp ├── Tracing.h ├── TrimNoOps.cpp ├── TrimNoOps.h ├── Tuple.cpp ├── Tuple.h ├── Type.cpp ├── Type.h ├── UnifyDuplicateLets.cpp ├── UnifyDuplicateLets.h ├── UniquifyVariableNames.cpp ├── UniquifyVariableNames.h ├── UnpackBuffers.cpp ├── UnpackBuffers.h ├── UnrollLoops.cpp ├── UnrollLoops.h ├── UnsafePromises.cpp ├── UnsafePromises.h ├── Util.cpp ├── Util.h ├── Var.cpp ├── Var.h ├── VectorizeLoops.cpp ├── VectorizeLoops.h ├── WasmExecutor.cpp ├── WasmExecutor.h ├── WrapCalls.cpp ├── WrapCalls.h ├── autoschedulers │ ├── CMakeLists.txt │ ├── adams2019 │ │ ├── AutoSchedule.cpp │ │ ├── AutoSchedule.h │ │ ├── CMakeLists.txt │ │ ├── Cache.cpp │ │ ├── Cache.h │ │ ├── CostModel.h │ │ ├── DefaultCostModel.cpp │ │ ├── DefaultCostModel.h │ │ ├── Featurization.h │ │ ├── FunctionDAG.cpp │ │ ├── FunctionDAG.h │ │ ├── LoopNest.cpp │ │ ├── LoopNest.h │ │ ├── Makefile │ │ ├── NetworkSize.h │ │ ├── State.cpp │ │ ├── State.h │ │ ├── Timer.h │ │ ├── Weights.cpp │ │ ├── Weights.h │ │ ├── adams2019_autotune_loop.sh │ │ ├── baseline.weights │ │ ├── cost_model_generator.cpp │ │ ├── cost_model_schedule.h │ │ ├── retrain_cost_model.cpp │ │ ├── test_function_dag.cpp │ │ └── weightsdir_to_weightsfile.cpp │ ├── anderson2021 │ │ ├── AutoSchedule.cpp │ │ ├── AutoSchedule.h │ │ ├── CMakeLists.txt │ │ ├── CostModel.h │ │ ├── DefaultCostModel.cpp │ │ ├── DefaultCostModel.h │ │ ├── Featurization.h │ │ ├── FunctionDAG.cpp │ │ ├── FunctionDAG.h │ │ ├── GPULoopInfo.cpp │ │ ├── GPULoopInfo.h │ │ ├── GPUMemInfo.h │ │ ├── LoopNest.cpp │ │ ├── LoopNest.h │ │ ├── LoopNestParser.h │ │ ├── Makefile │ │ ├── NetworkSize.h │ │ ├── SearchSpace.cpp │ │ ├── SearchSpace.h │ │ ├── SearchSpaceOptions.h │ │ ├── State.cpp │ │ ├── State.h │ │ ├── Statistics.h │ │ ├── ThreadInfo.h │ │ ├── Tiling.cpp │ │ ├── Tiling.h │ │ ├── Weights.cpp │ │ ├── Weights.h │ │ ├── anderson2021_autotune_loop.sh │ │ ├── baseline.weights │ │ ├── check_weights.cpp │ │ ├── cost_model_generator.cpp │ │ ├── cost_model_schedule.h │ │ ├── generate_data.sh │ │ ├── retrain_cost_model.cpp │ │ ├── scripts │ │ │ ├── average_times.sh │ │ │ ├── predict_all.sh │ │ │ └── utils.sh │ │ ├── test │ │ │ ├── bounds.cpp │ │ │ ├── parser.cpp │ │ │ ├── state.cpp │ │ │ ├── storage_strides.cpp │ │ │ ├── test.h │ │ │ ├── thread_info.cpp │ │ │ └── tiling.cpp │ │ ├── test_function_dag.cpp │ │ ├── weights │ │ │ ├── README.md │ │ │ ├── bgu.weights │ │ │ ├── bilateral_grid.weights │ │ │ ├── camera_pipe.weights │ │ │ ├── conv_layer.weights │ │ │ ├── cuda_mat_mul.weights │ │ │ ├── depthwise_separable_conv.weights │ │ │ ├── gpu.weights │ │ │ ├── harris.weights │ │ │ ├── hist.weights │ │ │ ├── iir_blur.weights │ │ │ ├── interpolate.weights │ │ │ ├── lens_blur.weights │ │ │ ├── local_laplacian.weights │ │ │ ├── max_filter.weights │ │ │ ├── nl_means.weights │ │ │ ├── stencil_chain.weights │ │ │ └── unsharp.weights │ │ └── weightsdir_to_weightsfile.cpp │ ├── common │ │ ├── ASLog.cpp │ │ ├── ASLog.h │ │ ├── CMakeLists.txt │ │ ├── Errors.h │ │ ├── HalidePlugin.h │ │ ├── Makefile │ │ ├── ParamParser.h │ │ ├── PerfectHashMap.h │ │ ├── cmdline.h │ │ ├── featurization_to_sample.cpp │ │ ├── get_host_target.cpp │ │ └── test_perfect_hash_map.cpp │ ├── li2018 │ │ ├── CMakeLists.txt │ │ ├── GradientAutoscheduler.cpp │ │ ├── Makefile │ │ └── README.md │ └── mullapudi2016 │ │ ├── AutoSchedule.cpp │ │ ├── CMakeLists.txt │ │ └── Makefile ├── exported_symbols.ldscript ├── exported_symbols.osx ├── halide_ir.fbs ├── irvisualizer │ ├── generate_palettes.py │ ├── html_template_StmtToHTML.css │ ├── html_template_StmtToHTML.js │ └── html_template_StmtToHTML_dependencies.html └── runtime │ ├── .clang-tidy │ ├── CMakeLists.txt │ ├── HalideBuffer.h │ ├── HalidePyTorchCudaHelpers.h │ ├── HalidePyTorchHelpers.h │ ├── HalideRuntime.h │ ├── HalideRuntimeCuda.h │ ├── HalideRuntimeD3D12Compute.h │ ├── HalideRuntimeHexagonDma.h │ ├── HalideRuntimeHexagonHost.h │ ├── HalideRuntimeMetal.h │ ├── HalideRuntimeOpenCL.h │ ├── HalideRuntimeQurt.h │ ├── HalideRuntimeVulkan.h │ ├── HalideRuntimeWebGPU.h │ ├── aarch64.ll │ ├── aarch64_cpu_features.cpp │ ├── alignment_128.cpp │ ├── alignment_32.cpp │ ├── alignment_64.cpp │ ├── allocation_cache.cpp │ ├── android_clock.cpp │ ├── android_host_cpu_count.cpp │ ├── android_io.cpp │ ├── android_ioctl.h │ ├── arm.ll │ ├── arm_cpu_features.cpp │ ├── arm_no_neon.ll │ ├── cache.cpp │ ├── can_use_target.cpp │ ├── cl_functions.h │ ├── constants.h │ ├── cpu_features.h │ ├── cuda.cpp │ ├── cuda_functions.h │ ├── d3d12compute.cpp │ ├── destructors.cpp │ ├── device_buffer_utils.h │ ├── device_interface.cpp │ ├── device_interface.h │ ├── errors.cpp │ ├── fake_get_symbol.cpp │ ├── fake_thread_pool.cpp │ ├── float16_t.cpp │ ├── fopen.cpp │ ├── fopen_lfs.cpp │ ├── force_include_types.cpp │ ├── fuchsia_clock.cpp │ ├── fuchsia_host_cpu_count.cpp │ ├── fuchsia_yield.cpp │ ├── gpu_context_common.h │ ├── gpu_device_selection.cpp │ ├── halide_buffer_t.cpp │ ├── hashmap.h │ ├── hexagon_cache_allocator.cpp │ ├── hexagon_cpu_features.cpp │ ├── hexagon_dma.cpp │ ├── hexagon_dma_pool.cpp │ ├── hexagon_dma_pool.h │ ├── hexagon_host.cpp │ ├── hexagon_remote │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Makefile │ ├── android │ │ ├── CMakeLists.txt │ │ ├── host_malloc.cpp │ │ ├── host_shim.cpp │ │ └── libadsprpc_shim.cpp │ ├── bin │ │ ├── arm-32-android │ │ │ └── libhalide_hexagon_host.so │ │ ├── arm-64-android │ │ │ └── libhalide_hexagon_host.so │ │ ├── host │ │ │ └── libhalide_hexagon_host.so │ │ ├── src │ │ │ ├── halide_hexagon_remote.h │ │ │ ├── halide_hexagon_remote_skel.c │ │ │ └── halide_hexagon_remote_stub.c │ │ └── v65 │ │ │ ├── hexagon_sim_remote │ │ │ ├── libhalide_hexagon_remote_skel.so │ │ │ └── libsim_qurt.a │ ├── halide_hexagon_remote.idl │ ├── instruction_encodings.txt │ ├── qurt │ │ ├── CMakeLists.txt │ │ ├── c11_stubs.cpp │ │ ├── halide_remote.cpp │ │ ├── known_symbols.cpp │ │ ├── known_symbols.h │ │ ├── log.cpp │ │ ├── log.h │ │ ├── nearbyint.cpp │ │ ├── sim_qurt.cpp │ │ ├── sim_qurt_vtcm.cpp │ │ └── sim_remote.cpp │ ├── sim_host.cpp │ └── sim_protocol.h │ ├── hvx_128.ll │ ├── internal │ ├── block_allocator.h │ ├── block_storage.h │ ├── linked_list.h │ ├── memory_arena.h │ ├── memory_resources.h │ ├── pointer_table.h │ ├── region_allocator.h │ ├── string_storage.h │ └── string_table.h │ ├── ios_io.cpp │ ├── linux_aarch64_cpu_features.cpp │ ├── linux_arm_cpu_features.cpp │ ├── linux_clock.cpp │ ├── linux_host_cpu_count.cpp │ ├── linux_yield.cpp │ ├── metal.cpp │ ├── metal_objc_arm.cpp │ ├── metal_objc_platform_dependent.cpp │ ├── metal_objc_platform_dependent.h │ ├── metal_objc_x86.cpp │ ├── mini_cl.h │ ├── mini_cuda.h │ ├── mini_d3d12.h │ ├── mini_hexagon_dma.h │ ├── mini_qurt.h │ ├── mini_qurt_vtcm.h │ ├── mini_webgpu.h │ ├── module_aot_ref_count.cpp │ ├── module_jit_ref_count.cpp │ ├── msan.cpp │ ├── msan_stubs.cpp │ ├── nvidia_libdevice_bitcode │ ├── libdevice.compute_20.10.bc │ ├── libdevice.compute_30.10.bc │ └── libdevice.compute_35.10.bc │ ├── objc_support.h │ ├── opencl.cpp │ ├── osx_aarch64_cpu_features.cpp │ ├── osx_arm_cpu_features.cpp │ ├── osx_clock.cpp │ ├── osx_get_symbol.cpp │ ├── osx_host_cpu_count.cpp │ ├── osx_yield.cpp │ ├── posix_aligned_alloc.cpp │ ├── posix_allocator.cpp │ ├── posix_clock.cpp │ ├── posix_error_handler.cpp │ ├── posix_get_symbol.cpp │ ├── posix_io.cpp │ ├── posix_math.ll │ ├── posix_print.cpp │ ├── posix_threads.cpp │ ├── posix_threads_tsan.cpp │ ├── posix_timer_profiler.cpp │ ├── posix_timeval.h │ ├── powerpc.ll │ ├── powerpc_cpu_features.cpp │ ├── prefetch.cpp │ ├── printer.h │ ├── profiler.cpp │ ├── profiler_common.cpp │ ├── profiler_inlined.cpp │ ├── pseudostack.cpp │ ├── ptx_dev.ll │ ├── qurt_allocator.cpp │ ├── qurt_hvx.cpp │ ├── qurt_hvx_vtcm.cpp │ ├── qurt_threads.cpp │ ├── qurt_threads_tsan.cpp │ ├── qurt_yield.cpp │ ├── riscv_cpu_features.cpp │ ├── runtime_api.cpp │ ├── runtime_atomics.h │ ├── runtime_internal.h │ ├── scoped_mutex_lock.h │ ├── scoped_spin_lock.h │ ├── synchronization_common.h │ ├── thread_pool_common.h │ ├── timer_profiler.cpp │ ├── to_string.cpp │ ├── trace_helper.cpp │ ├── tracing.cpp │ ├── vulkan.cpp │ ├── vulkan_context.h │ ├── vulkan_extensions.h │ ├── vulkan_functions.h │ ├── vulkan_interface.h │ ├── vulkan_internal.h │ ├── vulkan_memory.h │ ├── vulkan_resources.h │ ├── wasm_cpu_features.cpp │ ├── wasm_math.ll │ ├── webgpu.cpp │ ├── webgpu_dawn.cpp │ ├── webgpu_emscripten.cpp │ ├── win32_math.ll │ ├── windows_aarch64_cpu_features_arm.cpp │ ├── windows_clock.cpp │ ├── windows_cuda.cpp │ ├── windows_d3d12compute_arm.cpp │ ├── windows_d3d12compute_x86.cpp │ ├── windows_get_symbol.cpp │ ├── windows_io.cpp │ ├── windows_opencl.cpp │ ├── windows_profiler.cpp │ ├── windows_threads.cpp │ ├── windows_threads_tsan.cpp │ ├── windows_vulkan.cpp │ ├── windows_yield.cpp │ ├── write_debug_image.cpp │ ├── x86.ll │ ├── x86_amx.ll │ ├── x86_avx.ll │ ├── x86_avx2.ll │ ├── x86_avx512.ll │ ├── x86_cpu_features.cpp │ └── x86_sse41.ll ├── test ├── CMakeLists.txt ├── autoschedulers │ ├── CMakeLists.txt │ ├── adams2019 │ │ ├── CMakeLists.txt │ │ ├── demo_generator.cpp │ │ ├── included_schedule_file.schedule.h │ │ ├── included_schedule_file_generator.cpp │ │ └── test.cpp │ ├── anderson2021 │ │ ├── CMakeLists.txt │ │ ├── demo_generator.cpp │ │ ├── included_schedule_file.schedule.h │ │ ├── included_schedule_file_generator.cpp │ │ └── test.cpp │ ├── li2018 │ │ ├── CMakeLists.txt │ │ ├── demo_generator.cpp │ │ ├── test.cpp │ │ └── test.py │ └── mullapudi2016 │ │ ├── CMakeLists.txt │ │ ├── cost_function.cpp │ │ ├── data_dependent.cpp │ │ ├── extern.cpp │ │ ├── fibonacci.cpp │ │ ├── histogram.cpp │ │ ├── large_window.cpp │ │ ├── mat_mul.cpp │ │ ├── max_filter.cpp │ │ ├── multi_output.cpp │ │ ├── overlap.cpp │ │ ├── param.cpp │ │ ├── reorder.cpp │ │ ├── small_pure_update.cpp │ │ ├── tile_vs_inline.cpp │ │ ├── unused_func.cpp │ │ └── vectorize_var_in_update.cpp ├── common │ ├── check_call_graphs.h │ ├── expect_abort.cpp │ ├── expect_failure.sh │ ├── gpu_context.h │ ├── gpu_object_lifetime_tracker.h │ ├── halide_test_dirs.h │ ├── terminate_handler.cpp │ └── test_sharding.h ├── correctness │ ├── CMakeLists.txt │ ├── align_bounds.cpp │ ├── argmax.cpp │ ├── assertion_failure_in_parallel_for.cpp │ ├── async.cpp │ ├── async_copy_chain.cpp │ ├── async_device_copy.cpp │ ├── async_order.cpp │ ├── atomic_tuples.cpp │ ├── atomics.cpp │ ├── autodiff.cpp │ ├── bad_likely.cpp │ ├── bit_counting.cpp │ ├── bitwise_ops.cpp │ ├── bool_compute_root_vectorize.cpp │ ├── bool_predicate_cast.cpp │ ├── bound.cpp │ ├── bound_small_allocations.cpp │ ├── bound_storage.cpp │ ├── boundary_conditions.cpp │ ├── bounds.cpp │ ├── bounds_inference.cpp │ ├── bounds_inference_chunk.cpp │ ├── bounds_inference_complex.cpp │ ├── bounds_inference_outer_split.cpp │ ├── bounds_of_abs.cpp │ ├── bounds_of_cast.cpp │ ├── bounds_of_func.cpp │ ├── bounds_of_monotonic_math.cpp │ ├── bounds_of_multiply.cpp │ ├── bounds_of_split.cpp │ ├── bounds_query.cpp │ ├── bounds_query_respects_specialize_fail.cpp │ ├── buffer_t.cpp │ ├── c_function.cpp │ ├── callable.cpp │ ├── callable_errors.cpp │ ├── callable_generator.cpp │ ├── callable_typed.cpp │ ├── cascaded_filters.cpp │ ├── cast.cpp │ ├── cast_handle.cpp │ ├── chunk.cpp │ ├── chunk_sharing.cpp │ ├── circular_reference_leak.cpp │ ├── code_explosion.cpp │ ├── compare_vars.cpp │ ├── compile_to.cpp │ ├── compile_to_bitcode.cpp │ ├── compile_to_lowered_stmt.cpp │ ├── compile_to_multitarget.cpp │ ├── compute_at_reordered_update_stage.cpp │ ├── compute_at_split_rvar.cpp │ ├── compute_inside_guard.cpp │ ├── compute_outermost.cpp │ ├── compute_with.cpp │ ├── compute_with_in.cpp │ ├── compute_with_inlined.cpp │ ├── computed_index.cpp │ ├── concat.cpp │ ├── constant_expr.cpp │ ├── constant_interval.cpp │ ├── constant_type.cpp │ ├── constraints.cpp │ ├── convolution.cpp │ ├── convolution_multiple_kernels.cpp │ ├── cross_compilation.cpp │ ├── cse_name_collision.cpp │ ├── cse_nan.cpp │ ├── cuda_8_bit_dot_product.cpp │ ├── custom_allocator.cpp │ ├── custom_auto_scheduler.cpp │ ├── custom_cuda_context.cpp │ ├── custom_error_reporter.cpp │ ├── custom_jit_context.cpp │ ├── custom_lowering_pass.cpp │ ├── dead_realization_in_specialization.cpp │ ├── debug_to_file.cpp │ ├── debug_to_file_multiple_outputs.cpp │ ├── debug_to_file_reorder.cpp │ ├── deferred_loop_level.cpp │ ├── deinterleave4.cpp │ ├── device_buffer_copies_with_profile.cpp │ ├── device_buffer_copy.cpp │ ├── device_copy_at_inner_loop.cpp │ ├── device_crop.cpp │ ├── device_slice.cpp │ ├── dilate3x3.cpp │ ├── div_by_zero.cpp │ ├── div_round_to_zero.cpp │ ├── dynamic_allocation_in_gpu_kernel.cpp │ ├── dynamic_reduction_bounds.cpp │ ├── early_out.cpp │ ├── embed_bitcode.cpp │ ├── erf.cpp │ ├── exception.cpp │ ├── explicit_inline_reductions.cpp │ ├── extern_bounds_inference.cpp │ ├── extern_consumer.cpp │ ├── extern_consumer_tiled.cpp │ ├── extern_error.cpp │ ├── extern_output_expansion.cpp │ ├── extern_partial.cpp │ ├── extern_producer.cpp │ ├── extern_reorder_storage.cpp │ ├── extern_sort.cpp │ ├── extern_stage.cpp │ ├── extern_stage_on_device.cpp │ ├── extract_concat_bits.cpp │ ├── failed_unroll.cpp │ ├── fast_trigonometric.cpp │ ├── fibonacci.cpp │ ├── fit_function.cpp │ ├── float16_t.cpp │ ├── float16_t_comparison.cpp │ ├── float16_t_constants.cpp │ ├── float16_t_image_type.cpp │ ├── float16_t_neon_op_check.cpp │ ├── for_each_element.cpp │ ├── force_onto_stack.cpp │ ├── func_clone.cpp │ ├── func_lifetime.cpp │ ├── func_lifetime_2.cpp │ ├── func_wrapper.cpp │ ├── fuse.cpp │ ├── fuse_gpu_threads.cpp │ ├── fused_where_inner_extent_is_zero.cpp │ ├── fuzz_float_stores.cpp │ ├── fuzz_schedule.cpp │ ├── fuzz_simplify.cpp │ ├── gameoflife.cpp │ ├── gather.cpp │ ├── gpu_alloc_group_profiling.cpp │ ├── gpu_allocation_cache.cpp │ ├── gpu_arg_types.cpp │ ├── gpu_assertion_in_kernel.cpp │ ├── gpu_bounds_inference_failure.cpp │ ├── gpu_condition_lifting.cpp │ ├── gpu_cpu_simultaneous_read.cpp │ ├── gpu_data_flows.cpp │ ├── gpu_different_blocks_threads_dimensions.cpp │ ├── gpu_dynamic_shared.cpp │ ├── gpu_f16_intrinsics.cpp │ ├── gpu_free_sync.cpp │ ├── gpu_give_input_buffers_device_allocations.cpp │ ├── gpu_jit_explicit_copy_to_device.cpp │ ├── gpu_large_alloc.cpp │ ├── gpu_many_kernels.cpp │ ├── gpu_metal_completion_handler_error_check.cpp │ ├── gpu_mixed_dimensionality.cpp │ ├── gpu_mixed_shared_mem_types.cpp │ ├── gpu_multi_device.cpp │ ├── gpu_multi_kernel.cpp │ ├── gpu_non_contiguous_copy.cpp │ ├── gpu_non_monotonic_shared_mem_size.cpp │ ├── gpu_object_lifetime_1.cpp │ ├── gpu_object_lifetime_2.cpp │ ├── gpu_object_lifetime_3.cpp │ ├── gpu_param_allocation.cpp │ ├── gpu_reuse_shared_memory.cpp │ ├── gpu_specialize.cpp │ ├── gpu_store_in_register_with_no_lanes_loop.cpp │ ├── gpu_sum_scan.cpp │ ├── gpu_texture.cpp │ ├── gpu_thread_barrier.cpp │ ├── gpu_transpose.cpp │ ├── gpu_vectorize.cpp │ ├── gpu_vectorized_shared_memory.cpp │ ├── growing_stack.cpp │ ├── half_native_interleave.cpp │ ├── halide_buffer.cpp │ ├── handle.cpp │ ├── heap_cleanup.cpp │ ├── hello_gpu.cpp │ ├── hexagon_scatter.cpp │ ├── histogram.cpp │ ├── histogram_equalize.cpp │ ├── hoist_loop_invariant_if_statements.cpp │ ├── hoist_storage.cpp │ ├── host_alignment.cpp │ ├── image_io.cpp │ ├── image_of_lists.cpp │ ├── image_wrapper.cpp │ ├── implicit_args.cpp │ ├── implicit_args_tests.cpp │ ├── in_place.cpp │ ├── indexing_access_undef.cpp │ ├── infer_arguments.cpp │ ├── inline_reduction.cpp │ ├── inlined_generator.cpp │ ├── input_image_bounds_check.cpp │ ├── input_larger_than_two_gigs.cpp │ ├── integer_powers.cpp │ ├── interleave.cpp │ ├── interleave_rgb.cpp │ ├── interleave_x.cpp │ ├── interpreter.cpp │ ├── interval.cpp │ ├── intrinsics.cpp │ ├── invalid_gpu_loop_nests.cpp │ ├── inverse.cpp │ ├── isnan.cpp │ ├── issue_3926.cpp │ ├── iterate_over_circle.cpp │ ├── lambda.cpp │ ├── lazy_convolution.cpp │ ├── leak_device_memory.cpp │ ├── left_shift_negative.cpp │ ├── legal_race_condition.cpp │ ├── lerp.cpp │ ├── let_in_rdom_bound.cpp │ ├── likely.cpp │ ├── load_library.cpp │ ├── logical.cpp │ ├── loop_carry.cpp │ ├── loop_invariant_extern_calls.cpp │ ├── loop_level_generator_param.cpp │ ├── lossless_cast.cpp │ ├── lots_of_dimensions.cpp │ ├── lots_of_loop_invariants.cpp │ ├── low_bit_depth_noise.cpp │ ├── make_struct.cpp │ ├── many_dimensions.cpp │ ├── many_small_extern_stages.cpp │ ├── many_updates.cpp │ ├── math.cpp │ ├── median3x3.cpp │ ├── memoize.cpp │ ├── memoize_cloned.cpp │ ├── min_extent.cpp │ ├── mod.cpp │ ├── mul_div_mod.cpp │ ├── multi_output_pipeline_with_bad_sizes.cpp │ ├── multi_pass_reduction.cpp │ ├── multi_splits_with_diff_tail_strategies.cpp │ ├── multi_way_select.cpp │ ├── multipass_constraints.cpp │ ├── multiple_outputs.cpp │ ├── multiple_outputs_extern.cpp │ ├── multiple_scatter.cpp │ ├── mux.cpp │ ├── named_updates.cpp │ ├── narrow_predicates.cpp │ ├── negative_split_factors.cpp │ ├── nested_shiftinwards.cpp │ ├── nested_tail_strategies.cpp │ ├── newtons_method.cpp │ ├── non_nesting_extern_bounds_query.cpp │ ├── non_vector_aligned_embeded_buffer.cpp │ ├── obscure_image_references.cpp │ ├── oddly_sized_output.cpp │ ├── out_constraint.cpp │ ├── out_of_memory.cpp │ ├── output_larger_than_two_gigs.cpp │ ├── parallel.cpp │ ├── parallel_alloc.cpp │ ├── parallel_fork.cpp │ ├── parallel_gpu_nested.cpp │ ├── parallel_nested.cpp │ ├── parallel_nested_1.cpp │ ├── parallel_reductions.cpp │ ├── parallel_rvar.cpp │ ├── parallel_scatter.cpp │ ├── param.cpp │ ├── parameter_constraints.cpp │ ├── partial_application.cpp │ ├── partial_realization.cpp │ ├── partition_loops.cpp │ ├── partition_loops_bug.cpp │ ├── partition_max_filter.cpp │ ├── pipeline_set_jit_externs_func.cpp │ ├── plain_c_includes.c │ ├── popc_clz_ctz_bounds.cpp │ ├── predicated_store_load.cpp │ ├── prefetch.cpp │ ├── print.cpp │ ├── print_loop_nest.cpp │ ├── process_some_tiles.cpp │ ├── pseudostack_shares_slots.cpp │ ├── python_extension_gen.cpp │ ├── pytorch.cpp │ ├── random.cpp │ ├── realize_condition_depends_on_tuple.cpp │ ├── realize_larger_than_two_gigs.cpp │ ├── realize_over_shifted_domain.cpp │ ├── recursive_box_filters.cpp │ ├── reduction_chain.cpp │ ├── reduction_non_rectangular.cpp │ ├── reduction_predicate_racing.cpp │ ├── reduction_schedule.cpp │ ├── register_shuffle.cpp │ ├── reorder_rvars.cpp │ ├── reorder_storage.cpp │ ├── require.cpp │ ├── reschedule.cpp │ ├── respect_input_constraint_in_bounds_inference.cpp │ ├── reuse_stack_alloc.cpp │ ├── rfactor.cpp │ ├── ring_buffer.cpp │ ├── round.cpp │ ├── saturating_casts.cpp │ ├── scatter.cpp │ ├── set_custom_trace.cpp │ ├── shadowed_bound.cpp │ ├── shared_self_references.cpp │ ├── shift_by_unsigned_negated.cpp │ ├── shifted_image.cpp │ ├── side_effects.cpp │ ├── simd_op_check.h │ ├── simd_op_check_arm.cpp │ ├── simd_op_check_hvx.cpp │ ├── simd_op_check_powerpc.cpp │ ├── simd_op_check_riscv.cpp │ ├── simd_op_check_sve2.cpp │ ├── simd_op_check_wasm.cpp │ ├── simd_op_check_x86.cpp │ ├── simplified_away_embedded_image.cpp │ ├── simplify.cpp │ ├── skip_stages.cpp │ ├── skip_stages_external_array_functions.cpp │ ├── skip_stages_memoize.cpp │ ├── sliding_backwards.cpp │ ├── sliding_over_guard_with_if.cpp │ ├── sliding_reduction.cpp │ ├── sliding_window.cpp │ ├── sort_exprs.cpp │ ├── specialize.cpp │ ├── specialize_to_gpu.cpp │ ├── specialize_trim_condition.cpp │ ├── split_by_non_factor.cpp │ ├── split_fuse_rvar.cpp │ ├── split_reuse_inner_name_bug.cpp │ ├── split_store_compute.cpp │ ├── stable_realization_order.cpp │ ├── stack_allocations.cpp │ ├── stage_strided_loads.cpp │ ├── stencil_chain_in_update_definitions.cpp │ ├── stmt_to_html.cpp │ ├── storage_folding.cpp │ ├── store_in.cpp │ ├── stream_compaction.cpp │ ├── strict_float.cpp │ ├── strict_float_bounds.cpp │ ├── strided_load.cpp │ ├── target.cpp │ ├── target_query.cpp │ ├── thread_safety.cpp │ ├── tiled_matmul.cpp │ ├── tracing.cpp │ ├── tracing_bounds.cpp │ ├── tracing_broadcast.cpp │ ├── tracing_stack.cpp │ ├── transitive_bounds.cpp │ ├── trim_no_ops.cpp │ ├── truncated_pyramid.cpp │ ├── tuple_partial_update.cpp │ ├── tuple_reduction.cpp │ ├── tuple_select.cpp │ ├── tuple_undef.cpp │ ├── tuple_update_ops.cpp │ ├── tuple_vector_reduce.cpp │ ├── two_vector_args.cpp │ ├── typed_func.cpp │ ├── undef.cpp │ ├── uninitialized_read.cpp │ ├── unique_func_image.cpp │ ├── unroll_dynamic_loop.cpp │ ├── unroll_huge_mux.cpp │ ├── unroll_loop_with_implied_constant_bounds.cpp │ ├── unrolled_reduction.cpp │ ├── unsafe_dedup_lets.cpp │ ├── unsafe_promises.cpp │ ├── unused_func.cpp │ ├── update_chunk.cpp │ ├── vector_bounds_inference.cpp │ ├── vector_cast.cpp │ ├── vector_extern.cpp │ ├── vector_math.cpp │ ├── vector_print_bug.cpp │ ├── vector_reductions.cpp │ ├── vector_shuffle.cpp │ ├── vector_tile.cpp │ ├── vectorize_guard_with_if.cpp │ ├── vectorize_mixed_widths.cpp │ ├── vectorize_nested.cpp │ ├── vectorize_varying_allocation_size.cpp │ ├── vectorized_assert.cpp │ ├── vectorized_gpu_allocation.cpp │ ├── vectorized_guard_with_if_tail.cpp │ ├── vectorized_initialization.cpp │ ├── vectorized_load_from_vectorized_allocation.cpp │ ├── vectorized_reduction_bug.cpp │ ├── widening_lerp.cpp │ └── widening_reduction.cpp ├── error │ ├── CMakeLists.txt │ ├── ambiguous_inline_reductions.cpp │ ├── async_require_fail.cpp │ ├── atomics_gpu_8_bit.cpp │ ├── atomics_gpu_mutex.cpp │ ├── atomics_self_reference.cpp │ ├── auto_schedule_no_parallel.cpp │ ├── auto_schedule_no_reorder.cpp │ ├── autodiff_unbounded.cpp │ ├── bad_async_producer.cpp │ ├── bad_async_producer_2.cpp │ ├── bad_bound.cpp │ ├── bad_bound_storage.cpp │ ├── bad_compute_at.cpp │ ├── bad_compute_with.cpp │ ├── bad_compute_with_invalid_specialization.cpp │ ├── bad_compute_with_parent_func_not_used.cpp │ ├── bad_const_cast.cpp │ ├── bad_device_api.cpp │ ├── bad_dimensions.cpp │ ├── bad_extern_split.cpp │ ├── bad_fold.cpp │ ├── bad_hoist_storage.cpp │ ├── bad_host_alignment.cpp │ ├── bad_partition_always.cpp │ ├── bad_prefetch.cpp │ ├── bad_reorder.cpp │ ├── bad_reorder_storage.cpp │ ├── bad_ring_buffer.cpp │ ├── bad_rvar_order.cpp │ ├── bad_schedule.cpp │ ├── bad_store_at.cpp │ ├── broken_promise.cpp │ ├── buffer_larger_than_two_gigs.cpp │ ├── callable_bad_arguments.cpp │ ├── callable_bad_values_passed.cpp │ ├── callable_typed_bad_arguments.cpp │ ├── callable_typed_bad_arguments_buffer_dims.cpp │ ├── callable_typed_bad_arguments_buffer_type.cpp │ ├── clamp_out_of_range.cpp │ ├── compute_with_crossing_edges1.cpp │ ├── compute_with_crossing_edges2.cpp │ ├── compute_with_fuse_in_specialization.cpp │ ├── constrain_wrong_output_buffer.cpp │ ├── constraint_uses_non_param.cpp │ ├── define_after_realize.cpp │ ├── define_after_use.cpp │ ├── device_dirty_with_no_device_support.cpp │ ├── device_target_mismatch.cpp │ ├── dupe_param_name.cpp │ ├── expanding_reduction.cpp │ ├── extern_func_self_argument.cpp │ ├── five_d_gpu_buffer.cpp │ ├── float_arg.cpp │ ├── forward_on_undefined_buffer.cpp │ ├── func_expr_dim_mismatch.cpp │ ├── func_expr_type_mismatch.cpp │ ├── func_expr_update_type_mismatch.cpp │ ├── func_extern_dim_mismatch.cpp │ ├── func_extern_type_mismatch.cpp │ ├── func_tuple_dim_mismatch.cpp │ ├── func_tuple_types_mismatch.cpp │ ├── func_tuple_update_types_mismatch.cpp │ ├── fuse_vectorized_var_with_rvar.cpp │ ├── hoist_storage_without_compute_at.cpp │ ├── implicit_args.cpp │ ├── impossible_constraints.cpp │ ├── incomplete_target.cpp │ ├── init_def_should_be_all_vars.cpp │ ├── inspect_loop_level.cpp │ ├── lerp_float_weight_out_of_range.cpp │ ├── lerp_mismatch.cpp │ ├── lerp_signed_weight.cpp │ ├── memoize_different_compute_store.cpp │ ├── memoize_redefine_eviction_key.cpp │ ├── metal_threads_too_large.cpp │ ├── metal_vector_too_large.cpp │ ├── missing_args.cpp │ ├── no_default_device.cpp │ ├── nonexistent_update_stage.cpp │ ├── null_host_field.cpp │ ├── overflow_during_constant_folding.cpp │ ├── pointer_arithmetic.cpp │ ├── predicate_loads_used_in_inner_splits.cpp │ ├── race_condition.cpp │ ├── rdom_undefined.cpp │ ├── rdom_where_races.cpp │ ├── realization_with_too_many_outputs.cpp │ ├── realize_constantly_larger_than_two_gigs.cpp │ ├── reduction_bounds.cpp │ ├── reduction_type_mismatch.cpp │ ├── require_fail.cpp │ ├── reuse_var_in_schedule.cpp │ ├── reused_args.cpp │ ├── rfactor_after_var_and_rvar_fusion.cpp │ ├── rfactor_fused_var_and_rvar.cpp │ ├── rfactor_inner_dim_non_commutative.cpp │ ├── round_up_and_blend_race.cpp │ ├── run_with_large_stack_throws.cpp │ ├── shift_inwards_and_blend_race.cpp │ ├── specialize_fail.cpp │ ├── split_inner_wrong_tail_strategy.cpp │ ├── split_non_innermost_predicated.cpp │ ├── split_same_var_names.cpp │ ├── store_at_without_compute_at.cpp │ ├── thread_id_outside_block_id.cpp │ ├── too_many_args.cpp │ ├── treat_rvar_as_var.cpp │ ├── tuple_arg_select_undef.cpp │ ├── tuple_output_bounds_check.cpp │ ├── tuple_realization_to_buffer.cpp │ ├── tuple_val_select_undef.cpp │ ├── unbounded_input.cpp │ ├── unbounded_output.cpp │ ├── undefined_func_compile.cpp │ ├── undefined_func_realize.cpp │ ├── undefined_loop_level.cpp │ ├── undefined_pipeline_compile.cpp │ ├── undefined_pipeline_realize.cpp │ ├── undefined_rdom_dimension.cpp │ ├── uninitialized_param.cpp │ ├── uninitialized_param_2.cpp │ ├── unknown_target.cpp │ ├── vector_tile.cpp │ ├── vectorize_dynamic.cpp │ ├── vectorize_too_little.cpp │ ├── vectorize_too_much.cpp │ ├── vectorized_extern.cpp │ ├── wrap_custom_after_shared.cpp │ ├── wrap_frozen.cpp │ ├── wrapper_never_used.cpp │ ├── wrong_dimensionality_extern_stage.cpp │ └── wrong_type.cpp ├── failing_with_issue │ ├── 3292_async_specialize.cpp │ ├── 3293_storage_folding_async.cpp │ ├── 3357_vectorize_pred.cpp │ └── CMakeLists.txt ├── fuzz │ ├── CMakeLists.txt │ ├── bounds.cpp │ ├── cse.cpp │ └── fuzz_helpers.h ├── generator │ ├── CMakeLists.txt │ ├── abstractgeneratortest_aottest.cpp │ ├── abstractgeneratortest_generator.cpp │ ├── acquire_release_aottest.cpp │ ├── acquire_release_generator.cpp │ ├── alias_aottest.cpp │ ├── alias_generator.cpp │ ├── all_type_names_aottest.cpp │ ├── all_type_names_generator.cpp │ ├── argvcall_aottest.cpp │ ├── argvcall_generator.cpp │ ├── async_parallel_aottest.cpp │ ├── async_parallel_generator.cpp │ ├── autograd_aottest.cpp │ ├── autograd_generator.cpp │ ├── bit_operations_aottest.cpp │ ├── bit_operations_generator.cpp │ ├── blur2x2_aottest.cpp │ ├── blur2x2_generator.cpp │ ├── buffer_copy_aottest.cpp │ ├── buffer_copy_generator.cpp │ ├── can_use_target_aottest.cpp │ ├── can_use_target_generator.cpp │ ├── cleanup_on_error_aottest.cpp │ ├── cleanup_on_error_generator.cpp │ ├── configure_aottest.cpp │ ├── configure_generator.cpp │ ├── configure_jittest.cpp │ ├── cxx_mangling_aottest.cpp │ ├── cxx_mangling_define_extern_aottest.cpp │ ├── cxx_mangling_define_extern_externs.cpp │ ├── cxx_mangling_define_extern_generator.cpp │ ├── cxx_mangling_externs.cpp │ ├── cxx_mangling_generator.cpp │ ├── define_extern_opencl_aottest.cpp │ ├── define_extern_opencl_generator.cpp │ ├── embed_image_aottest.cpp │ ├── embed_image_generator.cpp │ ├── error_codes_aottest.cpp │ ├── error_codes_generator.cpp │ ├── example_aottest.cpp │ ├── example_generator.cpp │ ├── example_jittest.cpp │ ├── extern_output_aottest.cpp │ ├── extern_output_generator.cpp │ ├── float16_t_aottest.cpp │ ├── float16_t_generator.cpp │ ├── gpu_multi_context_threaded_aottest.cpp │ ├── gpu_multi_context_threaded_generator.cpp │ ├── gpu_object_lifetime_aottest.cpp │ ├── gpu_object_lifetime_generator.cpp │ ├── gpu_only_aottest.cpp │ ├── gpu_only_generator.cpp │ ├── gpu_texture_aottest.cpp │ ├── gpu_texture_generator.cpp │ ├── image_from_array_aottest.cpp │ ├── image_from_array_generator.cpp │ ├── mandelbrot_aottest.cpp │ ├── mandelbrot_generator.cpp │ ├── memory_profiler_mandelbrot_aottest.cpp │ ├── memory_profiler_mandelbrot_generator.cpp │ ├── metadata_tester_aottest.cpp │ ├── metadata_tester_generator.cpp │ ├── metal_completion_handler_override_aottest.cpp │ ├── metal_completion_handler_override_generator.cpp │ ├── msan_aottest.cpp │ ├── msan_generator.cpp │ ├── multitarget_aottest.cpp │ ├── multitarget_generator.cpp │ ├── nested_externs_aottest.cpp │ ├── nested_externs_generator.cpp │ ├── opencl_runtime_aottest.cpp │ ├── opencl_runtime_generator.cpp │ ├── output_assign_aottest.cpp │ ├── output_assign_generator.cpp │ ├── pyramid_aottest.cpp │ ├── pyramid_generator.cpp │ ├── rdom_input_aottest.cpp │ ├── rdom_input_generator.cpp │ ├── registration_test.cpp │ ├── rungen_test.cpp │ ├── sanitizercoverage_aottest.cpp │ ├── sanitizercoverage_generator.cpp │ ├── shuffler_aottest.cpp │ ├── shuffler_generator.cpp │ ├── string_param_aottest.cpp │ ├── string_param_generator.cpp │ ├── stubtest_aottest.cpp │ ├── stubtest_generator.cpp │ ├── stubtest_jittest.cpp │ ├── stubuser_aottest.cpp │ ├── stubuser_generator.cpp │ ├── templated_aottest.cpp │ ├── templated_generator.cpp │ ├── tiled_blur_aottest.cpp │ ├── tiled_blur_generator.cpp │ ├── user_context_aottest.cpp │ ├── user_context_generator.cpp │ ├── user_context_insanity_aottest.cpp │ ├── user_context_insanity_generator.cpp │ ├── variable_num_threads_aottest.cpp │ └── variable_num_threads_generator.cpp ├── integration │ ├── CMakeLists.txt │ ├── README.md │ ├── aot │ │ ├── CMakeLists.txt │ │ └── add.cpp │ ├── jit │ │ ├── CMakeLists.txt │ │ └── main.cpp │ └── xc │ │ ├── CMakeLists.txt │ │ └── add.cpp ├── internal.cpp ├── performance │ ├── CMakeLists.txt │ ├── async_gpu.cpp │ ├── blend_tail_strategies.cpp │ ├── block_transpose.cpp │ ├── boundary_conditions.cpp │ ├── clamped_vector_load.cpp │ ├── const_division.cpp │ ├── fan_in.cpp │ ├── fast_inverse.cpp │ ├── fast_pow.cpp │ ├── fast_sine_cosine.cpp │ ├── gpu_half_throughput.cpp │ ├── inner_loop_parallel.cpp │ ├── jit_stress.cpp │ ├── lots_of_inputs.cpp │ ├── lots_of_small_allocations.cpp │ ├── matrix_multiplication.cpp │ ├── memcpy.cpp │ ├── memory_profiler.cpp │ ├── nested_vectorization_gemm.cpp │ ├── packed_planar_fusion.cpp │ ├── parallel_performance.cpp │ ├── parallel_scenarios.cpp │ ├── profiler.cpp │ ├── realize_overhead.cpp │ ├── rfactor.cpp │ ├── rgb_interleaved.cpp │ ├── sort.cpp │ ├── stack_vs_heap.cpp │ ├── thread_safe_jit_callable.cpp │ ├── tiled_matmul.cpp │ ├── vectorize.cpp │ └── wrap.cpp ├── runtime │ ├── CMakeLists.txt │ ├── block_allocator.cpp │ ├── block_storage.cpp │ ├── common.cpp │ ├── common.h │ ├── linked_list.cpp │ ├── memory_arena.cpp │ ├── string_storage.cpp │ └── string_table.cpp └── warning │ ├── CMakeLists.txt │ ├── emulated_float16.cpp │ ├── hidden_pure_definition.cpp │ ├── require_const_false.cpp │ ├── sliding_vectors.cpp │ └── unscheduled_update_def.cpp ├── tools ├── CMakeLists.txt ├── GenGen.cpp ├── RunGen.h ├── RunGenMain.cpp ├── binary2cpp.cpp ├── build_halide_h.cpp ├── find_inverse.cpp ├── halide_benchmark.h ├── halide_config.make.tpl ├── halide_image.h ├── halide_image_info.h ├── halide_image_io.h ├── halide_malloc_trace.h ├── halide_thread_pool.h ├── halide_trace_config.h ├── launch_wasm_test.js ├── lldbhalide.py ├── makelib.sh └── regexp_replace.cpp ├── tutorial ├── .clang-format ├── .gitignore ├── CMakeLists.txt ├── clock.h ├── figures │ ├── generate_figures_17.sh │ ├── generate_figures_18.sh │ ├── generate_figures_19.sh │ ├── generate_figures_5.sh │ ├── generate_figures_8.sh │ ├── generate_figures_9.sh │ ├── generate_output_snippets.sh │ ├── lesson_02_input.jpg │ ├── lesson_02_output.jpg │ ├── lesson_05_col_major.gif │ ├── lesson_05_fast.mp4 │ ├── lesson_05_parallel_tiles.gif │ ├── lesson_05_row_major.gif │ ├── lesson_05_split_7_by_3.gif │ ├── lesson_05_tiled.gif │ ├── lesson_05_vectors.gif │ ├── lesson_08_compute_root.gif │ ├── lesson_08_compute_y.gif │ ├── lesson_08_mixed.mp4 │ ├── lesson_08_store_root_compute_x.gif │ ├── lesson_08_store_root_compute_y.gif │ ├── lesson_08_tile.gif │ ├── lesson_09_compute_at_multiple_updates.mp4 │ ├── lesson_09_compute_at_pure.gif │ ├── lesson_09_compute_at_pure_and_update.gif │ ├── lesson_09_compute_at_rvar.gif │ ├── lesson_09_compute_at_update.gif │ ├── lesson_09_inline_reduction.gif │ ├── lesson_09_update.gif │ ├── lesson_09_update_rdom.mp4 │ ├── lesson_09_update_schedule.mp4 │ ├── lesson_17_rdom_calls_in_predicate.mp4 │ ├── lesson_17_rdom_circular.mp4 │ ├── lesson_17_rdom_triangular.mp4 │ ├── lesson_18_hist_manual_par.mp4 │ ├── lesson_18_hist_rfactor_par.mp4 │ ├── lesson_18_hist_rfactor_tile.mp4 │ ├── lesson_18_hist_rfactor_vec.mp4 │ ├── lesson_18_hist_serial.mp4 │ ├── lesson_19_group_updates.mp4 │ ├── lesson_19_transpose.mp4 │ ├── lesson_19_wrapper_global.mp4 │ ├── lesson_19_wrapper_local.mp4 │ ├── lesson_19_wrapper_unique.mp4 │ └── lesson_19_wrapper_vary_schedule.mp4 ├── images │ ├── gray.png │ └── rgb.png ├── lesson_01_basics.cpp ├── lesson_02_input_image.cpp ├── lesson_03_debugging_1.cpp ├── lesson_04_debugging_2.cpp ├── lesson_05_scheduling_1.cpp ├── lesson_06_realizing_over_shifted_domains.cpp ├── lesson_07_multi_stage_pipelines.cpp ├── lesson_08_scheduling_2.cpp ├── lesson_09_update_definitions.cpp ├── lesson_10_aot_compilation_generate.cpp ├── lesson_10_aot_compilation_run.cpp ├── lesson_11_cross_compilation.cpp ├── lesson_12_using_the_gpu.cpp ├── lesson_13_tuples.cpp ├── lesson_14_types.cpp ├── lesson_15_generators.cpp ├── lesson_15_generators_usage.sh ├── lesson_16_rgb_generate.cpp ├── lesson_16_rgb_run.cpp ├── lesson_17_predicated_rdom.cpp ├── lesson_18_parallel_associative_reductions.cpp ├── lesson_19_wrapper_funcs.cpp ├── lesson_20_cloning_funcs.cpp ├── lesson_21_auto_scheduler_generate.cpp ├── lesson_21_auto_scheduler_run.cpp ├── lesson_22_jit_performance.cpp ├── lesson_23_serialization.cpp ├── lesson_24_async.cpp └── todo.txt ├── util ├── CMakeLists.txt ├── Halide-VS2017.natvis ├── Halide.natvis ├── HalideTraceDump.cpp ├── HalideTraceUtils.cpp ├── HalideTraceUtils.h ├── HalideTraceViz.cpp └── inconsolata.h └── vcpkg.json /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | # .clang-format-ignore 2 | ./bin 3 | ./build 4 | ./cmake_build 5 | ./cmake_build_static 6 | ./cmake_build_shared 7 | ./distrib 8 | ./doc 9 | ./include 10 | ./lib 11 | # Our tutorials have special formatting: skip them 12 | ./tutorial 13 | # hexagon_remote/bin/src is also special 14 | ./src/runtime/hexagon_remote/bin/src 15 | # mini_webgpu.h is copied from upstream with some local mods 16 | ./src/runtime/mini_webgpu.h 17 | ./dependencies/spirv 18 | ./dependencies/vulkan 19 | *.fbs.h 20 | -------------------------------------------------------------------------------- /.git_archival.txt: -------------------------------------------------------------------------------- 1 | node: 8bf7827bf08d655f0c842d4fe7271d5bf65600f9 2 | node-date: 2025-05-29T18:51:05+02:00 3 | describe-name: v20.0.0.dev0-64-g8bf7827bf08d 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.cpp text 7 | *.c text 8 | *.h text 9 | 10 | # Denote all files that are truly binary and should not be modified. 11 | *.png binary 12 | *.jpg binary 13 | *.tiff binary 14 | 15 | # Freeze version information in git archives 16 | .git_archival.txt export-subst 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/.gitmodules -------------------------------------------------------------------------------- /.lldbinit: -------------------------------------------------------------------------------- 1 | command script import ./tools/lldbhalide.py 2 | -------------------------------------------------------------------------------- /apps/HelloAndroid/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/** 2 | gen/** 3 | gradle_build/** 4 | HelloAndroid.iml 5 | local.properties 6 | obj/** 7 | proguard-project.txt 8 | project.properties 9 | -------------------------------------------------------------------------------- /apps/HelloAndroid/build-gradle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Gradle needs to know where the NDK is. 4 | # The easiest way is to set the ANDROID_NDK_HOME environment variable. 5 | # Otherwise, set ndk.dir in local.properties (even though the file itself says 6 | # that it's only used by ant). 7 | # However, if you run "android update" (say, via build.sh), this variable will 8 | # be clobbered. 9 | ./gradlew build && adb install -r gradle_build/outputs/apk/HelloAndroid-debug.apk && adb shell am start com.example.hellohalide/com.example.hellohalide.CameraActivity 10 | -------------------------------------------------------------------------------- /apps/HelloAndroid/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroid/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/HelloAndroid/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 05 14:23:44 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-bin.zip 7 | -------------------------------------------------------------------------------- /apps/HelloAndroid/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := HelloAndroid 6 | LOCAL_ARM_MODE := arm 7 | LOCAL_SRC_FILES := hello_wrapper.cpp 8 | LOCAL_LDFLAGS := -L$(LOCAL_PATH)/../jni 9 | LOCAL_LDLIBS := -lm -llog -landroid $(LOCAL_PATH)/../bin/$(TARGET_ARCH_ABI)/hello.a 10 | LOCAL_STATIC_LIBRARIES := android_native_app_glue 11 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../include $(LOCAL_PATH)/../../../build/include $(LOCAL_PATH)/../bin/$(TARGET_ARCH_ABI)/ 12 | 13 | include $(BUILD_SHARED_LIBRARY) 14 | 15 | $(call import-module,android/native_app_glue) 16 | -------------------------------------------------------------------------------- /apps/HelloAndroid/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := armeabi armeabi-v7a arm64-v8a x86_64 x86 2 | APP_PLATFORM := android-17 3 | APP_STL := gnustl_static 4 | APP_CPPFLAGS := -std=c++17 5 | -------------------------------------------------------------------------------- /apps/HelloAndroid/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroid/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroid/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroid/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroid/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroid/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroid/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroid/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroid/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /apps/HelloAndroid/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | HelloHalide 4 | 5 | -------------------------------------------------------------------------------- /apps/HelloAndroid/src/com/example/hellohalide/FrameHandler.java: -------------------------------------------------------------------------------- 1 | package com.example.hellohalide; 2 | 3 | import android.hardware.Camera; 4 | import android.util.Log; 5 | 6 | public class FrameHandler implements Camera.PreviewCallback { 7 | private static final String TAG = "FrameHandler"; 8 | 9 | public void onPreviewFrame(byte[] data, Camera camera) { 10 | Log.d(TAG, "Got a frame!"); 11 | } 12 | } -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle/** 2 | gen/** 3 | gradle_build/** 4 | *.iml 5 | local.properties 6 | obj/** 7 | proguard-project.txt 8 | project.properties 9 | -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/build-gradle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Gradle needs to know where the NDK is. 4 | # The easiest way is to set the ANDROID_NDK_HOME environment variable. 5 | # Otherwise, set ndk.dir in local.properties (even though the file itself says 6 | # that it's only used by ant). 7 | # However, if you run "android update" (say, via build.sh), this variable will 8 | # be clobbered. 9 | ./gradlew build && adb install -r gradle_build/outputs/apk/HelloAndroidCamera2-debug.apk && adb shell am start com.example.helloandroidcamera2/com.example.helloandroidcamera2.CameraActivity 10 | -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroidCamera2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jul 15 16:34:43 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip 7 | -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_ABI := armeabi armeabi-v7a arm64-v8a x86_64 x86 2 | APP_PLATFORM := android-21 3 | APP_STL := c++_static 4 | APP_CPPFLAGS := -std=c++17 -fno-rtti -fexceptions 5 | -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroidCamera2/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroidCamera2/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroidCamera2/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/HelloAndroidCamera2/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /apps/HelloAndroidCamera2/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | HelloHalideCamera2 4 | Toggle Edge Detector 5 | 6 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/.gitignore: -------------------------------------------------------------------------------- 1 | !enable_neon.s 2 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/cmake-external_project/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | 4 | # Prerequisite : 5 | # Halide is installed system-wide in your host machine or discoverable via CMAKE_PREFIX_PATH 6 | 7 | cd "$(dirname ${BASH_SOURCE[0]})" 8 | readonly TOOLCHAIN_FILE="${PWD}/../cmake/toolchain.noos-arm32-sample.cmake" 9 | 10 | rm -rf build 11 | 12 | cmake -S . -B build \ 13 | -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_FILE}" 14 | 15 | cmake --build build/ 16 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/cmake-external_project/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname ${BASH_SOURCE[0]})" 4 | ../run_baremetal.sh build/bin/add_filter ../../images/gray_small.pgm 16 build/out.pgm 5 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/cmake-super_build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | 4 | # Prerequisite : 5 | # Halide is installed system-wide in your host machine or discoverable via CMAKE_PREFIX_PATH 6 | 7 | cd "$(dirname ${BASH_SOURCE[0]})" 8 | readonly TOOLCHAIN_FILE="${PWD}/../cmake/toolchain.noos-arm32-sample.cmake" 9 | 10 | rm -rf build 11 | 12 | cmake -S . -B build \ 13 | -DAPP_TOOLCHAIN_FILE="${TOOLCHAIN_FILE}" 14 | 15 | cmake --build build/ 16 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/cmake-super_build/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname ${BASH_SOURCE[0]})" 4 | ../run_baremetal.sh build/bin/add_filter ../../images/gray_small.pgm 16 build/out.pgm 5 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/cmake-twice/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname ${BASH_SOURCE[0]})" 4 | ../run_baremetal.sh build-target/add_filter ../../images/gray_small.pgm 16 build-target/out.pgm 5 | -------------------------------------------------------------------------------- /apps/HelloBaremetal/enable_neon.s: -------------------------------------------------------------------------------- 1 | .global _enable_neon 2 | _enable_neon: 3 | MRC p15,0,r0,c1,c0,2 // Read CP Access register 4 | ORR r0,r0,#0x00f00000 // Enable full access to NEON/VFP by enabling access to Coprocessors 10 and 11 5 | MCR p15,0,r0,c1,c0,2 // Write CP Access register 6 | ISB 7 | MOV r0,#0x40000000 // Switch on the VFP and NEON hardware 8 | VMSR FPEXC,r0 // Set EN bit in FPEXC 9 | 10 | // Jump to C runtime, you may need to change the label name 11 | // depending on the boot up sequence and what runtime you linked. 12 | BL _mainCRTStartup 13 | -------------------------------------------------------------------------------- /apps/HelloPyTorch/setup.cfg: -------------------------------------------------------------------------------- 1 | # Workaround for OSX Homebrew Python issue; 2 | # see https://stackoverflow.com/questions/24257803/distutilsoptionerror-must-supply-either-home-or-prefix-exec-prefix-not-both 3 | 4 | [install] 5 | prefix= 6 | -------------------------------------------------------------------------------- /apps/HelloWasm/.gitignore: -------------------------------------------------------------------------------- 1 | js/* 2 | build/ 3 | bin/ 4 | -------------------------------------------------------------------------------- /apps/HelloiOS/HelloiOS/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | @property(strong, nonatomic) UIWindow *window; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /apps/HelloiOS/HelloiOS/HalideViewController.h: -------------------------------------------------------------------------------- 1 | #ifndef HelloiOS_HalideViewController_h 2 | #define HelloiOS_HalideViewController_h 3 | 4 | #import "HalideView.h" 5 | #import 6 | 7 | @interface HalideViewController : UIViewController 8 | 9 | @property HalideView *halide_view; 10 | 11 | - (void)viewWillAppear:(BOOL)animated; 12 | 13 | @end 14 | 15 | #endif -------------------------------------------------------------------------------- /apps/HelloiOS/HelloiOS/HelloiOS-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /apps/HelloiOS/HelloiOS/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /apps/HelloiOS/HelloiOS/main.mm: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/bilateral_grid/viz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo HL_AVCONV is ${HL_AVCONV} 3 | export HL_TRACE_FILE=/dev/stdout 4 | export HL_NUMTHREADS=4 5 | rm -f $1/bilateral_grid.mp4 6 | set -euo pipefail 7 | make $1/filter_viz && \ 8 | $1/filter_viz ../images/gray_small.png $1/out_small.png 0.2 0 | \ 9 | ../../bin/HalideTraceViz --size 1920 1080 | \ 10 | ${HL_AVCONV} -f rawvideo -pix_fmt bgr32 -s 1920x1080 -i /dev/stdin -c:v h264 $1/bilateral_grid.mp4 11 | #mplayer -demuxer rawvideo -rawvideo w=1920:h=1080:format=rgba:fps=30 -idle -fixed-vo - 12 | -------------------------------------------------------------------------------- /apps/hannk/.gitignore: -------------------------------------------------------------------------------- 1 | build*/ 2 | bin/ 3 | emsdk 4 | -------------------------------------------------------------------------------- /apps/hannk/delegate/exported_symbols.ldscript: -------------------------------------------------------------------------------- 1 | { 2 | global: tflite_plugin_create_delegate; tflite_plugin_destroy_delegate; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /apps/hannk/delegate/exported_symbols.osx: -------------------------------------------------------------------------------- 1 | _tflite_plugin_create_delegate 2 | _tflite_plugin_destroy_delegate 3 | -------------------------------------------------------------------------------- /apps/hannk/halide/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef HANNK_CONSTANTS_H 2 | #define HANNK_CONSTANTS_H 3 | 4 | namespace hannk { 5 | 6 | // After subtracing the zero point, we have 9 bits. We can shift 7 | // up by a further 6 bits to 15 bits total to get more precision 8 | // for the later operations. 9 | constexpr int add_input_shift = 6; 10 | constexpr int add_output_shift = 16; 11 | 12 | constexpr int mul_input_shift = 6; 13 | 14 | constexpr int softmax_input_shift = 6; 15 | 16 | } // namespace hannk 17 | 18 | #endif // HANNK_CONSTANTS_H 19 | -------------------------------------------------------------------------------- /apps/hannk/interpreter/stubs.cpp: -------------------------------------------------------------------------------- 1 | // Implementations for required Halide runtime symbols for Hexagon. 2 | 3 | #include 4 | 5 | extern "C" { 6 | 7 | void halide_print(void *user_context, const char *str) { 8 | printf("%s", str); 9 | } 10 | 11 | void halide_error(void *user_context, const char *msg) { 12 | halide_print(user_context, msg); 13 | } 14 | 15 | void halide_profiler_report(void *user_context) { 16 | } 17 | 18 | void halide_profiler_reset() { 19 | } 20 | 21 | } // extern "C" 22 | -------------------------------------------------------------------------------- /apps/hannk/test/inception_v2_224_quant/000.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v2_224_quant/000.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/000.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/000.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/001.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/001.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/002.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/002.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/003.MAX_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/003.MAX_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/004.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/004.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/006.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/006.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/008.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/008.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/009.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/009.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/013.MAX_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/013.MAX_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/015.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/015.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/016.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/016.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/024.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/024.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/044.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/044.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/045.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/045.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/049.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/049.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/052.MAX_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/052.MAX_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/054.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/054.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/057.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/057.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/069.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/069.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/081.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/081.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/093.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/093.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/105.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/105.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/117.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/117.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/118.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/118.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/129.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/129.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/140.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/140.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/141.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/141.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/142.MAX_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/142.MAX_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/149.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/149.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/178.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/178.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/189.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/189.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/191.CONCATENATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/191.CONCATENATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/192.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/192.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/inception_v4_299_quant/194.SOFTMAX.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/inception_v4_299_quant/194.SOFTMAX.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/L2_NORMALIZATION.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/L2_NORMALIZATION.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/LOGISTIC.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/LOGISTIC.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/MUL.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/MUL.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/SPACE_TO_DEPTH.2.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/SPACE_TO_DEPTH.2.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/SPACE_TO_DEPTH.4.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/SPACE_TO_DEPTH.4.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/SPLIT.1_1_1.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/SPLIT.1_1_1.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/SPLIT_V.36_5_7.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/SPLIT_V.36_5_7.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/TRANSPOSE.2_0_1.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/TRANSPOSE.2_0_1.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/bad_broadcast_add.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/bad_broadcast_add.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/bad_broadcast_mul.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/bad_broadcast_mul.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/bad_broadcast_sub.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/bad_broadcast_sub.tflite -------------------------------------------------------------------------------- /apps/hannk/test/misc/bad_fully_connected.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/misc/bad_fully_connected.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/000.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/000.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/001.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/001.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/002.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/002.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/003.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/003.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/004.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/004.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/005.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/005.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/006.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/006.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/007.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/007.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/008.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/008.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/009.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/009.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/010.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/010.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/011.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/011.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/012.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/012.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/013.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/013.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/014.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/014.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/019.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/019.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/022.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/022.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/025.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/025.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/027.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/027.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/029.RESHAPE.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/029.RESHAPE.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_0.25_128_quant/030.SOFTMAX.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_0.25_128_quant/030.SOFTMAX.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/000.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/000.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/001.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/001.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/002.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/002.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/003.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/003.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/004.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/004.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/005.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/005.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/006.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/006.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/007.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/007.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/008.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/008.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/009.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/009.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/013.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/013.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/025.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/025.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/027.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/027.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/029.RESHAPE.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/029.RESHAPE.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v1_1.0_224_quant/030.SOFTMAX.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v1_1.0_224_quant/030.SOFTMAX.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/000.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/000.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/001.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/001.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/002.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/002.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/003.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/003.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/004.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/004.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/005.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/005.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/008.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/008.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/009.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/009.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/012.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/012.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/015.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/015.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/016.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/016.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/020.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/020.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/021.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/021.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/022.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/022.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/023.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/023.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/027.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/027.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/031.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/031.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/032.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/032.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/033.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/033.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/034.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/034.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/035.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/035.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/038.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/038.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/040.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/040.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/042.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/042.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/045.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/045.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/046.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/046.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/047.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/047.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/049.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/049.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/053.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/053.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/054.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/054.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/056.CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/056.CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/057.ADD.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/057.ADD.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/059.DEPTHWISE_CONV_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/059.DEPTHWISE_CONV_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/062.AVERAGE_POOL_2D.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/062.AVERAGE_POOL_2D.tflite -------------------------------------------------------------------------------- /apps/hannk/test/mobilenet_v2_1.0_224_quant/064.RESHAPE.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/hannk/test/mobilenet_v2_1.0_224_quant/064.RESHAPE.tflite -------------------------------------------------------------------------------- /apps/images/bayer_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/bayer_raw.png -------------------------------------------------------------------------------- /apps/images/bayer_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/bayer_small.png -------------------------------------------------------------------------------- /apps/images/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/gray.png -------------------------------------------------------------------------------- /apps/images/gray_small.pgm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/gray_small.pgm -------------------------------------------------------------------------------- /apps/images/gray_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/gray_small.png -------------------------------------------------------------------------------- /apps/images/low_res_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/low_res_in.png -------------------------------------------------------------------------------- /apps/images/matrix_3200.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/matrix_3200.mat -------------------------------------------------------------------------------- /apps/images/matrix_7000.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/matrix_7000.mat -------------------------------------------------------------------------------- /apps/images/rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/rgb.png -------------------------------------------------------------------------------- /apps/images/rgb_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/rgb_small.png -------------------------------------------------------------------------------- /apps/images/rgb_small16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/rgb_small16.png -------------------------------------------------------------------------------- /apps/images/rgba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/apps/images/rgba.png -------------------------------------------------------------------------------- /apps/linear_algebra/.gitignore: -------------------------------------------------------------------------------- 1 | src/kernels/* 2 | -------------------------------------------------------------------------------- /apps/linear_algebra/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(test_halide_blas test_halide_blas.cpp) 2 | target_link_libraries(test_halide_blas PRIVATE BLAS::BLAS halide_blas) 3 | target_include_directories(test_halide_blas PRIVATE "${linear_algebra_SOURCE_DIR}/include") 4 | 5 | add_test(NAME test_halide_blas COMMAND test_halide_blas) 6 | set_tests_properties(test_halide_blas PROPERTIES 7 | LABELS linear_algebra 8 | PASS_REGULAR_EXPRESSION "Success!" 9 | FAIL_REGULAR_EXPRESSION "FAILED" 10 | SKIP_REGULAR_EXPRESSION "\\[SKIP\\]") 11 | -------------------------------------------------------------------------------- /apps/local_laplacian/viz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export HL_TRACE_FILE=/dev/stdout 3 | export HL_NUM_THREADS=4 4 | rm -f $1/local_laplacian.mp4 5 | set -euo pipefail 6 | make $1/process_viz && \ 7 | ./$1/process_viz ../images/rgb_small.png 4 1 1 0 ./$1/out_small.png | \ 8 | ../../bin/HalideTraceViz \ 9 | --size 1920 1080 --timestep 3000 | \ 10 | ${HL_AVCONV} -f rawvideo -pix_fmt bgr32 -s 1920x1080 -i /dev/stdin -c:v h264 ./$1/local_laplacian.mp4 11 | #mplayer -demuxer rawvideo -rawvideo w=1920:h=1080:format=rgba:fps=30 -idle -fixed-vo - 12 | -------------------------------------------------------------------------------- /apps/onnx/common_types.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_TYPES_H_ 2 | #define COMMON_TYPES_H_ 3 | 4 | #include "Halide.h" 5 | #include "onnx_converter.h" 6 | 7 | struct HalideModel { 8 | std::shared_ptr model; 9 | std::shared_ptr rep; 10 | std::vector input_names; 11 | std::unordered_map input_types; 12 | std::vector output_names; 13 | std::vector output_types; 14 | }; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /apps/support/viz_auto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # $1 = filter cmd to run, including args 4 | # $2 = HalideTraceViz executable 5 | # $3 = path to output mp4 6 | 7 | set -euo pipefail 8 | 9 | rm -rf "$3" 10 | 11 | # Use a named pipe for the $1 -> HTV pipe, just in case 12 | # the exe in $1 writes any random output to stdout. 13 | PIPE=/tmp/halide_viz_auto_pipe 14 | rm -rf $PIPE 15 | mkfifo $PIPE 16 | 17 | HL_TRACE_FILE=${PIPE} HL_NUMTHREADS=8 $1 & 18 | 19 | $2 --auto_layout --ignore_tags 0<${PIPE} | \ 20 | ${HL_AVCONV} -y -f rawvideo -pix_fmt bgr32 -s 1920x1080 -i /dev/stdin -c:v h264 "$3" 21 | -------------------------------------------------------------------------------- /apps/wavelet/README.md: -------------------------------------------------------------------------------- 1 | wavelet is a trivial app designed to show ahead-of-time Generator usage (with 2 | both Make and CMake), as opposed to using direct calls to (e.g.) 3 | Func::compile_to_file(). 4 | -------------------------------------------------------------------------------- /apps/wavelet/daubechies_constants.h: -------------------------------------------------------------------------------- 1 | #ifndef DAUBECHIES_CONSTANTS_H_ 2 | #define DAUBECHIES_CONSTANTS_H_ 3 | 4 | const float D0 = 0.4829629131445341f; 5 | const float D1 = 0.83651630373780772f; 6 | const float D2 = 0.22414386804201339f; 7 | const float D3 = -0.12940952255126034f; 8 | 9 | #endif // DAUBECHIES_CONSTANTS_H_ 10 | -------------------------------------------------------------------------------- /cmake/CheckFilesExist.cmake: -------------------------------------------------------------------------------- 1 | function(check_files_exist FAILED) 2 | set(${FAILED} FALSE PARENT_SCOPE) 3 | foreach (F IN LISTS ARGN) 4 | if (NOT EXISTS ${F}) 5 | message(STATUS "File not found: ${F}") 6 | set(${FAILED} TRUE PARENT_SCOPE) 7 | endif () 8 | endforeach () 9 | endfunction() 10 | 11 | if (CMAKE_SCRIPT_MODE_FILE) 12 | check_files_exist(FAILED ${FILES_TO_CHECK}) 13 | if (FAILED) 14 | message(FATAL_ERROR "One or more files weren't found") 15 | endif () 16 | endif () 17 | -------------------------------------------------------------------------------- /cmake/FindV8.cmake: -------------------------------------------------------------------------------- 1 | find_path(V8_INCLUDE_DIR v8.h) 2 | 3 | find_library( 4 | V8_LIBRARY 5 | NAMES v8_monolith 6 | PATH_SUFFIXES 7 | out.gn/x64.release.sample/obj 8 | ) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | find_package_handle_standard_args( 12 | V8 13 | REQUIRED_VARS V8_LIBRARY V8_INCLUDE_DIR 14 | HANDLE_COMPONENTS 15 | ) 16 | 17 | if (V8_FOUND AND NOT TARGET V8::V8) 18 | add_library(V8::V8 UNKNOWN IMPORTED) 19 | set_target_properties(V8::V8 PROPERTIES IMPORTED_LOCATION "${V8_LIBRARY}") 20 | target_include_directories(V8::V8 INTERFACE "${V8_INCLUDE_DIR}") 21 | endif () 22 | -------------------------------------------------------------------------------- /cmake/vcpkg/llvm/portfile.cmake: -------------------------------------------------------------------------------- 1 | # This instructs vcpkg to do nothing, which causes find_package 2 | # to search the system for LLVM, rather than the vcpkg trees. 3 | set(VCPKG_POLICY_EMPTY_PACKAGE enabled) 4 | -------------------------------------------------------------------------------- /cmake/vcpkg/python3/portfile.cmake: -------------------------------------------------------------------------------- 1 | # This instructs vcpkg to do nothing, which causes find_package 2 | # to search the system for Python, rather than the vcpkg trees. 3 | set(VCPKG_POLICY_EMPTY_PACKAGE enabled) 4 | -------------------------------------------------------------------------------- /dependencies/vulkan/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2015-2023 The Khronos Group Inc. 2 | 3 | Files in this repository fall under one of these licenses: 4 | 5 | - `Apache-2.0` 6 | - `MIT` 7 | 8 | Note: With the exception of `parse_dependency.py` the files using `MIT` license 9 | also fall under `Apache-2.0`. Example: 10 | 11 | ``` 12 | SPDX-License-Identifier: Apache-2.0 OR MIT 13 | ``` 14 | 15 | Full license text of these licenses is available at: 16 | 17 | * Apache-2.0: https://opensource.org/licenses/Apache-2.0 18 | * MIT: https://opensource.org/licenses/MIT 19 | -------------------------------------------------------------------------------- /packaging/common/HalideHelpersConfig.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.28) 2 | @PACKAGE_INIT@ 3 | 4 | set(Halide_HOST_TARGET @Halide_HOST_TARGET@) 5 | 6 | include(${CMAKE_CURRENT_LIST_DIR}/Halide-Interfaces.cmake) 7 | include(${CMAKE_CURRENT_LIST_DIR}/HalideTargetHelpers.cmake) 8 | include(${CMAKE_CURRENT_LIST_DIR}/HalideGeneratorHelpers.cmake) 9 | include(${CMAKE_CURRENT_LIST_DIR}/TargetExportScript.cmake) 10 | 11 | check_required_components(${CMAKE_FIND_PACKAGE_NAME}) 12 | -------------------------------------------------------------------------------- /packaging/common/Welcome.txt: -------------------------------------------------------------------------------- 1 | Welcome to the Halide installer. 2 | 3 | This program will guide you through the installation of the Halide libraries, 4 | autoschedulers, development files, and documentation. 5 | -------------------------------------------------------------------------------- /packaging/pip/TrampolineConfig.cmake.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.28) 2 | 3 | include(CMakeFindDependencyMacro) 4 | find_dependency(Python 3) 5 | 6 | include("${Python_SITEARCH}/halide/@INSTALL_DIR@/@PACKAGE@Config.cmake") 7 | -------------------------------------------------------------------------------- /python_bindings/packaging/Halide_PythonConfig.cmake.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.28) 2 | @PACKAGE_INIT@ 3 | 4 | include(CMakeFindDependencyMacro) 5 | find_dependency(Python 3 COMPONENTS Interpreter Development.Module) 6 | 7 | include("${CMAKE_CURRENT_LIST_DIR}/Halide_Python-targets.cmake") 8 | 9 | check_required_components(${CMAKE_FIND_PACKAGE_NAME}) 10 | -------------------------------------------------------------------------------- /python_bindings/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(halide) 2 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyArgument.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYARGUMENT_H 2 | #define HALIDE_PYTHON_BINDINGS_PYARGUMENT_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_argument(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYARGUMENT_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyBoundaryConditions.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYBOUNDARYCONDITIONS_H 2 | #define HALIDE_PYTHON_BINDINGS_PYBOUNDARYCONDITIONS_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_boundary_conditions(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYBOUNDARYCONDITIONS_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyCallable.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYCALLABLE_H 2 | #define HALIDE_PYTHON_BINDINGS_PYCALLABLE_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_callable(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYCALLABLE_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyConciseCasts.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYCONCISECASTS_H 2 | #define HALIDE_PYTHON_BINDINGS_PYCONCISECASTS_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_concise_casts(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYCONCISECASTS_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyDerivative.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYDERIVATIVE_H 2 | #define HALIDE_PYTHON_BINDINGS_PYDERIVATIVE_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_derivative(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYDERIVATIVE_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyEnums.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYENUMS_H 2 | #define HALIDE_PYTHON_BINDINGS_PYENUMS_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_enums(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYENUMS_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyError.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYERROR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYERROR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_error(py::module &m); 10 | 11 | struct PyJITUserContext : public JITUserContext { 12 | PyJITUserContext(); 13 | }; 14 | 15 | } // namespace PythonBindings 16 | } // namespace Halide 17 | 18 | #endif // HALIDE_PYTHON_BINDINGS_PYERROR_H 19 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyExpr.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYEXPR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYEXPR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_expr(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYEXPR_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyExternFuncArgument.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYEXTERNFUNCARGUMENT_H 2 | #define HALIDE_PYTHON_BINDINGS_PYEXTERNFUNCARGUMENT_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_extern_func_argument(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYEXTERNFUNCARGUMENT_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyFunc.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYFUNC_H 2 | #define HALIDE_PYTHON_BINDINGS_PYFUNC_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_func(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYFUNC_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyFuncRef.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYFUNC_REF_H 2 | #define HALIDE_PYTHON_BINDINGS_PYFUNC_REF_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_func_ref(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYFUNC_REF_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyGenerator.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYGENERATOR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYGENERATOR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_generator(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYGENERATOR_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyIROperator.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYIROPERATOR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYIROPERATOR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_operators(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYIROPERATOR_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyImageParam.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYIMAGEPARAM_H 2 | #define HALIDE_PYTHON_BINDINGS_PYIMAGEPARAM_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_image_param(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYIMAGEPARAM_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyInlineReductions.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYINLINEREDUCTIONS_H 2 | #define HALIDE_PYTHON_BINDINGS_PYINLINEREDUCTIONS_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_inline_reductions(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYINLINEREDUCTIONS_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyLambda.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYLAMBDA_H 2 | #define HALIDE_PYTHON_BINDINGS_PYLAMBDA_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_lambda(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYLAMBDA_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyLoopLevel.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYLOOPLEVEL_H 2 | #define HALIDE_PYTHON_BINDINGS_PYLOOPLEVEL_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_loop_level(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYLOOPLEVEL_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyModule.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYMODULE_H 2 | #define HALIDE_PYTHON_BINDINGS_PYMODULE_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_module(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYMODULE_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyParam.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYPARAM_H 2 | #define HALIDE_PYTHON_BINDINGS_PYPARAM_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_param(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYPARAM_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyParameter.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYPARAMETER_H 2 | #define HALIDE_PYTHON_BINDINGS_PYPARAMETER_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_parameter(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYPARAMETER_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyPipeline.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYPIPELINE_H 2 | #define HALIDE_PYTHON_BINDINGS_PYPIPELINE_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_pipeline(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYPIPELINE_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyRDom.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYRDOM_H 2 | #define HALIDE_PYTHON_BINDINGS_PYRDOM_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_rdom(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYRDOM_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyStage.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYSTAGE_H 2 | #define HALIDE_PYTHON_BINDINGS_PYSTAGE_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_stage(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYFUNC_STAGE_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyTarget.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYTARGET_H 2 | #define HALIDE_PYTHON_BINDINGS_PYTARGET_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_target(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYTARGET_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyVar.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYVAR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYVAR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_var(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYVAR_H 15 | -------------------------------------------------------------------------------- /python_bindings/src/halide/halide_/PyVarOrRVar.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_PYTHON_BINDINGS_PYFUNC_VARORRVAR_H 2 | #define HALIDE_PYTHON_BINDINGS_PYFUNC_VARORRVAR_H 3 | 4 | #include "PyHalide.h" 5 | 6 | namespace Halide { 7 | namespace PythonBindings { 8 | 9 | void define_var_or_rvar(py::module &m); 10 | 11 | } // namespace PythonBindings 12 | } // namespace Halide 13 | 14 | #endif // HALIDE_PYTHON_BINDINGS_PYFUNC_VARORRVAR_H 15 | -------------------------------------------------------------------------------- /python_bindings/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (Halide_TARGET MATCHES "wasm") 2 | message(WARNING "Python tests are skipped under WASM.") 3 | return() 4 | endif () 5 | 6 | if (NOT WITH_AUTOSCHEDULERS) 7 | message(WARNING "Python tests are skipped without autoschedulers") 8 | return() 9 | endif () 10 | 11 | add_subdirectory(correctness) 12 | add_subdirectory(generators) 13 | -------------------------------------------------------------------------------- /python_bindings/test/correctness/atomics.py: -------------------------------------------------------------------------------- 1 | import halide as hl 2 | 3 | 4 | def test_atomics(): 5 | x = hl.Var("x") 6 | im = hl.Func("im") 7 | f = hl.Func("f") 8 | im[x] = (x * x) % 5 9 | r = hl.RDom([(0, 100)]) 10 | f[x] = 0 11 | f[hl.Expr(im[r])] += 1 12 | f.compute_root().update().atomic().parallel(r) 13 | b = f.realize([5]) 14 | 15 | ref = [0, 0, 0, 0, 0] 16 | for i in range(100): 17 | idx = (i * i) % 5 18 | ref[idx] += 1 19 | for i in range(5): 20 | assert b[i] == ref[i] 21 | 22 | 23 | if __name__ == "__main__": 24 | test_atomics() 25 | -------------------------------------------------------------------------------- /python_bindings/test/correctness/user_context_test.py: -------------------------------------------------------------------------------- 1 | import array 2 | from user_context import user_context 3 | 4 | 5 | def test(): 6 | output = bytearray("\0\0\0\0", "ascii") 7 | user_context(None, ord("q"), output) 8 | assert output == bytearray("qqqq", "ascii") 9 | 10 | 11 | if __name__ == "__main__": 12 | test() 13 | -------------------------------------------------------------------------------- /python_bindings/test/generators/bitcpp_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | class BitGenerator : public Halide::Generator { 6 | public: 7 | Input> bit_input{"input_uint1"}; 8 | Input bit_constant{"constant_uint1"}; 9 | Output> bit_output{"output_uint1"}; 10 | 11 | Var x, y, z; 12 | 13 | void generate() { 14 | bit_output(x) = bit_input(x) | bit_constant; 15 | } 16 | 17 | void schedule() { 18 | } 19 | }; 20 | 21 | HALIDE_REGISTER_GENERATOR(BitGenerator, bitcpp) 22 | -------------------------------------------------------------------------------- /python_bindings/test/generators/bitpy_generator.py: -------------------------------------------------------------------------------- 1 | import halide as hl 2 | 3 | x = hl.Var("x") 4 | y = hl.Var("y") 5 | 6 | 7 | @hl.generator(name="bitpy") 8 | class BitGenerator: 9 | # We can use `bool` as an alias for `hl.Bool()` if we like 10 | bit_input = hl.InputBuffer(bool, 1) 11 | bit_constant = hl.InputScalar(bool) 12 | 13 | bit_output = hl.OutputBuffer(hl.Bool(), 1) 14 | 15 | def generate(self): 16 | g = self 17 | g.bit_output[x] = g.bit_input[x] | g.bit_constant 18 | 19 | 20 | if __name__ == "__main__": 21 | hl.main() 22 | -------------------------------------------------------------------------------- /python_bindings/test/generators/user_context_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | class UserContextGenerator : public Halide::Generator { 6 | public: 7 | Input constant{"constant"}; 8 | Output> output{"output"}; 9 | 10 | Var x; 11 | 12 | void generate() { 13 | output(x) = constant; 14 | } 15 | 16 | void schedule() { 17 | } 18 | }; 19 | 20 | HALIDE_REGISTER_GENERATOR(UserContextGenerator, user_context) 21 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | build 2 | cmake>=3.28 3 | imageio 4 | ninja 5 | numpy 6 | pillow 7 | pybind11==2.11.1 8 | scikit-build-core==0.10.5 9 | scipy 10 | setuptools>=43 11 | tbump==6.11.0 12 | wheel 13 | -------------------------------------------------------------------------------- /src/AsyncProducers.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_ASYNC_PRODUCERS_H 2 | #define HALIDE_ASYNC_PRODUCERS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that injects task parallelism for producers that are scheduled as async. 6 | */ 7 | #include 8 | #include 9 | 10 | #include "Expr.h" 11 | 12 | namespace Halide { 13 | namespace Internal { 14 | 15 | class Function; 16 | 17 | Stmt fork_async_producers(Stmt s, const std::map &env); 18 | 19 | } // namespace Internal 20 | } // namespace Halide 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/CodeGen_D3D12Compute_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_D3D12_COMPUTE_DEV_H 2 | #define HALIDE_CODEGEN_D3D12_COMPUTE_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing D3D12-compatible HLSL kernel code 6 | */ 7 | 8 | #include 9 | 10 | namespace Halide { 11 | 12 | struct Target; 13 | 14 | namespace Internal { 15 | 16 | struct CodeGen_GPU_Dev; 17 | 18 | std::unique_ptr new_CodeGen_D3D12Compute_Dev(const Target &target); 19 | 20 | } // namespace Internal 21 | } // namespace Halide 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/CodeGen_Metal_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_METAL_DEV_H 2 | #define HALIDE_CODEGEN_METAL_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing Apple Metal shading language kernel code 6 | */ 7 | 8 | #include 9 | 10 | namespace Halide { 11 | 12 | struct Target; 13 | 14 | namespace Internal { 15 | 16 | struct CodeGen_GPU_Dev; 17 | 18 | std::unique_ptr new_CodeGen_Metal_Dev(const Target &target); 19 | 20 | } // namespace Internal 21 | } // namespace Halide 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/CodeGen_OpenCL_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_OPENCL_DEV_H 2 | #define HALIDE_CODEGEN_OPENCL_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing OpenCL C kernel code 6 | */ 7 | 8 | #include 9 | 10 | namespace Halide { 11 | 12 | struct Target; 13 | 14 | namespace Internal { 15 | 16 | struct CodeGen_GPU_Dev; 17 | 18 | std::unique_ptr new_CodeGen_OpenCL_Dev(const Target &target); 19 | 20 | } // namespace Internal 21 | } // namespace Halide 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/CodeGen_PTX_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_PTX_DEV_H 2 | #define HALIDE_CODEGEN_PTX_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing CUDA host code 6 | */ 7 | 8 | #include 9 | 10 | namespace Halide { 11 | 12 | struct Target; 13 | 14 | namespace Internal { 15 | 16 | struct CodeGen_GPU_Dev; 17 | 18 | std::unique_ptr new_CodeGen_PTX_Dev(const Target &target); 19 | 20 | } // namespace Internal 21 | } // namespace Halide 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/CodeGen_Vulkan_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_VULKAN_DEV_H 2 | #define HALIDE_CODEGEN_VULKAN_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing SPIR-V binary modules for 6 | * use with the Vulkan runtime 7 | */ 8 | 9 | #include 10 | 11 | namespace Halide { 12 | 13 | struct Target; 14 | 15 | namespace Internal { 16 | 17 | struct CodeGen_GPU_Dev; 18 | 19 | std::unique_ptr new_CodeGen_Vulkan_Dev(const Target &target); 20 | 21 | } // namespace Internal 22 | } // namespace Halide 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/CodeGen_WebGPU_Dev.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_CODEGEN_WEBGPU_DEV_H 2 | #define HALIDE_CODEGEN_WEBGPU_DEV_H 3 | 4 | /** \file 5 | * Defines the code-generator for producing WebGPU shader code (WGSL) 6 | */ 7 | 8 | #include 9 | 10 | namespace Halide { 11 | 12 | struct Target; 13 | 14 | namespace Internal { 15 | 16 | struct CodeGen_GPU_Dev; 17 | 18 | std::unique_ptr new_CodeGen_WebGPU_Dev(const Target &target); 19 | 20 | } // namespace Internal 21 | } // namespace Halide 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ExtractTileOperations.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_EXTRACT_TILE_OPERATIONS_H 2 | #define HALIDE_EXTRACT_TILE_OPERATIONS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that injects calls to tile intrinsics that support 6 | * AMX instructions. 7 | */ 8 | 9 | #include "Expr.h" 10 | 11 | namespace Halide { 12 | namespace Internal { 13 | 14 | /** Rewrite any AMX tile operations that have been stored in the AMXTile memory 15 | * type as intrinsic calls, to be used in the X86 backend. */ 16 | Stmt extract_tile_operations(const Stmt &s); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/FlattenNestedRamps.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_FLATTEN_NESTED_RAMPS_H 2 | #define HALIDE_FLATTEN_NESTED_RAMPS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that flattens nested ramps and broadcasts. 6 | * */ 7 | 8 | #include "IR.h" 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Take a statement/expression and replace nested ramps and broadcasts. */ 14 | Stmt flatten_nested_ramps(const Stmt &s); 15 | Expr flatten_nested_ramps(const Expr &e); 16 | 17 | } // namespace Internal 18 | } // namespace Halide 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/LowerWarpShuffles.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_LOWER_WARP_SHUFFLES_H 2 | #define HALIDE_LOWER_WARP_SHUFFLES_H 3 | 4 | /** \file 5 | * Defines the lowering pass that injects CUDA warp shuffle 6 | * instructions to access storage outside of a GPULane loop. 7 | */ 8 | 9 | #include "Expr.h" 10 | 11 | namespace Halide { 12 | namespace Internal { 13 | 14 | /** Rewrite access to things stored outside the loop over GPU lanes to 15 | * use nvidia's warp shuffle instructions. */ 16 | Stmt lower_warp_shuffles(Stmt s, const Target &t); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/OptimizeShuffles.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTIMIZE_SHUFFLES_H 2 | #define OPTIMIZE_SHUFFLES_H 3 | 4 | /** \file 5 | * Defines a lowering pass that replace indirect 6 | * loads with dynamic_shuffle intrinsics where possible. 7 | */ 8 | 9 | #include "Expr.h" 10 | 11 | namespace Halide { 12 | namespace Internal { 13 | 14 | /* Replace indirect loads with dynamic_shuffle intrinsics where 15 | possible. */ 16 | Stmt optimize_shuffles(Stmt s, int lut_alignment); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/Qualify.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_QUALIFY_H 2 | #define HALIDE_QUALIFY_H 3 | 4 | /** \file 5 | * 6 | * Defines methods for prefixing names in an expression with a prefix string. 7 | */ 8 | #include 9 | 10 | #include "Expr.h" 11 | 12 | namespace Halide { 13 | namespace Internal { 14 | 15 | /** Prefix all variable names in the given expression with the prefix string. */ 16 | Expr qualify(const std::string &prefix, const Expr &value); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/RebaseLoopsToZero.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_REBASE_LOOPS_TO_ZERO_H 2 | #define HALIDE_REBASE_LOOPS_TO_ZERO_H 3 | 4 | /** \file 5 | * Defines the lowering pass that rewrites loop mins to be 0. 6 | */ 7 | 8 | #include "Expr.h" 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Rewrite the mins of most loops to 0. */ 14 | Stmt rebase_loops_to_zero(const Stmt &); 15 | 16 | } // namespace Internal 17 | } // namespace Halide 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/RemoveExternLoops.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_REMOVE_EXTERN_LOOPS 2 | #define HALIDE_REMOVE_EXTERN_LOOPS 3 | 4 | #include "Expr.h" 5 | 6 | /** \file 7 | * Defines a lowering pass that removes placeholder loops for extern stages. 8 | */ 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Removes placeholder loops for extern stages. */ 14 | Stmt remove_extern_loops(const Stmt &s); 15 | 16 | } // namespace Internal 17 | } // namespace Halide 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/RemoveUndef.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_REMOVE_UNDEF 2 | #define HALIDE_REMOVE_UNDEF 3 | 4 | #include "Expr.h" 5 | 6 | /** \file 7 | * Defines a lowering pass that elides stores that depend on unitialized values. 8 | */ 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Removes stores that depend on undef values, and statements that 14 | * only contain such stores. */ 15 | Stmt remove_undef(Stmt s); 16 | 17 | } // namespace Internal 18 | } // namespace Halide 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/StripAsserts.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_STRIP_ASSERTS_H 2 | #define HALIDE_STRIP_ASSERTS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that strips asserts when NoAsserts is set. 6 | */ 7 | 8 | #include "Expr.h" 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | Stmt strip_asserts(const Stmt &s); 14 | 15 | } // namespace Internal 16 | } // namespace Halide 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/TargetQueryOps.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_TARGET_QUERY_OPS_H 2 | #define HALIDE_TARGET_QUERY_OPS_H 3 | 4 | /** \file 5 | * Defines a lowering pass to lower all target_is() and target_has() helpers. 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | namespace Halide { 12 | 13 | struct Target; 14 | 15 | namespace Internal { 16 | 17 | class Function; 18 | 19 | void lower_target_query_ops(std::map &env, const Target &t); 20 | 21 | } // namespace Internal 22 | } // namespace Halide 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/TrimNoOps.h: -------------------------------------------------------------------------------- 1 | #ifndef TRIM_NO_OPS_H 2 | #define TRIM_NO_OPS_H 3 | 4 | /** \file 5 | * Defines a lowering pass that truncates loops to the region over 6 | * which they actually do something. 7 | */ 8 | 9 | #include "Expr.h" 10 | 11 | namespace Halide { 12 | namespace Internal { 13 | 14 | /** Truncate loop bounds to the region over which they actually do 15 | * something. For examples see test/correctness/trim_no_ops.cpp */ 16 | Stmt trim_no_ops(Stmt s); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/Tuple.cpp: -------------------------------------------------------------------------------- 1 | #include "Tuple.h" 2 | #include "Debug.h" 3 | #include "Func.h" 4 | 5 | namespace Halide { 6 | 7 | Tuple::Tuple(const FuncRef &f) 8 | : exprs(f.size()) { 9 | user_assert(f.size() > 1) 10 | << "Can't construct a Tuple from a call to Func \"" 11 | << f.function().name() << "\" because it does not return a Tuple.\n"; 12 | for (size_t i = 0; i < f.size(); i++) { 13 | exprs[i] = f[i]; 14 | } 15 | } 16 | 17 | } // namespace Halide 18 | -------------------------------------------------------------------------------- /src/UnifyDuplicateLets.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_UNIFY_DUPLICATE_LETS_H 2 | #define HALIDE_UNIFY_DUPLICATE_LETS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that coalesces redundant let statements 6 | */ 7 | 8 | #include "Expr.h" 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Find let statements that all define the same value, and make later 14 | * ones just reuse the symbol names of the earlier ones. */ 15 | Stmt unify_duplicate_lets(const Stmt &s); 16 | 17 | } // namespace Internal 18 | } // namespace Halide 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/UnrollLoops.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_UNROLL_LOOPS_H 2 | #define HALIDE_UNROLL_LOOPS_H 3 | 4 | /** \file 5 | * Defines the lowering pass that unrolls loops marked as such 6 | */ 7 | 8 | #include "Expr.h" 9 | 10 | namespace Halide { 11 | namespace Internal { 12 | 13 | /** Take a statement with for loops marked for unrolling, and convert 14 | * each into several copies of the innermost statement. I.e. unroll 15 | * the loop. */ 16 | Stmt unroll_loops(const Stmt &); 17 | 18 | } // namespace Internal 19 | } // namespace Halide 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/WrapCalls.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_WRAP_CALLS_H 2 | #define HALIDE_WRAP_CALLS_H 3 | 4 | /** \file 5 | * 6 | * Defines pass to replace calls to wrapped Functions with their wrappers. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | namespace Halide { 13 | namespace Internal { 14 | 15 | class Function; 16 | 17 | /** Replace every call to wrapped Functions in the Functions' definitions with 18 | * call to their wrapper functions. */ 19 | std::map wrap_func_calls(const std::map &env); 20 | 21 | } // namespace Internal 22 | } // namespace Halide 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/autoschedulers/adams2019/NetworkSize.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_NETWORK_SIZE_H 2 | #define HALIDE_NETWORK_SIZE_H 3 | 4 | namespace Halide { 5 | // The size of the best cost model network found. Needed by the cost 6 | // model and also the cost model training script. 7 | const int head1_channels = 8, head1_w = 40, head1_h = 7; 8 | const int head2_channels = 24, head2_w = 39; 9 | const int conv1_channels = 32; 10 | } // namespace Halide 11 | 12 | #endif // HALIDE_NETWORK_SIZE_H 13 | -------------------------------------------------------------------------------- /src/autoschedulers/adams2019/baseline.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/adams2019/baseline.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/NetworkSize.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_NETWORK_SIZE_H 2 | #define HALIDE_NETWORK_SIZE_H 3 | 4 | namespace Halide { 5 | // The size of the best cost model network found. Needed by the cost 6 | // model and also the cost model training script. 7 | const int head1_channels = 8, head1_w = 40, head1_h = 7; 8 | const int head2_channels = 24, head2_w = 73; 9 | const int conv1_channels = 32; // Only 30 are used (needs to be a multiple of 8 for vectorization in cost_model_generator.cpp) 10 | } // namespace Halide 11 | 12 | #endif // HALIDE_NETWORK_SIZE_H 13 | -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/baseline.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/baseline.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/README.md: -------------------------------------------------------------------------------- 1 | The weights in this directory were trained in a hold-one-out fashion. Each 2 | app was trained on a set of random pipelines and all the other apps, but not 3 | itself. For example, bilateral_grid.weights was trained on the random pipelines 4 | and all apps except bilateral grid. 5 | 6 | These weights were trained on a V100 and may not perform the same on other GPUs. 7 | -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/bgu.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/bgu.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/bilateral_grid.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/bilateral_grid.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/camera_pipe.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/camera_pipe.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/conv_layer.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/conv_layer.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/cuda_mat_mul.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/cuda_mat_mul.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/depthwise_separable_conv.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/depthwise_separable_conv.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/gpu.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/gpu.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/harris.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/harris.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/hist.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/hist.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/iir_blur.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/iir_blur.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/interpolate.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/interpolate.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/lens_blur.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/lens_blur.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/local_laplacian.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/local_laplacian.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/max_filter.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/max_filter.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/nl_means.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/nl_means.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/stencil_chain.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/stencil_chain.weights -------------------------------------------------------------------------------- /src/autoschedulers/anderson2021/weights/unsharp.weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/autoschedulers/anderson2021/weights/unsharp.weights -------------------------------------------------------------------------------- /src/autoschedulers/li2018/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_autoscheduler(NAME Li2018 SOURCES GradientAutoscheduler.cpp) 2 | -------------------------------------------------------------------------------- /src/autoschedulers/mullapudi2016/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_autoscheduler(NAME Mullapudi2016 SOURCES AutoSchedule.cpp) 2 | -------------------------------------------------------------------------------- /src/exported_symbols.ldscript: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | # Everything at global namespace beginning with halide_ 4 | halide_* ; 5 | 6 | # Everything in Halide:: namespace (including nested namespace) 7 | # (Don't use _Z*6Halide as that can match things like std::sort() 8 | # with Halide types in the specialization) 9 | _Z?6Halide* ; 10 | _Z??6Halide* ; 11 | _Z???6Halide* ; 12 | # non-virtual thunks 13 | _ZThn???_N6Halide* ; 14 | 15 | local: *; 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /src/exported_symbols.osx: -------------------------------------------------------------------------------- 1 | # Everything at global namespace beginning with halide_ 2 | halide_* 3 | 4 | # Everything in Halide:: namespace (including nested namespace) 5 | __Z?6Halide* 6 | __Z??6Halide* 7 | __Z???6Halide* 8 | # non-virtual thunks 9 | __ZThn???_N6Halide* 10 | -------------------------------------------------------------------------------- /src/runtime/alignment_128.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" { 4 | 5 | WEAK_INLINE int halide_internal_malloc_alignment() { 6 | return 128; 7 | } 8 | } // extern "C" 9 | -------------------------------------------------------------------------------- /src/runtime/alignment_32.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" { 4 | 5 | WEAK_INLINE int halide_internal_malloc_alignment() { 6 | return 32; 7 | } 8 | } // extern "C" 9 | -------------------------------------------------------------------------------- /src/runtime/alignment_64.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" { 4 | 5 | WEAK_INLINE int halide_internal_malloc_alignment() { 6 | return 64; 7 | } 8 | } // extern "C" 9 | -------------------------------------------------------------------------------- /src/runtime/android_clock.cpp: -------------------------------------------------------------------------------- 1 | #ifdef BITS_64 2 | #define SYS_CLOCK_GETTIME 113 3 | #endif 4 | 5 | #ifdef BITS_32 6 | #define SYS_CLOCK_GETTIME 263 7 | #endif 8 | 9 | #include "linux_clock.cpp" 10 | -------------------------------------------------------------------------------- /src/runtime/android_host_cpu_count.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | extern long sysconf(int); 6 | 7 | WEAK int halide_host_cpu_count() { 8 | // Works for Android ARMv7. Probably bogus on other platforms. 9 | return sysconf(97); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/runtime/android_io.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | #define ANDROID_LOG_INFO 4 6 | 7 | extern int __android_log_print(int, const char *, const char *, ...); 8 | 9 | WEAK void halide_default_print(void *user_context, const char *str) { 10 | __android_log_print(ANDROID_LOG_INFO, "halide", "%s", str); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/runtime/arm_no_neon.ll: -------------------------------------------------------------------------------- 1 | ; TODO: add specializations for ARMv7 without NEON 2 | -------------------------------------------------------------------------------- /src/runtime/destructors.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | #include "printer.h" 3 | 4 | extern "C" { 5 | 6 | ALWAYS_INLINE __attribute__((used)) void call_destructor(void *user_context, void (*fn)(void *user_context, void *object), void **object, bool should_call) { 7 | void *o = *object; 8 | *object = nullptr; 9 | // Call the function 10 | if (o && should_call) { 11 | fn(user_context, o); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/runtime/fopen.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" void *fopen(const char *, const char *); 4 | 5 | extern "C" WEAK_INLINE void *halide_fopen(const char *filename, const char *type) { 6 | return fopen(filename, type); 7 | } 8 | -------------------------------------------------------------------------------- /src/runtime/fopen_lfs.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" void *fopen64(const char *, const char *); 4 | 5 | extern "C" WEAK_INLINE void *halide_fopen(const char *filename, const char *type) { 6 | return fopen64(filename, type); 7 | } 8 | -------------------------------------------------------------------------------- /src/runtime/fuchsia_host_cpu_count.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | uint32_t zx_system_get_num_cpus(void); 6 | 7 | WEAK int halide_host_cpu_count() { 8 | return (int)zx_system_get_num_cpus(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/runtime/fuchsia_yield.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | typedef int32_t zx_status_t; 4 | typedef int64_t zx_time_t; 5 | extern "C" zx_status_t zx_nanosleep(zx_time_t deadline); 6 | 7 | extern "C" WEAK void halide_thread_yield() { 8 | zx_nanosleep(0); 9 | } 10 | -------------------------------------------------------------------------------- /src/runtime/hexagon_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | #include "cpu_features.h" 3 | 4 | namespace Halide { 5 | namespace Runtime { 6 | namespace Internal { 7 | 8 | extern "C" WEAK int halide_get_cpu_features(CpuFeatures *features) { 9 | // Hexagon has no CPU-specific Features. 10 | return halide_error_code_success; 11 | } 12 | 13 | } // namespace Internal 14 | } // namespace Runtime 15 | } // namespace Halide 16 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/.gitignore: -------------------------------------------------------------------------------- 1 | !bin/*/* 2 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/arm-32-android/libhalide_hexagon_host.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/arm-32-android/libhalide_hexagon_host.so -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/arm-64-android/libhalide_hexagon_host.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/arm-64-android/libhalide_hexagon_host.so -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/host/libhalide_hexagon_host.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/host/libhalide_hexagon_host.so -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/v65/hexagon_sim_remote: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/v65/hexagon_sim_remote -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/v65/libhalide_hexagon_remote_skel.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/v65/libhalide_hexagon_remote_skel.so -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/bin/v65/libsim_qurt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/hexagon_remote/bin/v65/libsim_qurt.a -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/qurt/c11_stubs.cpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | 3 | // Hexagon-tools 8.0.06 and later are dependent on 2 additional symbols: 4 | // __cxa_finalize and __cxa_atexit 5 | // We are providing weak symbol definitions of the these functions. 6 | 7 | #include "HAP_farf.h" 8 | 9 | // #define FARF_LOW 1 // Enable debug output 10 | 11 | void __attribute__((weak)) __cxa_finalize() { 12 | FARF(LOW, "Finalizing\n"); 13 | return; 14 | } 15 | 16 | void __attribute__((weak)) __cxa_atexit() { 17 | FARF(LOW, "Atexiting\n"); 18 | return; 19 | } 20 | 21 | } // extern "C" 22 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/qurt/known_symbols.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_HEXAGON_REMOTE_KNOWN_SYMBOLS_H 2 | #define HALIDE_HEXAGON_REMOTE_KNOWN_SYMBOLS_H 3 | 4 | // Mapping between a symbol name and an address. 5 | struct known_symbol { 6 | const char *name; 7 | char *addr; 8 | }; 9 | 10 | // Look up a symbol in an array of known symbols. The map should be 11 | // terminated with a {NULL, NULL} known_symbol. 12 | void *lookup_symbol(const char *sym, const known_symbol *map); 13 | 14 | // Look up common symbols. 15 | void *get_known_symbol(const char *sym); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/qurt/log.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_HEXAGON_REMOTE_LOG_H 2 | #define HALIDE_HEXAGON_REMOTE_LOG_H 3 | 4 | void log_printf(const char *fmt, ...); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/qurt/nearbyint.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" { 4 | 5 | // Hexagon doesn't have an implementation of nearbyint/nearbyintf, so 6 | // we provide one here. This implementation is not great, nearbyint is 7 | // supposed to round to nearest even in the case of a tie. 8 | 9 | float nearbyintf(float x) { 10 | return floorf(x + 0.5f); 11 | } 12 | 13 | double nearbyint(double x) { 14 | return floor(x + 0.5); 15 | } 16 | 17 | } // extern "C" 18 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/qurt/sim_qurt.cpp: -------------------------------------------------------------------------------- 1 | #include "hexagon_standalone.h" 2 | 3 | extern "C" { 4 | 5 | // Provide an implementation of qurt to redirect to the appropriate 6 | // simulator calls. 7 | int qurt_hvx_lock(int mode) { 8 | SIM_ACQUIRE_HVX; 9 | if (mode == 0) { 10 | SIM_CLEAR_HVX_DOUBLE_MODE; 11 | } else { 12 | SIM_SET_HVX_DOUBLE_MODE; 13 | } 14 | return 0; 15 | } 16 | 17 | int qurt_hvx_unlock() { 18 | SIM_RELEASE_HVX; 19 | return 0; 20 | } 21 | 22 | } // extern "C" 23 | -------------------------------------------------------------------------------- /src/runtime/hexagon_remote/sim_protocol.h: -------------------------------------------------------------------------------- 1 | #ifndef SIM_PROTOCOL_H 2 | #define SIM_PROTOCOL_H 3 | 4 | namespace Message { 5 | enum { 6 | None = 0, 7 | Alloc, 8 | Free, 9 | LoadLibrary, 10 | GetSymbol, 11 | Run, 12 | ReleaseLibrary, 13 | Break, 14 | }; 15 | } 16 | 17 | #endif // SIM_PROTOCOL_H 18 | -------------------------------------------------------------------------------- /src/runtime/ios_io.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | #include "objc_support.h" 3 | 4 | extern "C" { 5 | 6 | WEAK void halide_default_print(void *user_context, const char *str) { 7 | void *pool = create_autorelease_pool(); 8 | ns_log_utf8_string(str); 9 | drain_autorelease_pool(pool); 10 | } 11 | 12 | } // extern "C" 13 | -------------------------------------------------------------------------------- /src/runtime/linux_aarch64_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #define LINUX 1 2 | #include "aarch64_cpu_features.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/linux_arm_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #define LINUX 1 2 | #include "arm_cpu_features.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/linux_host_cpu_count.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | extern long sysconf(int); 6 | 7 | WEAK int halide_host_cpu_count() { 8 | return sysconf(84); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/runtime/linux_yield.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" int sched_yield(); 4 | 5 | extern "C" WEAK void halide_thread_yield() { 6 | sched_yield(); 7 | } 8 | -------------------------------------------------------------------------------- /src/runtime/metal_objc_arm.cpp: -------------------------------------------------------------------------------- 1 | #define ARM_COMPILE 1 2 | #include "metal_objc_platform_dependent.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/metal_objc_x86.cpp: -------------------------------------------------------------------------------- 1 | #define X86_COMPILE 1 2 | #include "metal_objc_platform_dependent.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/mini_qurt_vtcm.h: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | 3 | extern void *HAP_request_VTCM(unsigned int size, unsigned int single_page_flag); 4 | extern int HAP_release_VTCM(void *pVA); 5 | } 6 | -------------------------------------------------------------------------------- /src/runtime/nvidia_libdevice_bitcode/libdevice.compute_20.10.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/nvidia_libdevice_bitcode/libdevice.compute_20.10.bc -------------------------------------------------------------------------------- /src/runtime/nvidia_libdevice_bitcode/libdevice.compute_30.10.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/nvidia_libdevice_bitcode/libdevice.compute_30.10.bc -------------------------------------------------------------------------------- /src/runtime/nvidia_libdevice_bitcode/libdevice.compute_35.10.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/src/runtime/nvidia_libdevice_bitcode/libdevice.compute_35.10.bc -------------------------------------------------------------------------------- /src/runtime/osx_aarch64_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #define OSX 1 2 | #include "aarch64_cpu_features.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/osx_arm_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #define OSX 1 2 | #include "arm_cpu_features.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/osx_host_cpu_count.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | extern long sysconf(int); 6 | 7 | WEAK int halide_host_cpu_count() { 8 | return sysconf(58); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/runtime/osx_yield.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | extern "C" int swtch_pri(int); 4 | 5 | extern "C" WEAK void halide_thread_yield() { 6 | swtch_pri(0); 7 | } 8 | -------------------------------------------------------------------------------- /src/runtime/posix_io.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | WEAK void halide_default_print(void *user_context, const char *str) { 6 | write(STDOUT_FILENO, str, strlen(str)); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/runtime/posix_threads_tsan.cpp: -------------------------------------------------------------------------------- 1 | #define TSAN_ANNOTATIONS 1 2 | 3 | #include "posix_threads.cpp" 4 | -------------------------------------------------------------------------------- /src/runtime/posix_timeval.h: -------------------------------------------------------------------------------- 1 | #ifndef _STRUCT_TIMEVAL 2 | #define _STRUCT_TIMEVAL 3 | 4 | #ifdef BITS_64 5 | struct timeval { 6 | int64_t tv_sec, tv_usec; 7 | }; 8 | #else 9 | struct timeval { 10 | int32_t tv_sec, tv_usec; 11 | }; 12 | #endif 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/runtime/prefetch.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | // These need to inline, otherwise the extern call with the ptr 6 | // parameter breaks a lot of optimizations, but needs to be WEAK 7 | // so that Codegen_LLVM can find an instance of the Function to insert. 8 | WEAK_INLINE int _halide_prefetch(const void *ptr) { 9 | constexpr int rw = 0; // 1 = write, 0 = read 10 | constexpr int locality = 0; // 0 = no temporal locality, 3 = high temporal locality 11 | __builtin_prefetch(ptr, rw, locality); 12 | return 0; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/runtime/profiler.cpp: -------------------------------------------------------------------------------- 1 | #define TIMER_PROFILING 0 2 | #include "profiler_common.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/qurt_hvx_vtcm.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntimeQurt.h" 2 | #include "mini_qurt.h" 3 | #include "mini_qurt_vtcm.h" 4 | #include "runtime_internal.h" 5 | 6 | using namespace Halide::Runtime::Internal::Qurt; 7 | 8 | extern "C" { 9 | 10 | WEAK void *halide_vtcm_malloc(void *user_context, int size) { 11 | return HAP_request_VTCM(size, 1); 12 | } 13 | 14 | WEAK void halide_vtcm_free(void *user_context, void *addr) { 15 | HAP_release_VTCM(addr); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/runtime/qurt_threads_tsan.cpp: -------------------------------------------------------------------------------- 1 | #define TSAN_ANNOTATIONS 1 2 | 3 | #include "qurt_threads.cpp" 4 | -------------------------------------------------------------------------------- /src/runtime/qurt_yield.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | // TODO: what should we use here??? 4 | 5 | extern "C" WEAK void halide_thread_yield() { 6 | } 7 | -------------------------------------------------------------------------------- /src/runtime/riscv_cpu_features.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | #include "cpu_features.h" 3 | 4 | namespace Halide { 5 | namespace Runtime { 6 | namespace Internal { 7 | 8 | extern "C" WEAK int halide_get_cpu_features(Halide::Runtime::Internal::CpuFeatures *features) { 9 | // For now, no version specific features, though RISCV promises to have many. 10 | return halide_error_code_success; 11 | } 12 | 13 | } // namespace Internal 14 | } // namespace Runtime 15 | } // namespace Halide 16 | -------------------------------------------------------------------------------- /src/runtime/timer_profiler.cpp: -------------------------------------------------------------------------------- 1 | #define TIMER_PROFILING 1 2 | #include "profiler_common.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/webgpu_dawn.cpp: -------------------------------------------------------------------------------- 1 | // TODO(https://github.com/halide/Halide/issues/7248): 2 | // 3 | // For now, we must build the webgpu runtime two ways: 4 | // - once for the native API (Dawn) 5 | // - once for the Emscripten API (Chrome) 6 | // 7 | // Once the API discrepancies are resolved we can 8 | // go back to building this in a sane manner, but for now, 9 | // we use this sad-but-effective approach. 10 | 11 | #define HALIDE_RUNTIME_WEBGPU_NATIVE_API 1 12 | #include "webgpu.cpp" 13 | -------------------------------------------------------------------------------- /src/runtime/webgpu_emscripten.cpp: -------------------------------------------------------------------------------- 1 | // TODO(https://github.com/halide/Halide/issues/7248): 2 | // 3 | // For now, we must build the webgpu runtime two ways: 4 | // - once for the native API (Dawn) 5 | // - once for the Emscripten API (Chrome) 6 | // 7 | // Once the API discrepancies are resolved we can 8 | // go back to building this in a sane manner, but for now, 9 | // we use this sad-but-effective approach. 10 | 11 | #define HALIDE_RUNTIME_WEBGPU_NATIVE_API 0 12 | #include "webgpu.cpp" 13 | -------------------------------------------------------------------------------- /src/runtime/windows_aarch64_cpu_features_arm.cpp: -------------------------------------------------------------------------------- 1 | #define WINDOWS 1 2 | #include "aarch64_cpu_features.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/windows_cuda.cpp: -------------------------------------------------------------------------------- 1 | #define WINDOWS 2 | #include "cuda.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/windows_io.cpp: -------------------------------------------------------------------------------- 1 | #include "HalideRuntime.h" 2 | 3 | extern "C" { 4 | 5 | WEAK void halide_default_print(void *user_context, const char *str) { 6 | write(STDOUT_FILENO, str, strlen(str)); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/runtime/windows_opencl.cpp: -------------------------------------------------------------------------------- 1 | #define WINDOWS 2 | #include "opencl.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/windows_profiler.cpp: -------------------------------------------------------------------------------- 1 | #define WINDOWS 2 | #include "profiler.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/windows_threads_tsan.cpp: -------------------------------------------------------------------------------- 1 | #define TSAN_ANNOTATIONS 1 2 | 3 | #include "windows_threads.cpp" 4 | -------------------------------------------------------------------------------- /src/runtime/windows_vulkan.cpp: -------------------------------------------------------------------------------- 1 | #define WINDOWS 2 | #include "vulkan.cpp" 3 | -------------------------------------------------------------------------------- /src/runtime/windows_yield.cpp: -------------------------------------------------------------------------------- 1 | #include "runtime_internal.h" 2 | 3 | #ifdef BITS_64 4 | #define WIN32API 5 | #else 6 | #define WIN32API __stdcall 7 | #endif 8 | 9 | extern "C" WIN32API int32_t Sleep(int32_t timeout); 10 | 11 | extern "C" WEAK void halide_thread_yield() { 12 | Sleep(0); 13 | } 14 | -------------------------------------------------------------------------------- /test/common/expect_failure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Simple bash script that will execute another process, which is *expected* to fail; 4 | # this is useful mainly for running test/error and other expected-to-fail tests. 5 | # 6 | 7 | echo Running "$1" 8 | 9 | if $1; then 10 | echo "Expected Failure from '$1', but got Success" 11 | exit 255 12 | fi 13 | 14 | echo "Success" 15 | exit 0 -------------------------------------------------------------------------------- /test/common/terminate_handler.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace Halide::Internal { 4 | 5 | extern void unhandled_exception_handler(); 6 | 7 | struct hl_set_terminate_handler { 8 | hl_set_terminate_handler() noexcept { 9 | #ifdef __cpp_exceptions 10 | std::set_terminate(::Halide::Internal::unhandled_exception_handler); 11 | #endif 12 | } 13 | }; 14 | 15 | hl_set_terminate_handler _terminate_handler{}; 16 | 17 | } // namespace Halide::Internal 18 | -------------------------------------------------------------------------------- /test/correctness/circular_reference_leak.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | // Recursive functions can create circular references. These could 9 | // cause leaks. Run this test under valgrind to check. 10 | for (int i = 0; i < 10000; i++) { 11 | Func f; 12 | Var x; 13 | RDom r(0, 10); 14 | f(x) = x; 15 | f(r) = f(r - 1) + f(r + 1); 16 | } 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/correctness/computed_index.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Buffer in1(256, 256); 7 | Buffer in2(256, 256, 10); 8 | 9 | Func f; 10 | Var x, y; 11 | 12 | f(x, y) = in2(x, y, clamp(in1(x, y), 0, 9)); 13 | Buffer out = f.realize({256, 256}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/correctness/explicit_inline_reductions.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"); 8 | Var x("x"), y("y"); 9 | RDom r1(0, 10, "r1"), r2(0, 10, "r2"), r3(0, 10, "r3"); 10 | 11 | f(x, y) = product(sum(r1, r1 + r3) + sum(r2, r2 * 2 + r3)); 12 | f(r1, y) += product(r3, sum(r2, r1 + r2 + r3)); 13 | 14 | Buffer result = f.realize({10, 10}); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/correctness/many_updates.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | const int N = 20; 8 | 9 | Func f; 10 | Var x, y; 11 | f(x, y) = x + y; 12 | for (int i = 0; i < N; i++) { 13 | f(x, i) += 1; 14 | f(i, y) += 1; 15 | } 16 | f.compute_root(); 17 | 18 | Buffer im = f.realize({N, N}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/correctness/non_vector_aligned_embeded_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | char storage[5 * sizeof(int32_t)]{0}; 8 | char *ptr = storage; 9 | ptr += sizeof(int32_t); 10 | Buffer foo((int32_t *)(ptr), 4); 11 | 12 | Func f; 13 | Var x; 14 | 15 | f(x) = foo(x); 16 | f.vectorize(x, 4); 17 | f.output_buffer().dim(0).set_min(0); 18 | auto result = f.realize({4}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/correctness/parallel.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x; 8 | Func f; 9 | 10 | Param k; 11 | k.set(3); 12 | 13 | f(x) = x * k; 14 | 15 | f.parallel(x); 16 | 17 | Buffer im = f.realize({16}); 18 | 19 | for (int i = 0; i < 16; i++) { 20 | if (im(i) != i * 3) { 21 | printf("im(%d) = %d\n", i, im(i)); 22 | return 1; 23 | } 24 | } 25 | 26 | printf("Success!\n"); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /test/correctness/plain_c_includes.c: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | #error "This test must be compiled as plain C, without C++ enabled." 3 | #endif 4 | 5 | #include 6 | 7 | // Verify that all HalideRuntime*.h files can be compiled without C++ 8 | #include "HalideRuntime.h" 9 | #include "HalideRuntimeCuda.h" 10 | #include "HalideRuntimeHexagonHost.h" 11 | #include "HalideRuntimeMetal.h" 12 | #include "HalideRuntimeOpenCL.h" 13 | #include "HalideRuntimeQurt.h" 14 | 15 | int main(int argc, char **argv) { 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/correctness/shared_self_references.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | // Check that recursive references get tracked properly 8 | { 9 | Func f; 10 | Var x; 11 | f(x) = x; 12 | { 13 | Expr e = f(2); 14 | f(0) = e; 15 | f(1) = e; 16 | } // Destroy e 17 | } // Destroy f 18 | 19 | // f should have been cleaned up. valgrind will complain if it 20 | // hasn't been. 21 | 22 | printf("Success!\n"); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/correctness/simplified_away_embedded_image.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | // What happens if an emedded image gets simplified away? 9 | Buffer input(32, 32); 10 | 11 | Var x("x"), y("y"); 12 | Func foo("foo"); 13 | 14 | foo(x, y) = input(x, y) - input(x, y); 15 | 16 | Buffer output(32, 32); 17 | 18 | foo.realize(output); 19 | 20 | // Any non-error is a success. 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/correctness/split_reuse_inner_name_bug.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x("x"), x0, x1, x2, x3; 8 | Func f("f"); 9 | 10 | f(x) = 1; 11 | f.compute_root().split(x, x0, x, 16).split(x, x, x1, 2).split(x, x2, x, 4).split(x, x, x3, 2); 12 | f.realize({1024}); 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/correctness/transitive_bounds.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f, g; 8 | Var x; 9 | f(x) = x; 10 | g(x) = f(x); 11 | 12 | g.bound(x, 0, 4); 13 | 14 | // Should be ok to unroll x because it's bounded by a constant in its only consumer 15 | f.compute_root().unroll(x); 16 | 17 | g.realize({4}); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/correctness/two_vector_args.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | Func f, g; 9 | Var x, y; 10 | 11 | g(x, y) = x + y; 12 | 13 | f(x, y) = g(x, x); 14 | 15 | f.vectorize(x, 4); 16 | 17 | Buffer out = f.realize({4, 4}); 18 | 19 | printf("Success!\n"); 20 | 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/correctness/update_chunk.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | // This test computes a function within the update step of a reduction 8 | 9 | Func f, g; 10 | Var x, y, z; 11 | RDom r(0, 10); 12 | 13 | f(x, y) = x * y; 14 | g(x, y) = 0; 15 | g(x, r) = f(r, x) + 1; 16 | 17 | f.compute_at(g, r); 18 | g.realize({10, 10}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/correctness/vector_print_bug.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | f(x) = print(x); 9 | f.vectorize(x, 4); 10 | f.realize({8}); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/atomics_self_reference.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | RDom r(0, 100); 9 | 10 | f(x) = 0; 11 | f(clamp(f(r), 0, 100)) = f(r) + 1; 12 | 13 | f.compute_root(); 14 | f.update() 15 | .atomic(true /* override_associativity_test */) 16 | .parallel(r); 17 | 18 | // f references itself on the index, making the atomic illegal. 19 | Realization out = f.realize({100}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/autodiff_unbounded.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Buffer b(10); 8 | Func f("f"), g("g"); 9 | Var x("x"); 10 | Buffer h(10); 11 | RDom r(h); 12 | 13 | f(x) = b(clamp(x, 0, 10)); 14 | g() += f(h(r)); 15 | Derivative d = propagate_adjoints(g); // access to f is unbounded 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/bad_bound.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = 0; 11 | f.bound(y, 0, 10); 12 | 13 | printf("Success!\n"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/error/bad_bound_storage.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"); 8 | Var x("x"), y("y"); 9 | 10 | f(x, y) = x + y; 11 | g(x, y) = f(x, y) * 2; 12 | 13 | f.compute_at(g, y); 14 | f.bound_storage(x, 9); 15 | g.realize({10, 10}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/bad_compute_with.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"); 8 | Var x("x"), y("y"); 9 | 10 | f(x, y) = x + y; 11 | f(x, y) += 2; 12 | f.update(0).compute_with(f, x); 13 | 14 | f.realize({10, 10}); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/bad_const_cast.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | 10 | // The 256 here would be implicitly cast to uint8, and converted to 11 | // zero. That's bad. So we check for that inside IROperator.cpp. 12 | f(x) = cast(x) % 256; 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/bad_device_api.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t("host"); 8 | (void)get_device_interface_for_device_api((DeviceAPI)-1, t, "Bad DeviceAPI"); 9 | 10 | printf("Success!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/error/bad_dimensions.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | ImageParam im(UInt(8), 2); 8 | 9 | Var x, y; 10 | Func f; 11 | 12 | f(x, y) = im(x, y); 13 | 14 | Buffer b(10, 10, 3); 15 | im.set(b); 16 | 17 | f.realize({10, 10}); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/bad_extern_split.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | f.define_extern("test", {}, Int(32), {x}); 10 | Var xo; 11 | f.split(x, xo, x, 8).reorder(xo, x); 12 | 13 | f.compile_jit(); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/bad_fold.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y, c; 8 | 9 | Func f, g; 10 | 11 | f(x, y) = x; 12 | g(x, y) = f(x - 1, y + 1) + f(x, y - 1); 13 | f.store_root().compute_at(g, y).fold_storage(y, 2); 14 | 15 | Buffer im = g.realize({100, 1000}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/bad_hoist_storage.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"), h("h"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | h(x, y) = g(x); 13 | 14 | g.compute_at(h, y); 15 | 16 | // This makes no sense, because the compute_at level is higher than the hoist_storage level 17 | f.hoist_storage(h, y).compute_root(); 18 | 19 | h.realize({10, 10}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/bad_host_alignment.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | IRPrinter irp(std::cerr); 8 | int main(int argc, char **argv) { 9 | Func f; 10 | Var x, y; 11 | ImageParam in(UInt(8), 2); 12 | 13 | Buffer param_buf(11, 10); 14 | param_buf.crop(0, 1, 10); 15 | 16 | in.set_host_alignment(512); 17 | f(x, y) = in(x, y); 18 | f.compute_root(); 19 | 20 | in.set(param_buf); 21 | Buffer result = f.realize({10, 10}); 22 | 23 | printf("Success!\n"); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /test/error/bad_partition_always.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"); 8 | Var x("x"); 9 | 10 | f(x) = 0; 11 | f.partition(x, Partition::Always); 12 | 13 | f.realize({10}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/bad_prefetch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | #include 5 | 6 | using namespace Halide; 7 | 8 | int main(int argc, char **argv) { 9 | Func f("f"), g("g"); 10 | Var x("x"), y("y"); 11 | 12 | f(x, y) = x + y; 13 | g(x, y) = f(0, 0); 14 | 15 | f.compute_root(); 16 | g.prefetch(f, y, x, 8); 17 | g.print_loop_nest(); 18 | 19 | Module m = g.compile_to_module({}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/bad_reorder.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y, xi; 8 | 9 | Func f; 10 | 11 | f(x, y) = x; 12 | 13 | f 14 | .split(x, x, xi, 8) 15 | .reorder(x, y, x); 16 | 17 | // Oops, probably meant "xi" rather than x in the reorder call 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/bad_reorder_storage.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y, xi; 8 | 9 | Func f; 10 | 11 | f(x, y) = x; 12 | 13 | f.reorder_storage(x, y, x); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/bad_ring_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"), h("h"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | h(x, y) = g(x); 13 | 14 | g.compute_at(h, y); 15 | 16 | // ring_buffer() requires an explicit hoist_storage(). 17 | f.compute_root().ring_buffer(2); 18 | 19 | h.realize({10, 10}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/bad_rvar_order.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | RDom r1(0, 10, 0, 10); 8 | 9 | Func f("f"); 10 | Var x, y; 11 | f(x, y) = x + y; 12 | f(r1.x, r1.y) += f(r1.y, r1.x); 13 | 14 | // It's not permitted to change the relative ordering of reduction 15 | // domain variables when it could change the meaning. 16 | f.update().reorder(r1.y, r1.x); 17 | 18 | f.realize({10, 10}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/bad_schedule.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f, g; 8 | Var x, y; 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | 13 | // f is inlined, so this schedule is bad. 14 | f.vectorize(x, 4); 15 | 16 | g.realize({10}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/bad_store_at.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"), h("h"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | h(x, y) = g(x); 13 | 14 | g.compute_at(h, y); 15 | 16 | // This makes no sense, because the compute_at level is higher than the store_at level 17 | f.store_at(h, y).compute_root(); 18 | 19 | h.realize({10, 10}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/buffer_larger_than_two_gigs.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | #ifdef NDEBUG 5 | #error "buffer_larger_than_two_gigs requires assertions" 6 | #endif 7 | 8 | using namespace Halide; 9 | int main(int argc, char **argv) { 10 | if (sizeof(void *) == 8) { 11 | Buffer result(1 << 24, 1 << 24, 1 << 24); 12 | } else { 13 | Buffer result(1 << 12, 1 << 12, 1 << 8); 14 | } 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/clamp_out_of_range.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x; 8 | Func f; 9 | 10 | f(x) = clamp(cast(x), 0, 255); 11 | Buffer<> result = f.realize({42}); 12 | 13 | printf("Success!\n"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/error/compute_with_crossing_edges1.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x("x"), y("y"); 8 | Func f("f"), g("g"); 9 | 10 | f(x, y) = x + y; 11 | f(x, y) += 1; 12 | f(x, y) += 1; 13 | 14 | g(x, y) = x - y; 15 | 16 | f.compute_root(); 17 | g.compute_root(); 18 | 19 | f.compute_with(g, y); 20 | f.update(1).compute_with(g, y); 21 | 22 | Pipeline p({f, g}); 23 | p.realize({200, 200}); 24 | 25 | printf("Success!\n"); 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /test/error/compute_with_crossing_edges2.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x("x"), y("y"); 8 | Func f("f"), g("g"); 9 | 10 | f(x, y) = x + y; 11 | f(x, y) += 1; 12 | 13 | g(x, y) = x - y; 14 | g(x, y) += 1; 15 | 16 | f.compute_root(); 17 | g.compute_root(); 18 | 19 | f.compute_with(g.update(0), y); 20 | f.update(0).compute_with(g, y); 21 | 22 | Pipeline p({f, g}); 23 | p.realize({200, 200}); 24 | 25 | printf("Success!\n"); 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /test/error/constrain_wrong_output_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | f(x) = Tuple(x, sin(x)); 10 | 11 | // Don't do this. Instead constrain the size of output buffer 0. 12 | f.output_buffers()[1].dim(0).set_min(4); 13 | 14 | f.compile_jit(); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/constraint_uses_non_param.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f, g; 7 | Var x, y; 8 | f(x, y) = 0; 9 | g(x, y) = f(x, y); 10 | Pipeline p(g); 11 | 12 | // This can't possibly be a precondition 13 | p.add_requirement(x == 4 && f(3, 2) == 5); 14 | 15 | p.realize({100, 100}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/define_after_realize.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f, g; 8 | Var x; 9 | 10 | f(x) = x; 11 | 12 | Buffer im = f.realize({10}); 13 | 14 | // Now try to add an update definition to f 15 | f(x) += 1; 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/define_after_use.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f, g; 8 | Var x; 9 | 10 | f(x) = x; 11 | g(x) = f(x) + 1; 12 | 13 | // Now try to add an update definition to f 14 | f(x) += 1; 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/device_dirty_with_no_device_support.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Buffer im(128, 128); 7 | 8 | Func f; 9 | Var x, y; 10 | f(x, y) = im(x, y); 11 | 12 | im.set_device_dirty(true); 13 | 14 | // Explicitly don't use device support 15 | f.realize({128, 128}, Target{"host"}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/device_target_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t("host"); 8 | (void)get_device_interface_for_device_api(DeviceAPI::CUDA, t, "Device Target Mistmatch Test"); 9 | 10 | printf("Success!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/error/extern_func_self_argument.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | extern "C" int extern_func() { 6 | return 0; 7 | } 8 | 9 | int main(int argc, char **argv) { 10 | Func f("f"); 11 | 12 | f.define_extern("extern_func", {f}, Int(32), 2); 13 | f.infer_arguments(); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/float_arg.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | Func f; 9 | Var x, y; 10 | f(x, y) = 3 * x + y; 11 | 12 | // Should result in an error 13 | Func g; 14 | g(x) = f(f(x, 3) * 17.0f, 3); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/forward_on_undefined_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | const Buffer<> foo; 8 | foo.raw_buffer(); 9 | 10 | printf("Success!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/error/func_expr_dim_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f(Int(32), 1, "f"); 10 | 11 | f(x, y) = cast(0); 12 | 13 | f.realize({100, 100}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/func_expr_type_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f(Float(32), 1, "f"); 10 | 11 | f(x, y) = cast(0); 12 | 13 | f.realize({100, 100}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/func_expr_update_type_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f(Float(32), 2, "f"); 10 | 11 | f(x, y) = 0.f; 12 | f(x, y) = cast(0); 13 | 14 | f.realize({100, 100}); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/func_extern_dim_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f(Float(32), 1, "f"); 10 | f.define_extern("test", {}, Float(32), {x, y}); 11 | f.realize({100, 100}); 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/func_extern_type_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f({UInt(8), Float(64)}, 2, "f"); 10 | f.define_extern("test", {}, {Int(32), Float(32)}, {x, y}); 11 | f.realize({100, 100}); 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/func_tuple_dim_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f({Int(32), Float(32)}, 1, "f"); 10 | 11 | f(x, y) = {cast(0), cast(0)}; 12 | 13 | f.realize({100, 100}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/func_tuple_types_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f({UInt(8), Float(64)}, 2, "f"); 10 | 11 | f(x, y) = {cast(0), cast(0)}; 12 | 13 | f.realize({100, 100}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/func_tuple_update_types_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"), y("y"); 9 | Func f({UInt(8), Float(64)}, 2, "f"); 10 | 11 | f(x, y) = {cast(0), cast(0)}; 12 | f(x, y) = {cast(0), cast(0)}; 13 | 14 | f.realize({100, 100}); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/hoist_storage_without_compute_at.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"), h("h"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | h(x, y) = g(x); 13 | 14 | g.hoist_storage(h, y); 15 | 16 | h.realize({10, 10}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/impossible_constraints.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | ImageParam input(Float(32), 2, "in"); 8 | 9 | Func out("out"); 10 | 11 | // The requires that the input be larger than the input 12 | out() = input(input.width(), input.height()) + input(0, 0); 13 | 14 | out.infer_input_bounds({}); 15 | 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/incomplete_target.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t("debug"); 8 | 9 | printf("Success!\n"); 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /test/error/init_def_should_be_all_vars.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Buffer in(10, 10); 8 | 9 | Func f("f"); 10 | RDom r(0, in.width(), 0, in.height()); 11 | f(r.x, r.y) = in(r.x, r.y) + 2; 12 | f.realize({in.width(), in.height()}); 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/inspect_loop_level.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | LoopLevel root = LoopLevel::root(); 8 | 9 | printf("LoopLevel is %s\n", root.to_string().c_str()); // should fail 10 | 11 | printf("Success!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/error/lerp_float_weight_out_of_range.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | // This should trigger an error. 9 | Func f; 10 | f() = lerp(0, 42, 1.5f); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/lerp_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | // This should trigger an error. 9 | Func f; 10 | f() = lerp(cast(0), cast(42), 0.5f); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/lerp_signed_weight.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | // This should trigger an error. 9 | Func f; 10 | f() = lerp(cast(0), cast(42), cast(16)); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/memoize_redefine_eviction_key.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Param val; 8 | 9 | Func f, g; 10 | Var x, y; 11 | 12 | f(x, y) = val + cast(x); 13 | g(x, y) = f(x, y) + f(x - 1, y) + f(x + 1, y); 14 | 15 | f.compute_root().memoize(EvictionKey(42)); 16 | f.compute_root().memoize(EvictionKey(1764)); 17 | 18 | val.set(23.0f); 19 | Buffer out = g.realize({128, 128}); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/missing_args.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | ImageParam im(Int(8), 2); 10 | Param arg; 11 | 12 | f(x) = im(x, x) + arg; 13 | 14 | std::vector args; 15 | // args.push_back(im); 16 | // args.push_back(arg); 17 | f.compile_to_object("f.o", args, "f"); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/no_default_device.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t("host"); 8 | (void)get_device_interface_for_device_api(DeviceAPI::Default_GPU, t, "No Default Device Test"); 9 | 10 | printf("Success!\n"); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /test/error/nonexistent_update_stage.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | f(x) = x; 10 | f.update().vectorize(x, 4); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/overflow_during_constant_folding.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | f(x) = Expr(0x12345678) * Expr(0x76543210); 9 | 10 | f.realize({10}); 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/pointer_arithmetic.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Param p; 8 | p.set("Hello, world!\n"); 9 | 10 | Func f; 11 | Var x; 12 | // Should error out during match_types 13 | f(x) = p + 2; 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/predicate_loads_used_in_inner_splits.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x, xo, xi, xio, xii; 8 | f(x) = x; 9 | f.split(x, xo, xi, 2, TailStrategy::Auto) 10 | .split(xi, xio, xii, 4, TailStrategy::PredicateLoads) 11 | .reorder(xo, xio, xii); 12 | 13 | printf("Success!\n"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/error/race_condition.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | Func f, g; 9 | Var x, y; 10 | 11 | f(x, y) = 0; 12 | 13 | RDom r(0, 10, 0, 10); 14 | f(r.x, r.y) += f(r.y, r.x); 15 | 16 | // This schedule should be forbidden, because it causes a race condition. 17 | f.update().parallel(r.y); 18 | 19 | // We shouldn't reach here, because there should have been a compile error. 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/rdom_undefined.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Expr undef_min, undef_extent; 8 | 9 | // This should assert-fail 10 | RDom r(undef_min, undef_min); 11 | 12 | // Just to ensure compiler doesn't optimize-away the RDom ctor 13 | printf("Dimensions: %d\n", r.dimensions()); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/rdom_where_races.cpp: -------------------------------------------------------------------------------- 1 | // https://github.com/halide/Halide/issues/6808 2 | #include "Halide.h" 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | Func f; 9 | Var x; 10 | 11 | RDom r(0, 10); 12 | f(x) = 1; 13 | r.where(f(0) == 1); 14 | f(r) = 2; 15 | 16 | f.update().parallel(r); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/realization_with_too_many_outputs.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | Func f; 9 | Var x; 10 | f(x) = 42; 11 | 12 | // Should result in an error 13 | Buffer first(10); 14 | Buffer second(10); 15 | 16 | Realization r({first, second}); 17 | f.realize(r); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/reduction_bounds.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"); 8 | Var x("x"); 9 | RDom r(0, 100, "r"); 10 | 11 | f(x) = x; 12 | 13 | g(x) = 0; 14 | g(x) = f(g(x - 1)) + r; 15 | 16 | f.compute_at(g, r.x); 17 | 18 | // Use of f is unbounded in g. 19 | 20 | g.realize({100}); 21 | 22 | printf("Success!\n"); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/error/reduction_type_mismatch.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x; 8 | Func f; 9 | RDom dom(0, 50); 10 | 11 | f(x) = cast(0); // The type here... 12 | f(dom) += 1.0f; // does not match the type here. 13 | 14 | // Should result in an error 15 | Buffer result = f.realize({50}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/reuse_var_in_schedule.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | 9 | f(x) = x; 10 | 11 | Var xo, xi; 12 | f.split(x, xo, xi, 4).split(xo, xo, xi, 4); 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/reused_args.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | // You can't use the same variable more than once in the LHS of a 9 | // pure definition. 10 | f(x, x) = x; 11 | 12 | printf("Success!\n"); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /test/error/round_up_and_blend_race.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | Func f; 9 | Var x; 10 | 11 | f(x) = 0; 12 | f(x) += 4; 13 | 14 | // This schedule should be forbidden, because it causes a race condition. 15 | Var xo, xi; 16 | f.update() 17 | .split(x, xo, xi, 8, TailStrategy::RoundUp) 18 | .vectorize(xi, 16, TailStrategy::RoundUpAndBlend) // Access beyond the end of each slice 19 | .parallel(xo); 20 | 21 | printf("Success!\n"); 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /test/error/shift_inwards_and_blend_race.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | 8 | Func f; 9 | Var x; 10 | 11 | f(x) = 0; 12 | f(x) += 4; 13 | 14 | // This schedule should be forbidden, because it causes a race condition. 15 | f.update().vectorize(x, 8, TailStrategy::ShiftInwardsAndBlend).parallel(x); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/specialize_fail.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x; 8 | Param p; 9 | 10 | Func f; 11 | f(x) = x; 12 | f.specialize(p == 0).vectorize(x, 8); 13 | f.specialize_fail("Expected failure"); 14 | 15 | p.set(42); // arbitrary nonzero value 16 | f.realize({100}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/split_inner_wrong_tail_strategy.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | f(x) = x; 9 | f(x) += 1; 10 | Var xo, xi, xio, xii; 11 | // Would redundantly redo some +=1, and create incorrect output. 12 | f.compute_root(); 13 | f.update().split(x, xo, xi, 8).split(xi, xio, xii, 9, TailStrategy::RoundUp); 14 | 15 | Func g; 16 | g(x) = f(x); 17 | g.realize({10}); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/split_non_innermost_predicated.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | f(x) = x; 9 | Var xo, xi, xio, xii; 10 | // We don't support predicated splits that aren't the innermost loop. 11 | f.compute_root().split(x, xo, xi, 8, TailStrategy::PredicateStores).split(xi, xio, xii, 9); 12 | 13 | Func g; 14 | g(x) = f(x); 15 | g.realize({10}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/split_same_var_names.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Var x; 7 | Func f; 8 | f(x) = x; 9 | f.split(x, x, x, 16, TailStrategy::RoundUp); 10 | 11 | printf("Success!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /test/error/store_at_without_compute_at.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"), h("h"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | h(x, y) = g(x); 13 | 14 | g.store_at(h, y); 15 | 16 | h.realize({10, 10}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/thread_id_outside_block_id.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t = get_jit_target_from_environment(); 8 | t.set_feature(Target::CUDA); 9 | 10 | Func f; 11 | Var x; 12 | f(x) = x; 13 | Var xo, xi; 14 | f.gpu_tile(x, xo, xi, 16).reorder(xo, xi); 15 | 16 | f.compile_jit(t); 17 | Buffer result = f.realize({16}); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/too_many_args.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y; 8 | 9 | Func one_arg; 10 | one_arg(x) = x * 2; // One argument 11 | 12 | Func bad_call; 13 | bad_call(x, y) = one_arg(x, y); // Called with two 14 | 15 | // Should result in an error 16 | Buffer result = bad_call.realize({256, 256}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/treat_rvar_as_var.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | Func f; 9 | Var x, y; 10 | 11 | RDom r(0, 10); 12 | f(x, y) += r; 13 | 14 | // Sneakily disguising an RVar as a Var by reusing the name should result in 15 | // an error. Otherwise it can permit schedules that aren't legal. 16 | Var xo, xi; 17 | f.update().split(Var(r.x.name()), xo, xi, 8, TailStrategy::RoundUp); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/tuple_realization_to_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | 9 | f(x) = {x, x, x}; 10 | 11 | Buffer buf = f.realize({1024}); 12 | 13 | printf("Success!\n"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/error/tuple_val_select_undef.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | using namespace Halide::Internal; 6 | 7 | int main(int argc, char **argv) { 8 | Var x("x"); 9 | Func f("f"); 10 | 11 | // Should result in an error 12 | f(x) = {x, select(x < 20, 20 * x, undef())}; 13 | f.realize({10}); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/unbounded_input.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x, y; 9 | 10 | ImageParam in(Float(32), 2); 11 | ImageParam x_coord(Int(32), 2); 12 | ImageParam y_coord(Int(32), 2); 13 | 14 | f(x, y) = in(x_coord(x, y), y_coord(x, y)); 15 | 16 | f.compile_jit(); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/unbounded_output.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x, y; 9 | 10 | ImageParam in(Float(32), 2); 11 | ImageParam x_coord(Int(32), 2); 12 | ImageParam y_coord(Int(32), 2); 13 | 14 | f(x, y) = 0.0f; 15 | RDom r(0, 100, 0, 100); 16 | f(x_coord(r.x, r.y), y_coord(r.x, r.y)) += in(r.x, r.y); 17 | 18 | f.compile_jit(); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/undefined_func_compile.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include "halide_test_dirs.h" 3 | 4 | #include 5 | 6 | using namespace Halide; 7 | 8 | int main(int argc, char **argv) { 9 | Func f("f"); 10 | 11 | std::string test_object = Internal::get_test_tmp_dir() + "compile_undefined.o"; 12 | f.compile_to_object(test_object, {}, "f"); 13 | 14 | // We shouldn't reach here, because there should have been a compile error. 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/undefined_func_realize.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include "halide_test_dirs.h" 3 | 4 | #include 5 | 6 | using namespace Halide; 7 | 8 | int main(int argc, char **argv) { 9 | Func f("f"); 10 | 11 | Buffer result = f.realize({100, 5, 3}); 12 | 13 | // We shouldn't reach here, because there should have been a compile error. 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/undefined_loop_level.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | LoopLevel undefined; 8 | 9 | Var x; 10 | Func f, g; 11 | f(x) = x; 12 | g(x) = f(x); 13 | f.compute_at(undefined); 14 | g.compute_root(); 15 | 16 | // Trying to lower/realize with an undefined LoopLevel should be fatal 17 | Buffer result = g.realize({1}); 18 | 19 | printf("Success!\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/error/undefined_pipeline_compile.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include "halide_test_dirs.h" 3 | 4 | #include 5 | 6 | using namespace Halide; 7 | 8 | int main(int argc, char **argv) { 9 | Func f("f"); 10 | 11 | Pipeline p(f); 12 | std::string test_object = Internal::get_test_tmp_dir() + "compile_undefined.o"; 13 | p.compile_to_object(test_object, {}, "f"); 14 | 15 | // We shouldn't reach here, because there should have been a compile error. 16 | printf("Success!\n"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /test/error/undefined_pipeline_realize.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | #include 4 | 5 | using namespace Halide; 6 | 7 | int main(int argc, char **argv) { 8 | Func f("f"); 9 | 10 | Pipeline p(f); 11 | Buffer result = p.realize({100, 5, 3}); 12 | 13 | // We shouldn't reach here, because there should have been a compile error. 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/uninitialized_param.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | ImageParam image_param(Int(32), 2, "image_param"); 8 | Param scalar_param("scalar_param"); 9 | 10 | Var x("x"), y("y"); 11 | Func f("f"); 12 | 13 | f(x, y) = image_param(x, y) + scalar_param; 14 | 15 | Buffer b(10, 10); 16 | image_param.set(b); 17 | 18 | f.realize({10, 10}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/unknown_target.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Target t; 8 | 9 | // Calling natural_vector_size() on a Target with Unknown fields 10 | // should generate user_error. 11 | (void)t.natural_vector_size(); 12 | 13 | printf("Success!\n"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/error/vector_tile.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | // Test reporting of mismatched sizes error in vector-of-strategies variant 8 | Var i, j; 9 | 10 | Func f; 11 | f(i, j) = i * j; 12 | 13 | Var io, jo; 14 | // Should result in an error 15 | // Bad because the vector lengths don't match 16 | f.tile({i, j}, {io, jo}, {i, j}, {8, 8}, {TailStrategy::RoundUp, TailStrategy::RoundUp, TailStrategy::RoundUp}); 17 | 18 | printf("Success!\n"); 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /test/error/vectorize_too_little.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y; 8 | 9 | Buffer input(5, 5); 10 | Func f; 11 | f(x, y) = input(x, y) * 2; 12 | f.vectorize(x, 0); 13 | 14 | // Should result in an error 15 | Buffer out = f.realize({5, 5}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/vectorize_too_much.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Var x, y; 8 | 9 | Buffer input(5, 5); 10 | Func f; 11 | f(x, y) = input(x, y) * 2; 12 | f.vectorize(x, 8).vectorize(y, 8); 13 | 14 | // Should result in an error 15 | Buffer out = f.realize({5, 5}); 16 | 17 | printf("Success!\n"); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/error/vectorized_extern.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | f.define_extern("test", {}, Int(32), {x}); 10 | Var xo; 11 | f.split(x, xo, x, 8).vectorize(xo); 12 | 13 | f.compile_jit(); 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/wrap_custom_after_shared.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g1("g1"), g2("g2"), g3("g3"), g4("g4"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g1(x, y) = f(x); 12 | g2(x, y) = f(x); 13 | g3(x, y) = f(x); 14 | 15 | // It's not valid to call f.in(g1) after defining a shared wrapper for 16 | // {g1, g2, g3} 17 | Func wrapper1 = f.in({g1, g4, g3}); 18 | Func wrapper2 = f.in(g3); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/wrap_frozen.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f("f"), g("g"); 8 | Var x("x"), y("y"); 9 | 10 | f(x) = x; 11 | g(x) = f(x); 12 | Func wrapper = f.in(g); 13 | wrapper(x) += 1; 14 | 15 | printf("Success!\n"); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/error/wrapper_never_used.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | using namespace Halide::Internal; 5 | 6 | int main() { 7 | Var x("x"), y("y"); 8 | Func f("f"), g("g"), h("h"); 9 | f(x, y) = x + y; 10 | g(x, y) = 5; 11 | h(x, y) = f(x, y) + g(x, y); 12 | 13 | f.compute_root(); 14 | f.in(g).compute_root(); 15 | 16 | // This should cause an error since f.in(g) was called but 'f' is 17 | // never used in 'g'. 18 | h.realize({5, 5}); 19 | 20 | printf("Success!\n"); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/error/wrong_dimensionality_extern_stage.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f, g; 7 | Var x, y; 8 | 9 | g.define_extern("foo", {}, UInt(16), 3); 10 | 11 | // Show throw an error immediately because g was defined with 3 dimensions. 12 | f(x, y) = cast(g(x, y)); 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/error/wrong_type.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | using namespace Halide; 3 | 4 | #ifdef NDEBUG 5 | #error "wrong_type requires assertions" 6 | #endif 7 | 8 | int main(int argc, char **argv) { 9 | Func f; 10 | Var x; 11 | f(x) = x; 12 | Buffer im = f.realize({100}); 13 | 14 | printf("Success!\n"); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/failing_with_issue/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | tests(GROUPS failing_with_issue 2 | SOURCES 3 | 3292_async_specialize.cpp 4 | 3293_storage_folding_async.cpp 5 | 3357_vectorize_pred.cpp 6 | 4283_store_at_gpu.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /test/fuzz/fuzz_helpers.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_FUZZ_HELPERS_H_ 2 | #define HALIDE_FUZZ_HELPERS_H_ 3 | 4 | #include "fuzzer/FuzzedDataProvider.h" 5 | #include 6 | 7 | namespace Halide { 8 | 9 | template 10 | inline T pick_value_in_vector(FuzzedDataProvider &fdp, std::vector &vec) { 11 | return vec[fdp.ConsumeIntegralInRange(0, vec.size() - 1)]; 12 | } 13 | } // namespace Halide 14 | 15 | #endif // HALIDE_FUZZ_HELPERS_H_ -------------------------------------------------------------------------------- /test/generator/can_use_target_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | namespace { 4 | 5 | class CanUseTarget : public Halide::Generator { 6 | public: 7 | Output> output{"output"}; 8 | 9 | // Current really just a placeholder: can_use_target_aottest.cpp just 10 | // needs to test the runtime itself, not the generator function. 11 | void generate() { 12 | Var x, y; 13 | output(x, y) = cast((int32_t)0xdeadbeef); 14 | } 15 | }; 16 | 17 | } // namespace 18 | 19 | HALIDE_REGISTER_GENERATOR(CanUseTarget, can_use_target) 20 | -------------------------------------------------------------------------------- /test/generator/cxx_mangling_externs.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // These are the HalideExtern functions referenced by cxx_mangling_generator.cpp 4 | int32_t extract_value_global(int32_t *arg) { 5 | return *arg; 6 | } 7 | 8 | namespace HalideTest { 9 | 10 | int32_t extract_value_ns(const int32_t *arg) { 11 | return *arg; 12 | } 13 | 14 | } // namespace HalideTest 15 | -------------------------------------------------------------------------------- /test/generator/float16_t_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | class Float16T : public Halide::Generator { 4 | public: 5 | Output> output{"output"}; 6 | 7 | void generate() { 8 | // Currently the float16 aot test just exercises the 9 | // runtime. More interesting code may go here in the future. 10 | Var x; 11 | output(x) = x; 12 | } 13 | }; 14 | 15 | HALIDE_REGISTER_GENERATOR(Float16T, float16_t) 16 | -------------------------------------------------------------------------------- /test/generator/gpu_object_lifetime_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | namespace { 4 | 5 | class GpuObjectLifetime : public Halide::Generator { 6 | public: 7 | Output> output{"output"}; 8 | 9 | void generate() { 10 | Var x; 11 | 12 | output(x) = x; 13 | 14 | Target target = get_target(); 15 | if (target.has_gpu_feature()) { 16 | Var xo, xi; 17 | output.gpu_tile(x, xo, xi, 16); 18 | } 19 | } 20 | }; 21 | 22 | } // namespace 23 | 24 | HALIDE_REGISTER_GENERATOR(GpuObjectLifetime, gpu_object_lifetime) 25 | -------------------------------------------------------------------------------- /test/generator/image_from_array_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | namespace { 4 | 5 | class ImageFromArray : public Halide::Generator { 6 | public: 7 | Output> output{"output"}; 8 | 9 | void generate() { 10 | // Currently the test just exercises halide_image.h. 11 | Var x; 12 | output(x) = x; 13 | } 14 | }; 15 | 16 | } // namespace 17 | 18 | HALIDE_REGISTER_GENERATOR(ImageFromArray, image_from_array) 19 | -------------------------------------------------------------------------------- /test/generator/variable_num_threads_generator.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | namespace { 4 | 5 | class VariableNumThreads : public Halide::Generator { 6 | public: 7 | Output> output{"output"}; 8 | 9 | void generate() { 10 | // A job with lots of nested parallelism 11 | Var x, y; 12 | 13 | output(x, y) = sqrt(sqrt(x * y)); 14 | output.parallel(x).parallel(y); 15 | } 16 | }; 17 | 18 | } // namespace 19 | 20 | HALIDE_REGISTER_GENERATOR(VariableNumThreads, variable_num_threads) 21 | -------------------------------------------------------------------------------- /test/integration/aot/add.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace Halide; 3 | 4 | struct Add : Generator { 5 | Output> output{"output"}; 6 | 7 | void generate() { 8 | Var x, y; 9 | output(x, y) = x + y; 10 | 11 | output.set_estimates({{0, 64}, {0, 64}}); 12 | } 13 | }; 14 | 15 | HALIDE_REGISTER_GENERATOR(Add, add); 16 | -------------------------------------------------------------------------------- /test/integration/xc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.28) 2 | project(xc) 3 | 4 | enable_testing() 5 | 6 | # Only need the platform-independent / source-only helpers. 7 | find_package(HalideHelpers REQUIRED) 8 | 9 | add_halide_generator(add_gen add.cpp) 10 | add_halide_library(add FROM xc::halide_generators::add_gen 11 | REGISTRATION add_reg_cpp) 12 | 13 | add_executable(run_add ${add_reg_cpp}) 14 | target_link_libraries(run_add PRIVATE add Halide::RunGenMain) 15 | 16 | add_test(NAME run_add 17 | COMMAND run_add --output_extents=[10,10] --benchmarks=all) 18 | -------------------------------------------------------------------------------- /test/integration/xc/add.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace Halide; 3 | 4 | struct Add : Generator { 5 | Output> output{"output"}; 6 | 7 | void generate() { 8 | Var x, y; 9 | output(x, y) = x + y; 10 | 11 | output.set_estimates({{0, 64}, {0, 64}}); 12 | } 13 | }; 14 | 15 | HALIDE_REGISTER_GENERATOR(Add, add); 16 | -------------------------------------------------------------------------------- /test/warning/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | tests(GROUPS warning 2 | SOURCES 3 | hidden_pure_definition.cpp 4 | require_const_false.cpp 5 | sliding_vectors.cpp 6 | unscheduled_update_def.cpp 7 | emulated_float16.cpp 8 | ) 9 | 10 | # Don't look for "Success!" in warning tests, look for "Warning:" instead. 11 | set_tests_properties(${TEST_NAMES} PROPERTIES PASS_REGULAR_EXPRESSION "Warning:") 12 | -------------------------------------------------------------------------------- /test/warning/hidden_pure_definition.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | #include 3 | 4 | using namespace Halide; 5 | 6 | int main(int argc, char **argv) { 7 | Func f; 8 | Var x; 9 | 10 | f(x) = x; 11 | 12 | // Hide the previous definition. 13 | f(x) = 2; 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/warning/sliding_vectors.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f, g; 7 | Var x; 8 | 9 | f(x) = x; 10 | 11 | g(x) = f(x - 1) + f(x + 1); 12 | 13 | Var xo, xi, xii; 14 | g.split(x, xo, xi, 1024) 15 | .split(xi, xi, xii, 8) 16 | .vectorize(xii); 17 | 18 | f.store_at(g, xo) 19 | .compute_at(g, xi) 20 | .vectorize(x, 8); 21 | g.realize({1024}); 22 | 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/warning/unscheduled_update_def.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | using namespace Halide; 4 | 5 | int main(int argc, char **argv) { 6 | Func f; 7 | Var x; 8 | 9 | f(x) = 0; 10 | f(x) += 5; 11 | 12 | f.vectorize(x, 8); 13 | 14 | f.realize({1024}); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /tools/GenGen.cpp: -------------------------------------------------------------------------------- 1 | #include "Halide.h" 2 | 3 | int main(int argc, char **argv) { 4 | return Halide::Internal::generate_filter_main(argc, argv); 5 | } 6 | -------------------------------------------------------------------------------- /tools/halide_config.make.tpl: -------------------------------------------------------------------------------- 1 | # Machine-Generated: Do Not Edit 2 | HALIDE_SYSTEM_LIBS=@HALIDE_SYSTEM_LIBS_RAW@ 3 | HALIDE_RTTI=@HALIDE_RTTI_RAW@ 4 | HALIDE_LLVM_CXX_FLAGS=@HALIDE_LLVM_CXX_FLAGS_RAW@ 5 | -------------------------------------------------------------------------------- /tutorial/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | DisableFormat: true 3 | SortIncludes: false 4 | 5 | ... 6 | 7 | -------------------------------------------------------------------------------- /tutorial/.gitignore: -------------------------------------------------------------------------------- 1 | lesson_01 2 | lesson_02 3 | lesson_03 4 | lesson_04 5 | lesson_05 6 | blurred.png 7 | brighter.png 8 | -------------------------------------------------------------------------------- /tutorial/clock.h: -------------------------------------------------------------------------------- 1 | #ifndef HALIDE_TUTORIAL_CLOCK_H 2 | #define HALIDE_TUTORIAL_CLOCK_H 3 | 4 | // A current_time function for use in the tests. Returns time in 5 | // milliseconds. 6 | 7 | #include "halide_benchmark.h" 8 | 9 | inline double current_time() { 10 | static auto start_time = Halide::Tools::benchmark_now().time_since_epoch(); 11 | 12 | auto now = Halide::Tools::benchmark_now().time_since_epoch() - start_time; 13 | return std::chrono::duration_cast(now).count() / 1e3; 14 | } 15 | 16 | #endif // HALIDE_TUTORIAL_CLOCK_H 17 | -------------------------------------------------------------------------------- /tutorial/figures/lesson_02_input.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_02_input.jpg -------------------------------------------------------------------------------- /tutorial/figures/lesson_02_output.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_02_output.jpg -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_col_major.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_col_major.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_fast.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_fast.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_parallel_tiles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_parallel_tiles.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_row_major.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_row_major.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_split_7_by_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_split_7_by_3.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_tiled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_tiled.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_05_vectors.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_05_vectors.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_compute_root.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_compute_root.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_compute_y.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_compute_y.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_mixed.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_mixed.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_store_root_compute_x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_store_root_compute_x.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_store_root_compute_y.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_store_root_compute_y.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_08_tile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_08_tile.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_compute_at_multiple_updates.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_compute_at_multiple_updates.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_compute_at_pure.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_compute_at_pure.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_compute_at_pure_and_update.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_compute_at_pure_and_update.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_compute_at_rvar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_compute_at_rvar.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_compute_at_update.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_compute_at_update.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_inline_reduction.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_inline_reduction.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_update.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_update.gif -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_update_rdom.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_update_rdom.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_09_update_schedule.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_09_update_schedule.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_17_rdom_calls_in_predicate.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_17_rdom_calls_in_predicate.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_17_rdom_circular.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_17_rdom_circular.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_17_rdom_triangular.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_17_rdom_triangular.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_18_hist_manual_par.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_18_hist_manual_par.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_18_hist_rfactor_par.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_18_hist_rfactor_par.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_18_hist_rfactor_tile.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_18_hist_rfactor_tile.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_18_hist_rfactor_vec.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_18_hist_rfactor_vec.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_18_hist_serial.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_18_hist_serial.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_group_updates.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_group_updates.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_transpose.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_transpose.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_wrapper_global.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_wrapper_global.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_wrapper_local.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_wrapper_local.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_wrapper_unique.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_wrapper_unique.mp4 -------------------------------------------------------------------------------- /tutorial/figures/lesson_19_wrapper_vary_schedule.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/figures/lesson_19_wrapper_vary_schedule.mp4 -------------------------------------------------------------------------------- /tutorial/images/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/images/gray.png -------------------------------------------------------------------------------- /tutorial/images/rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halide/Halide/8bf7827bf08d655f0c842d4fe7271d5bf65600f9/tutorial/images/rgb.png -------------------------------------------------------------------------------- /util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(HalideTraceViz HalideTraceViz.cpp) 2 | target_link_libraries(HalideTraceViz PRIVATE Halide::Halide Halide::Tools) 3 | 4 | add_executable(HalideTraceDump HalideTraceDump.cpp HalideTraceUtils.cpp) 5 | target_link_libraries(HalideTraceDump PRIVATE Halide::Halide Halide::ImageIO Halide::Tools) --------------------------------------------------------------------------------