Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 2 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,6 @@ GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_msan,$(GENERATOR_AOTCPP_
# https://github.com/halide/Halide/issues/7272
GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_memory_profiler_mandelbrot,$(GENERATOR_AOTCPP_TESTS))

# https://github.com/halide/Halide/issues/4916
GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_stubtest,$(GENERATOR_AOTCPP_TESTS))
GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_stubuser,$(GENERATOR_AOTCPP_TESTS))

# Build requirements are finicky, testing non-C++ backend is good enough here
GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_gpu_multi_context_threaded,$(GENERATOR_AOTCPP_TESTS))

Expand Down Expand Up @@ -1549,10 +1545,6 @@ $(FILTERS_DIR)/%.halide_generated.cpp: $(FILTERS_DIR)/%.a
$(FILTERS_DIR)/%.registration.cpp: $(FILTERS_DIR)/%.a
@echo $@ produced implicitly by $^

$(FILTERS_DIR)/%.stub.h: $(BIN_DIR)/%.generator
@mkdir -p $(@D)
$(CURDIR)/$< -g $* -n $* -o $(CURDIR)/$(FILTERS_DIR) -e cpp_stub

$(FILTERS_DIR)/cxx_mangling_externs.o: $(ROOT_DIR)/test/generator/cxx_mangling_externs.cpp
@mkdir -p $(@D)
$(CXX) $(GEN_AOT_CXX_FLAGS) -c $(filter-out %.h,$^) $(GEN_AOT_INCLUDES) -o $@
Expand Down Expand Up @@ -1714,28 +1706,6 @@ endif
$(BIN_DIR)/$(TARGET)/generator_aotcpp_cxx_mangling: $(FILTERS_DIR)/cxx_mangling_externs.o
$(BIN_DIR)/$(TARGET)/generator_aotcpp_cxx_mangling_define_extern: $(FILTERS_DIR)/cxx_mangling.halide_generated.cpp $(FILTERS_DIR)/cxx_mangling_externs.o $(FILTERS_DIR)/cxx_mangling_define_extern_externs.o

$(BUILD_DIR)/stubuser_generator.o: $(FILTERS_DIR)/stubtest.stub.h $(FILTERS_DIR)/configure.stub.h
$(BIN_DIR)/stubuser.generator: $(BUILD_DIR)/stubtest_generator.o $(BUILD_DIR)/configure_generator.o

# stubtest has input and output funcs with undefined types and array sizes; this is fine for stub
# usage (the types can be inferred), but for AOT compilation, we must make the types
# concrete via generator args.
STUBTEST_GENERATOR_ARGS=\
untyped_buffer_input.type=uint8 untyped_buffer_input.dim=3 \
simple_input.type=float32 \
array_input.type=float32 array_input.size=2 \
int_arg.size=2 \
tuple_output.type=float32,float32 \
vectorize=true

$(FILTERS_DIR)/stubtest.a: $(BIN_DIR)/stubtest.generator
@mkdir -p $(@D)
$(CURDIR)/$< -g stubtest -f stubtest $(GEN_AOT_OUTPUTS) -o $(CURDIR)/$(FILTERS_DIR) target=$(TARGET)-no_runtime $(STUBTEST_GENERATOR_ARGS)

$(FILTERS_DIR)/stubuser_auto.a: $(BIN_DIR)/stubuser.generator $(BIN_MULLAPUDI2016)
@mkdir -p $(@D)
$(CURDIR)/$< -g stubuser $(GEN_AOT_OUTPUTS) -o $(CURDIR)/$(FILTERS_DIR) -f stubuser_auto target=$(TARGET)-no_runtime autoscheduler=Mullapudi2016 -p $(BIN_MULLAPUDI2016)

$(FILTERS_DIR)/autograd_grad.a: $(BIN_DIR)/autograd.generator $(BIN_MULLAPUDI2016)
@mkdir -p $(@D)
$(CURDIR)/$< -g autograd $(GEN_AOT_OUTPUTS) -o $(CURDIR)/$(FILTERS_DIR) -f autograd_grad target=$(TARGET)-no_runtime autoscheduler=Mullapudi2016 -d 1 -p $(BIN_MULLAPUDI2016)
Expand Down Expand Up @@ -1841,16 +1811,11 @@ $(BIN_DIR)/$(TARGET)/generator_aotcpp_define_extern_opencl: $(ROOT_DIR)/test/gen
@mkdir -p $(@D)
$(CXX) $(GEN_AOT_CXX_FLAGS) $(filter %.cpp %.o %.a,$^) $(GEN_AOT_INCLUDES) $(GEN_AOT_LD_FLAGS) $(OPENCL_LD_FLAGS) -o $@

# By default, %_jittest.cpp depends on libHalide, plus the stubs for the Generator. These are external tests that use the JIT.
$(BIN_DIR)/generator_jit_%: $(ROOT_DIR)/test/generator/%_jittest.cpp $(TEST_DEPS) $(FILTERS_DIR)/%.stub.h $(BUILD_DIR)/%_generator.o
# By default, %_jittest.cpp depends on libHalide. These are external tests that use the JIT.
$(BIN_DIR)/generator_jit_%: $(ROOT_DIR)/test/generator/%_jittest.cpp $(TEST_DEPS) $(BUILD_DIR)/%_generator.o
@mkdir -p $(@D)
$(CXX) -g $(TEST_CXX_FLAGS) $(filter %.cpp %.o %.a,$^) -I$(INCLUDE_DIR) -I$(FILTERS_DIR) -I $(ROOT_DIR)/apps/support $(TEST_LD_FLAGS) -o $@

# stubuser is run with autoscheduling too
$(BIN_DIR)/$(TARGET)/generator_aot_stubuser: $(ROOT_DIR)/test/generator/stubuser_aottest.cpp $(FILTERS_DIR)/stubuser.a $(FILTERS_DIR)/stubuser.h $(FILTERS_DIR)/stubuser_auto.a $(FILTERS_DIR)/stubuser_auto.h $(RUNTIME_EXPORTED_INCLUDES) $(BIN_DIR)/$(TARGET)/runtime.a
@mkdir -p $(@D)
$(CXX) $(GEN_AOT_CXX_FLAGS) $(filter %.cpp %.o %.a,$^) $(GEN_AOT_INCLUDES) $(GEN_AOT_LD_FLAGS) -o $@

# generator_aot_multitarget is run multiple times, with different env vars.
generator_aot_multitarget: $(BIN_DIR)/$(TARGET)/generator_aot_multitarget
@mkdir -p $(@D)
Expand Down
1 change: 0 additions & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ add_app(iir_blur)
add_app(interpolate)
add_app(lens_blur)
add_app(linear_algebra)
# add_app(linear_blur) # TODO(#5374): missing CMake build
add_app(local_laplacian)
add_app(max_filter)
add_app(nl_means)
Expand Down
32 changes: 0 additions & 32 deletions apps/linear_blur/linear_blur_generator.cpp

This file was deleted.

43 changes: 0 additions & 43 deletions apps/linear_blur/linear_to_srgb_generator.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions apps/linear_blur/run_linear_blur.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions apps/linear_blur/simple_blur_generator.cpp

This file was deleted.

43 changes: 0 additions & 43 deletions apps/linear_blur/srgb_to_linear_generator.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions cmake/HalideGeneratorHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ function(_Halide_library_from_generator TARGET)
set(compiler_log_extension ".halide_compiler_log")
set(conceptual_stmt_extension ".conceptual.stmt")
set(conceptual_stmt_html_extension ".conceptual.stmt.html")
# set(cpp_stub_extension ".stub.h") # not implemented
set(device_code_extension ".device_code")
set(featurization_extension ".featurization")
set(function_info_header_extension ".function_info.h")
Expand Down Expand Up @@ -450,7 +449,6 @@ function(add_halide_library TARGET)

# See Module.cpp for list of extra outputs. The following outputs intentionally do not appear:
# - `c_header` is always generated
# - `cpp_stub` is not available
# - `object` is selected for CMake-target-compile
# - `static_library` is selected for cross-compile
set(extra_output_names
Expand Down
1 change: 0 additions & 1 deletion python_bindings/src/halide/halide_/PyEnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ void define_enums(py::module &m) {
.value("c_header", OutputFileType::c_header)
.value("c_source", OutputFileType::c_source)
.value("compiler_log", OutputFileType::compiler_log)
.value("cpp_stub", OutputFileType::cpp_stub)
.value("featurization", OutputFileType::featurization)
.value("function_info_header", OutputFileType::function_info_header)
.value("hlpipe", OutputFileType::hlpipe)
Expand Down
6 changes: 0 additions & 6 deletions python_bindings/src/halide/halide_/PyGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ class PyGeneratorBase : public AbstractGenerator {
generator_.attr("_bind_input")(v);
}

bool emit_cpp_stub(const std::string & /*stub_file_path*/) override {
// Python Generators don't support this (and *never* will, so don't ask),
// but don't throw an error, just return false.
return false;
}

bool emit_hlpipe(const std::string & /*hlpipe_file_path*/) override {
// Python Generators don't support this yet ...
// but don't throw an error, just return false.
Expand Down
2 changes: 0 additions & 2 deletions python_bindings/stub/PyStubImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ namespace PythonBindings {
using ArgInfoKind = Internal::ArgInfoKind;
using ArgInfo = Internal::AbstractGenerator::ArgInfo;
using GeneratorFactory = Internal::GeneratorFactory;
using StubInput = Internal::StubInput;
using StubInputBuffer = Internal::StubInputBuffer<void>;

namespace {

Expand Down
15 changes: 0 additions & 15 deletions src/AbstractGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,6 @@ class AbstractGenerator {
virtual void bind_input(const std::string &name, const std::vector<Expr> &v) = 0;
// @}

/** Emit a Generator Stub (.stub.h) file to the given path. Not all Generators support this.
*
* If you call this method, you should not call any other AbstractGenerator methods
* on this instance, before or after this call.
*
* If the Generator is capable of emitting a Stub, do so and return true. (Errors
* during stub emission should assert-fail rather than returning false.)
*
* If the Generator is not capable of emitting a Stub, do nothing and return false.
*
* CALL-AFTER: none
* CALL-BEFORE: none
*/
virtual bool emit_cpp_stub(const std::string &stub_file_path) = 0;

/** Emit a Serialized Halide Pipeline (.hlpipe) file to the given path. Not all Generators support this.
*
* If you call this method, you should not call any other AbstractGenerator methods
Expand Down
Loading
Loading