Revision ed01550d58f23762bde148bc6d5d881c0b6caae9 authored by Andrew Adams on 04 March 2024, 20:35:29 UTC, committed by Andrew Adams on 04 March 2024, 20:35:29 UTC
This is one of our largest remaining type of magic name. These were explicitly constructed in lots of places and then explicitly checked for with ends_with in lots of places. This PR makes the names opaque. Only CanonicalizeGPUVars.cpp knows what they are, and they don't have to be a single fixed thing as long as they're consistent within a process. Also reduced the number of GPU dimensions to three more uniformly. We were already asserting this, but there was lots of dead code in lowering passes after gpu loop validation that allowed for four. Also fixed a bug I found in is_block_uniform. It didn't consider that the dependence on a gpu thread variable in a load index could be because a let variable encountered depends on a gpu thread variable.
1 parent 7636c44
CMakeLists.txt
cmake_minimum_required(VERSION 3.22)
project(max_filter)
enable_testing()
# Set up language settings
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
# Find Halide
find_package(Halide REQUIRED)
# Generator
add_halide_generator(max_filter.generator SOURCES max_filter_generator.cpp)
# Filters
add_halide_library(max_filter FROM max_filter.generator)
add_halide_library(max_filter_auto_schedule FROM max_filter.generator
GENERATOR max_filter
AUTOSCHEDULER Halide::Mullapudi2016)
# Main executable
add_executable(max_filter_filter filter.cpp)
target_link_libraries(max_filter_filter
PRIVATE
Halide::ImageIO
max_filter
max_filter_auto_schedule)
# Test that the app actually works!
set(IMAGE ${CMAKE_CURRENT_LIST_DIR}/../images/rgba.png)
if (EXISTS ${IMAGE})
configure_file(${IMAGE} rgba.png COPYONLY)
add_test(NAME max_filter_filter COMMAND max_filter_filter rgba.png out.png)
set_tests_properties(max_filter_filter PROPERTIES
LABELS max_filter
PASS_REGULAR_EXPRESSION "Success!"
SKIP_REGULAR_EXPRESSION "\\[SKIP\\]")
endif ()
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...