@@ -363,6 +363,7 @@ SOURCE_FILES = \
363
363
ObjectInstanceRegistry.cpp \
364
364
OutputImageParam.cpp \
365
365
ParallelRVar.cpp \
366
+ ParamMap.cpp \
366
367
Parameter.cpp \
367
368
PartitionLoops.cpp \
368
369
Pipeline.cpp \
@@ -507,8 +508,9 @@ HEADER_FILES = \
507
508
Outputs.h \
508
509
OutputImageParam.h \
509
510
ParallelRVar.h \
510
- Parameter.h \
511
511
Param.h \
512
+ ParamMap.h \
513
+ Parameter.h \
512
514
PartitionLoops.h \
513
515
Pipeline.h \
514
516
Prefetch.h \
@@ -645,6 +647,7 @@ RUNTIME_LL_COMPONENTS = \
645
647
win32_math \
646
648
x86 \
647
649
x86_avx \
650
+ x86_avx2 \
648
651
x86_sse41
649
652
650
653
RUNTIME_EXPORTED_INCLUDES = $(INCLUDE_DIR ) /HalideRuntime.h \
@@ -824,17 +827,17 @@ ERROR_TESTS = $(shell ls $(ROOT_DIR)/test/error/*.cpp)
824
827
WARNING_TESTS = $(shell ls $(ROOT_DIR ) /test/warning/* .cpp)
825
828
OPENGL_TESTS := $(shell ls $(ROOT_DIR ) /test/opengl/* .cpp)
826
829
GENERATOR_EXTERNAL_TESTS := $(shell ls $(ROOT_DIR ) /test/generator/* test.cpp)
827
- GENERATOR_EXTERNAL_TEST_GENERATORS := $(shell ls $(ROOT_DIR ) /test/generator/* _generator.cpp)
830
+ GENERATOR_EXTERNAL_TEST_GENERATOR := $(shell ls $(ROOT_DIR ) /test/generator/* _generator.cpp)
828
831
TUTORIALS = $(filter-out % _generate.cpp, $(shell ls $(ROOT_DIR ) /tutorial/* .cpp) )
829
832
AUTO_SCHEDULE_TESTS = $(shell ls $(ROOT_DIR ) /test/auto_schedule/* .cpp)
830
833
831
834
-include $(OPENGL_TESTS :$(ROOT_DIR ) /test/opengl/% .cpp=$(BUILD_DIR ) /test_opengl_% .d)
832
835
833
836
test_correctness : $(CORRECTNESS_TESTS:$(ROOT_DIR ) /test/correctness/%.cpp=correctness_% ) $(CORRECTNESS_TESTS:$(ROOT_DIR ) /test/correctness/%.c=correctness_% )
834
837
test_performance : $(PERFORMANCE_TESTS:$(ROOT_DIR ) /test/performance/%.cpp=performance_% )
835
- test_errors : $(ERROR_TESTS:$(ROOT_DIR ) /test/error/%.cpp=error_% )
836
- test_warnings : $(WARNING_TESTS:$(ROOT_DIR ) /test/warning/%.cpp=warning_% )
837
- test_tutorials : $(TUTORIALS:$(ROOT_DIR ) /tutorial/%.cpp=tutorial_% )
838
+ test_error : $(ERROR_TESTS:$(ROOT_DIR ) /test/error/%.cpp=error_% )
839
+ test_warning : $(WARNING_TESTS:$(ROOT_DIR ) /test/warning/%.cpp=warning_% )
840
+ test_tutorial : $(TUTORIALS:$(ROOT_DIR ) /tutorial/%.cpp=tutorial_% )
838
841
test_valgrind : $(CORRECTNESS_TESTS:$(ROOT_DIR ) /test/correctness/%.cpp=valgrind_% )
839
842
test_avx512 : $(CORRECTNESS_TESTS:$(ROOT_DIR ) /test/correctness/%.cpp=avx512_% )
840
843
test_opengl : $(OPENGL_TESTS:$(ROOT_DIR ) /test/opengl/%.cpp=opengl_% )
@@ -900,12 +903,12 @@ GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_matlab,$(GENERATOR_AOTCP
900
903
# https://github.com/halide/Halide/issues/2093
901
904
GENERATOR_AOTCPP_TESTS := $(filter-out generator_aotcpp_async_coroutine,$(GENERATOR_AOTCPP_TESTS ) )
902
905
903
- test_aotcpp_generators : $(GENERATOR_AOTCPP_TESTS )
906
+ test_aotcpp_generator : $(GENERATOR_AOTCPP_TESTS )
904
907
905
908
# This is just a test to ensure than RunGen builds and links for a critical mass of Generators;
906
909
# not all will work directly (e.g. due to missing define_externs at link time), so we blacklist
907
910
# those known to be broken for plausible reasons.
908
- GENERATOR_BUILD_RUNGEN_TESTS = $(GENERATOR_EXTERNAL_TEST_GENERATORS :$(ROOT_DIR ) /test/generator/%_generator.cpp=$(FILTERS_DIR ) /%.rungen )
911
+ GENERATOR_BUILD_RUNGEN_TESTS = $(GENERATOR_EXTERNAL_TEST_GENERATOR :$(ROOT_DIR ) /test/generator/%_generator.cpp=$(FILTERS_DIR ) /%.rungen )
909
912
GENERATOR_BUILD_RUNGEN_TESTS := $(filter-out $(FILTERS_DIR ) /cxx_mangling_define_extern.rungen,$(GENERATOR_BUILD_RUNGEN_TESTS ) )
910
913
GENERATOR_BUILD_RUNGEN_TESTS := $(filter-out $(FILTERS_DIR ) /define_extern_opencl.rungen,$(GENERATOR_BUILD_RUNGEN_TESTS ) )
911
914
GENERATOR_BUILD_RUNGEN_TESTS := $(filter-out $(FILTERS_DIR ) /matlab.rungen,$(GENERATOR_BUILD_RUNGEN_TESTS ) )
@@ -916,16 +919,30 @@ GENERATOR_BUILD_RUNGEN_TESTS := $(filter-out $(FILTERS_DIR)/old_buffer_t.rungen,
916
919
GENERATOR_BUILD_RUNGEN_TESTS := $(filter-out $(FILTERS_DIR ) /tiled_blur.rungen,$(GENERATOR_BUILD_RUNGEN_TESTS ) )
917
920
test_rungen : $(GENERATOR_BUILD_RUNGEN_TESTS )
918
921
919
- test_generators : $(GENERATOR_AOT_TESTS ) $(GENERATOR_AOTCPP_TESTS ) $(GENERATOR_JIT_TESTS ) $(GENERATOR_BUILD_RUNGEN_TESTS )
922
+ test_generator : $(GENERATOR_AOT_TESTS ) $(GENERATOR_AOTCPP_TESTS ) $(GENERATOR_JIT_TESTS ) $(GENERATOR_BUILD_RUNGEN_TESTS )
923
+
924
+ # TODO: these are temporary targets added to allow existing buildbot to run without breaking;
925
+ # it will be removed after buildbot is updated.
926
+ .PHONY : test_errors
927
+ test_errors : test_error
928
+
929
+ .PHONY : test_generators
930
+ test_generators : test_generator
931
+
932
+ .PHONY : test_tutorials
933
+ test_tutorials : test_tutorial
920
934
921
- ALL_TESTS = test_internal test_correctness test_errors test_tutorials test_warnings test_generators
935
+ .PHONY : test_warnings
936
+ test_warnings : test_warning
937
+
938
+ ALL_TESTS = test_internal test_correctness test_error test_tutorial test_warning test_generator
922
939
923
940
# These targets perform timings of each test. For most tests this includes Halide JIT compile times, and run times.
924
941
# For generator tests they time the compile time only. The times are recorded in CSV files.
925
942
time_compilation_correctness : init_time_compilation_correctness $(CORRECTNESS_TESTS:$(ROOT_DIR ) /test/correctness/%.cpp=time_compilation_test_% )
926
943
time_compilation_performance : init_time_compilation_performance $(PERFORMANCE_TESTS:$(ROOT_DIR ) /test/performance/%.cpp=time_compilation_performance_% )
927
944
time_compilation_opengl : init_time_compilation_opengl $(OPENGL_TESTS:$(ROOT_DIR ) /test/opengl/%.cpp=time_compilation_opengl_% )
928
- time_compilation_generators : init_time_compilation_generator $(GENERATOR_TESTS:$(ROOT_DIR ) /test/generator/%_aottest.cpp=time_compilation_generator_% )
945
+ time_compilation_generator : init_time_compilation_generator $(GENERATOR_TESTS:$(ROOT_DIR ) /test/generator/%_aottest.cpp=time_compilation_generator_% )
929
946
930
947
init_time_compilation_% :
931
948
echo " TEST,User (s),System (s),Real" > $(@:init_time_compilation_%=compile_times_%.csv )
@@ -944,7 +961,7 @@ build_tests: $(CORRECTNESS_TESTS:$(ROOT_DIR)/test/correctness/%.cpp=$(BIN_DIR)/c
944
961
$(GENERATOR_EXTERNAL_TESTS:$(ROOT_DIR ) /test/generator/%_jittest.cpp=$(BIN_DIR ) /generator_jit_% ) \
945
962
$(AUTO_SCHEDULE_TESTS:$(ROOT_DIR ) /test/auto_schedule/%.cpp=$(BIN_DIR ) /auto_schedule_% )
946
963
947
- clean_generators :
964
+ clean_generator :
948
965
rm -rf $(BIN_DIR ) /* .generator
949
966
rm -rf $(BIN_DIR ) /* /runtime.a
950
967
rm -rf $(FILTERS_DIR )
@@ -953,7 +970,7 @@ clean_generators:
953
970
rm -f $(BUILD_DIR ) /GenGen.o
954
971
rm -f $(BUILD_DIR ) /RunGen.o
955
972
956
- time_compilation_tests : time_compilation_correctness time_compilation_performance time_compilation_generators
973
+ time_compilation_tests : time_compilation_correctness time_compilation_performance time_compilation_generator
957
974
958
975
LIBHALIDE_DEPS ?= $(BIN_DIR ) /libHalide.$(SHARED_EXT ) $(INCLUDE_DIR ) /Halide.h
959
976
@@ -1015,7 +1032,7 @@ $(BIN_DIR)/auto_schedule_%: $(ROOT_DIR)/test/auto_schedule/%.cpp $(BIN_DIR)/libH
1015
1032
.INTERMEDIATE : $(BIN_DIR ) /% .generator
1016
1033
1017
1034
# By default, %.generator is produced by building %_generator.cpp
1018
- # Note that the rule includes all _generator.cpp files, so that generators with define_extern
1035
+ # Note that the rule includes all _generator.cpp files, so that generator with define_extern
1019
1036
# usage can just add deps later.
1020
1037
$(BUILD_DIR ) /% _generator.o : $(ROOT_DIR ) /test/generator/% _generator.cpp $(INCLUDE_DIR ) /Halide.h
1021
1038
@mkdir -p $(@D )
@@ -1029,17 +1046,17 @@ $(BIN_DIR)/%.generator: $(BUILD_DIR)/GenGen.o $(BIN_DIR)/libHalide.$(SHARED_EXT)
1029
1046
# These next two rules can fail the compilationa nd produce zero length bitcode blobs.
1030
1047
# If the zero length blob is actually used, the test will fail anyway, but usually only the bitness
1031
1048
# of the target is used.
1032
- $(BUILD_DIR ) /external_code_extern_bitcode_32.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp
1049
+ $(BUILD_DIR ) /external_code_extern_bitcode_32.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp $( BIN_DIR ) /binary2cpp
1033
1050
@mkdir -p $(@D )
1034
1051
$(CLANG ) $(CXX_WARNING_FLAGS ) -O3 -c -m32 -target $(RUNTIME_TRIPLE_32 ) -emit-llvm $< -o $(BUILD_DIR ) /external_code_extern_32.bc || echo -n > $(BUILD_DIR ) /external_code_extern_32.bc
1035
1052
./$(BIN_DIR ) /binary2cpp external_code_extern_bitcode_32 < $(BUILD_DIR ) /external_code_extern_32.bc > $@
1036
1053
1037
- $(BUILD_DIR ) /external_code_extern_bitcode_64.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp
1054
+ $(BUILD_DIR ) /external_code_extern_bitcode_64.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp $( BIN_DIR ) /binary2cpp
1038
1055
@mkdir -p $(@D )
1039
1056
$(CLANG ) $(CXX_WARNING_FLAGS ) -O3 -c -m64 -target $(RUNTIME_TRIPLE_64 ) -emit-llvm $< -o $(BUILD_DIR ) /external_code_extern_64.bc || echo -n > $(BUILD_DIR ) /external_code_extern_64.bc
1040
1057
./$(BIN_DIR ) /binary2cpp external_code_extern_bitcode_64 < $(BUILD_DIR ) /external_code_extern_64.bc > $@
1041
1058
1042
- $(BUILD_DIR ) /external_code_extern_cpp_source.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp
1059
+ $(BUILD_DIR ) /external_code_extern_cpp_source.cpp : $(ROOT_DIR ) /test/generator/external_code_extern.cpp $( BIN_DIR ) /binary2cpp
1043
1060
@mkdir -p $(@D )
1044
1061
./$(BIN_DIR ) /binary2cpp external_code_extern_cpp_source < $(ROOT_DIR ) /test/generator/external_code_extern.cpp > $@
1045
1062
@@ -1107,6 +1124,10 @@ $(FILTERS_DIR)/memory_profiler_mandelbrot.a: $(BIN_DIR)/memory_profiler_mandelbr
1107
1124
@mkdir -p $(@D )
1108
1125
$(CURDIR ) /$< -g memory_profiler_mandelbrot -f memory_profiler_mandelbrot $(GEN_AOT_OUTPUTS ) -o $(CURDIR ) /$(FILTERS_DIR ) target=$(TARGET ) -no_runtime-profile
1109
1126
1127
+ $(FILTERS_DIR ) /alias_with_offset_42.a : $(BIN_DIR ) /alias.generator
1128
+ @mkdir -p $(@D )
1129
+ $(CURDIR ) /$< -g alias_with_offset_42 -f alias_with_offset_42 $(GEN_AOT_OUTPUTS ) -o $(CURDIR ) /$(FILTERS_DIR ) target=$(TARGET ) -no_runtime
1130
+
1110
1131
METADATA_TESTER_GENERATOR_ARGS =\
1111
1132
input.type=uint8 input.dim=3 \
1112
1133
type_only_input_buffer.dim=3 \
@@ -1236,6 +1257,15 @@ $(BIN_DIR)/$(TARGET)/generator_aot_msan: $(ROOT_DIR)/test/generator/msan_aottest
1236
1257
@mkdir -p $(@D )
1237
1258
$(CXX ) $(GEN_AOT_CXX_FLAGS ) $(filter-out % .h,$^ ) $(GEN_AOT_INCLUDES ) $(GEN_AOT_LD_FLAGS ) -o $@
1238
1259
1260
+ # alias has additional deps to link in
1261
+ $(BIN_DIR ) /$(TARGET ) /generator_aot_alias : $(ROOT_DIR ) /test/generator/alias_aottest.cpp $(FILTERS_DIR ) /alias.a $(FILTERS_DIR ) /alias_with_offset_42.a $(RUNTIME_EXPORTED_INCLUDES ) $(BIN_DIR ) /$(TARGET ) /runtime.a
1262
+ @mkdir -p $(@D )
1263
+ $(CXX ) $(GEN_AOT_CXX_FLAGS ) $(filter % .cpp % .o % .a,$^ ) $(GEN_AOT_INCLUDES ) $(GEN_AOT_LD_FLAGS ) -o $@
1264
+
1265
+ $(BIN_DIR ) /$(TARGET ) /generator_aotcpp_alias : $(ROOT_DIR ) /test/generator/alias_aottest.cpp $(FILTERS_DIR ) /alias.cpp $(FILTERS_DIR ) /alias_with_offset_42.cpp $(RUNTIME_EXPORTED_INCLUDES ) $(BIN_DIR ) /$(TARGET ) /runtime.a
1266
+ @mkdir -p $(@D )
1267
+ $(CXX ) $(GEN_AOT_CXX_FLAGS ) $(filter % .cpp % .o % .a,$^ ) $(GEN_AOT_INCLUDES ) $(GEN_AOT_LD_FLAGS ) -o $@
1268
+
1239
1269
# nested_externs has additional deps to link in
1240
1270
$(BIN_DIR ) /$(TARGET ) /generator_aot_nested_externs : $(ROOT_DIR ) /test/generator/nested_externs_aottest.cpp $(FILTERS_DIR ) /nested_externs_root.a $(FILTERS_DIR ) /nested_externs_inner.a $(FILTERS_DIR ) /nested_externs_combine.a $(FILTERS_DIR ) /nested_externs_leaf.a $(RUNTIME_EXPORTED_INCLUDES ) $(BIN_DIR ) /$(TARGET ) /runtime.a
1241
1271
@mkdir -p $(@D )
@@ -1502,9 +1532,12 @@ test_bazel: $(DISTRIB_DIR)/halide.tgz
1502
1532
bazel build --verbose_failures :all
1503
1533
1504
1534
.PHONY : test_python
1505
- test_python : $(LIB_DIR ) /libHalide.a $(INCLUDE_DIR ) /Halide.h
1506
- mkdir -p python_bindings
1507
- make -C python_bindings -f $(ROOT_DIR ) /python_bindings/Makefile test
1535
+ test_python : distrib
1536
+ make -C $(ROOT_DIR ) /python_bindings \
1537
+ -f $(ROOT_DIR ) /python_bindings/Makefile \
1538
+ test \
1539
+ HALIDE_DISTRIB_PATH=$(CURDIR ) /$(DISTRIB_DIR ) \
1540
+ BIN=$(CURDIR ) /$(BIN_DIR ) /python_bindings
1508
1541
1509
1542
# It's just for compiling the runtime, so earlier clangs *might* work,
1510
1543
# but best to peg it to the minimum llvm version.
@@ -1528,6 +1561,10 @@ ifneq (,$(findstring clang version 6.0,$(CLANG_VERSION)))
1528
1561
CLANG_OK =yes
1529
1562
endif
1530
1563
1564
+ ifneq (,$(findstring clang version 7.0,$(CLANG_VERSION ) ) )
1565
+ CLANG_OK =yes
1566
+ endif
1567
+
1531
1568
ifneq (,$(findstring Apple LLVM version 5.0,$(CLANG_VERSION ) ) )
1532
1569
CLANG_OK =yes
1533
1570
endif
@@ -1548,7 +1585,7 @@ $(BUILD_DIR)/clang_ok:
1548
1585
@exit 1
1549
1586
endif
1550
1587
1551
- ifneq (,$(findstring $(LLVM_VERSION_TIMES_10 ) , 40 50 60) )
1588
+ ifneq (,$(findstring $(LLVM_VERSION_TIMES_10 ) , 40 50 60 70 ) )
1552
1589
LLVM_OK =yes
1553
1590
endif
1554
1591
0 commit comments