Revision 9c3615b07285d263dd0e617b61acb793e49f2c7d authored by Andrew Adams on 11 February 2024, 18:41:01 UTC, committed by GitHub on 11 February 2024, 18:41:01 UTC
* Add checks to prevent people from using negative split factors

Our analysis passes assume that loop maxes are greater than loop mins,
so negative split factors cause sufficient havoc that not even output
bounds queries are safe. These are therefore checked on pipeline entry.

This is a new way for output bounds queries to throw errors (in addition
to the buffer pointers themselves being null, and maybe some buffer
constraints). Testing this, I realized these errors were getting thrown
twice, because the output buffer bounds query in Pipeline::realize was
built around two recursive calls to realize, and both were calling the
custom error handler. In addition to reporting errors in this class
twice, this implies several other inefficiencies, e.g. jit call args
were being prepped twice. I reworked it to be built around two calls to
call_jit_code instead.

Fixes #7938

* Add test to cmakelists

* Remove pointless target arg to call_jit_code

It has to be the same as the cached target in the receiving object
anyway
1 parent 22581bf
Raw File
.gitignore
# NOTE: one can debug these rules with the following commands:
#
# $ git clean -ffdx
# $ find . -not -path './.git/*' | git check-ignore --stdin --no-index
#
# The first command will delete all files that are ignored by Git (be warned!).
# The second command will print all files that are checked in, but _would be_
# ignored under the rules in this file. Such files should either be explicitly
# added to the exclusions at the bottom of this file, or the rule excluding them
# should be refined.

################################################################################
## Exclude files without extensions

*
!*.*
!*/

################################################################################
## Halide-specific exclusions

# Images only allowed in apps and directories named "images"
*.png
!apps/**/*.png
!**/images/**/*.png

# Pre-trained weights only allowed in autoscheduler directories
*.weights
!src/autoschedulers/**/*.weights

################################################################################
## Halide-specific build artifacts

# Apps
apps/*/*.def
apps/*/*.ptx
apps/*/*.sass
apps/*/*out*.png
apps/*/filter
apps/*/passes.txt
apps/HelloAndroidGL/jni/halide_gl_filter.h

# Autoschedulers
**/src/autoschedulers/adams2019/baseline.cpp
**/src/autoschedulers/adams2019/cost_model.h
**/src/autoschedulers/adams2019/demo.h
**/src/autoschedulers/adams2019/included_schedule_file.h
**/src/autoschedulers/adams2019/train_cost_model.h
**/src/autoschedulers/li2018/demo_gradient.h

# CMake configuration
Halide-*-deps.cmake

# Distribution headers
**/include/Halide*.h
**/include/wasm-rt*.h

# Generator executables
*.generator

# Generator outputs
*.bc
*.featurization
*.halide_compiler_log
*.halide_generated.cpp
*.ll
*.py.cpp
*.pytorch.h
*.registration.cpp
*.s
*.schedule.h
*.stmt
*.stmt.html
*.stub.h

# Linker scripts
py_*.ldscript*

# Runtime modules
_initmod*.cpp

# Tests
**/python_bindings/correctness/generators/*.h
**/test/generator/*.h
compile_log.txt
stderr.txt
stdout.txt

# Tutorials
**/tutorial/auto_schedule_false.h
**/tutorial/auto_schedule_true.h
**/tutorial/brighten_either.h
**/tutorial/brighten_interleaved.h
**/tutorial/brighten_planar.h
**/tutorial/brighten_specialized.h
**/tutorial/lesson_10_halide.h
**/tutorial/my_first_generator_win32.h
**/tutorial/my_first_generator.h
**/tutorial/my_second_generator_1.h
**/tutorial/my_second_generator_2.h
**/tutorial/my_second_generator_3.h

# Tutorial images that were copied to the install tree
**/tutorial/images/
!tutorial/images/

################################################################################
## Common build artifacts

# Directories
bin/
distrib/
lib/
lib64/
share/

# Binaries
*.a
*.cubin
*.dll
*.dylib
*.exe
*.lib
*.o
*.obj
*.so
*.so.*
a.out

# Compiler intermediates / debugging info
*.[ip]db
*.[pg]ch
*.d
*.dSYM

# Package files
*.deb
*.tar.gz
*.tgz
*.zip

################################################################################
## Temporary and swap files

temp/
tmp/

.*.swp
.\#*
.DS_Store
*.log
*.tmp
*.txt.user*
*~
\#*\#

################################################################################
## Python

# Common virtual environment directory names
.venv/
venv/

# Python binary caches
__pycache__
*.py[cod]

# Python package build artifacts
*.egg-info/
*.whl
MANIFEST.in
dist/

################################################################################
## CMake

# User-specific configuration files
CMakeUserPresets.json

# Common build directory names
build*/
cmake[-_]build*/

# Generated config files
*-config-version.cmake
*-config.cmake
*Config.cmake
*ConfigVersion.cmake

# Build directory contents
_deps/
.cmake/
cmake_install.cmake
CMakeCache.txt
CMakeFiles/
compile_commands.json
CPack*.cmake
CTest*.cmake
CTest*.txt
install_manifest.txt

# Ninja files
*.ninja*

################################################################################
## IDE directories and metadata

# Visual Studio
.vs/
out/

CMakeSettings.json

# XCode
*.xcworkspacedata
tools/objc/*.mobileprovision
tools/objc/BUILD
xcuserdata

# CLion
.idea/

# VSCode
.vscode/

# TextMate
.tm_properties

# Sublime Text
.tags
.tags_sorted_by_file
*.sublime-*

# Vim
.clang_complete

# NeoVim + clangd
.cache

# Emacs
tags
TAGS

################################################################################
## Halide-specific rule overrides

# Allow particular extension-less files
!gradlew
!Makefile
!packaging/ubuntu/changelog
!packaging/ubuntu/copyright
!packaging/ubuntu/triggers

# Allow XCode PCHs in the HelloiOS app
!apps/HelloiOS/**/*-Prefix.pch

# Allow the runtime to have handwritten LLVM modules
!src/runtime/*.ll

# Allow precompiled Nvidia bitcode
!src/runtime/nvidia_libdevice_bitcode/*.bc

# Anything goes in the hexagon_remote binaries
!src/runtime/hexagon_remote/**/*

# TODO: should this be checked in?
!src/autoschedulers/adams2019/included_schedule_file.schedule.h

# TODO: these should become .cmake.in
!packaging/common/HalideConfig.cmake
!packaging/common/HalideHelpersConfig.cmake
back to top