Skip to content

Commit 4c63f1b

Browse files
Revise autoscheduler tool names to match those from #7483 (#7484)
The Halide 15.0.0 release inadvertently omitted all of these tools from the packaging. They are being re-added for 15.0.1. While we're doing this, let's go ahead and have the names match those proposed for Halide 16.
1 parent 3172169 commit 4c63f1b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2381,12 +2381,12 @@ endif
23812381
# Adams2019 also includes autotuning tools
23822382
$(DISTRIB_DIR)/lib/libautoschedule_adams2019.$(PLUGIN_EXT): $(BIN_DIR)/libautoschedule_adams2019.$(PLUGIN_EXT)
23832383
@mkdir -p $(@D)
2384-
$(MAKE) -f $(SRC_DIR)/autoschedulers/adams2019/Makefile $(BIN_DIR)/retrain_cost_model $(BIN_DIR)/featurization_to_sample $(BIN_DIR)/get_host_target HALIDE_DISTRIB_PATH=$(CURDIR)/$(DISTRIB_DIR)
2384+
$(MAKE) -f $(SRC_DIR)/autoschedulers/adams2019/Makefile $(BIN_DIR)/adams2019_retrain_cost_model $(BIN_DIR)/featurization_to_sample $(BIN_DIR)/get_host_target HALIDE_DISTRIB_PATH=$(CURDIR)/$(DISTRIB_DIR)
23852385
cp $< $(DISTRIB_DIR)/lib/
2386-
for TOOL in retrain_cost_model featurization_to_sample get_host_target; do \
2386+
for TOOL in adams2019_retrain_cost_model featurization_to_sample get_host_target; do \
23872387
cp $(BIN_DIR)/$${TOOL} $(DISTRIB_DIR)/bin/; \
23882388
done
2389-
cp $(SRC_DIR)/autoschedulers/adams2019/autotune_loop.sh $(DISTRIB_DIR)/tools/
2389+
cp $(SRC_DIR)/autoschedulers/adams2019/adams2019_autotune_loop.sh $(DISTRIB_DIR)/tools/
23902390
ifeq ($(UNAME), Darwin)
23912391
install_name_tool -id @rpath/$(@F) $(CURDIR)/$@
23922392
endif

packaging/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ else ()
7979
set(rbase $ORIGIN)
8080
endif ()
8181

82-
foreach (util IN ITEMS adams2019_retrain_cost_model adams2019_featurization_to_sample adams2019_get_host_target adams2019_weightsdir_to_weightsfile)
82+
foreach (util IN ITEMS adams2019_retrain_cost_model featurization_to_sample get_host_target adams2019_weightsdir_to_weightsfile)
8383
if (TARGET ${util})
8484
if (NOT CMAKE_INSTALL_RPATH)
8585
set_target_properties(${util} PROPERTIES INSTALL_RPATH "${rbase};${rbase}/${lib_dir}")
@@ -121,7 +121,7 @@ install(DIRECTORY ${Halide_SOURCE_DIR}/tools/
121121
PATTERN "build_halide_h.cpp" EXCLUDE
122122
PATTERN "find_inverse.cpp" EXCLUDE)
123123

124-
install(PROGRAMS ${Halide_SOURCE_DIR}/src/autoschedulers/adams2019/autotune_loop.sh
124+
install(PROGRAMS ${Halide_SOURCE_DIR}/src/autoschedulers/adams2019/adams2019_autotune_loop.sh
125125
DESTINATION ${Halide_INSTALL_TOOLSDIR}
126126
COMPONENT Halide_Development)
127127

src/autoschedulers/adams2019/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if (APPLE AND num_archs GREATER 1)
7171
)
7272
endif ()
7373

74-
# retrain_cost_model
74+
# adams2019_retrain_cost_model
7575
if (WITH_UTILS)
7676
add_executable(adams2019_retrain_cost_model
7777
DefaultCostModel.cpp
@@ -106,10 +106,10 @@ target_link_libraries(Halide_Adams2019 PRIVATE ASLog ParamParser adams2019_cost_
106106
# TODO(#4053): implement auto-tuning support in CMake?
107107

108108
if (WITH_UTILS)
109-
add_executable(adams2019_featurization_to_sample featurization_to_sample.cpp)
109+
add_executable(featurization_to_sample featurization_to_sample.cpp)
110110

111-
add_executable(adams2019_get_host_target get_host_target.cpp)
112-
target_link_libraries(adams2019_get_host_target PRIVATE Halide::Halide)
111+
add_executable(get_host_target get_host_target.cpp)
112+
target_link_libraries(get_host_target PRIVATE Halide::Halide)
113113

114114
add_executable(adams2019_weightsdir_to_weightsfile weightsdir_to_weightsfile.cpp Weights.cpp)
115115
target_link_libraries(adams2019_weightsdir_to_weightsfile PRIVATE Halide::Runtime)

src/autoschedulers/adams2019/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ $(BIN)/libautoschedule_adams2019.$(PLUGIN_EXT): \
8787
@mkdir -p $(@D)
8888
$(CXX) -shared $(USE_EXPORT_DYNAMIC) -fPIC -fvisibility=hidden -fvisibility-inlines-hidden $(CXXFLAGS) $(OPTIMIZE) -I $(BIN)/cost_model $(filter-out %.h $(LIBHALIDE_LDFLAGS),$^) -o $@ $(HALIDE_SYSTEM_LIBS) $(HALIDE_RPATH_FOR_LIB)
8989

90-
$(BIN)/retrain_cost_model: $(SRC)/retrain_cost_model.cpp \
90+
$(BIN)/adams2019_retrain_cost_model: $(SRC)/retrain_cost_model.cpp \
9191
$(COMMON_DIR)/ASLog.cpp \
9292
$(SRC)/DefaultCostModel.h \
9393
$(SRC)/DefaultCostModel.cpp \
@@ -108,7 +108,7 @@ $(BIN)/featurization_to_sample: $(SRC)/featurization_to_sample.cpp
108108
$(BIN)/get_host_target: $(SRC)/get_host_target.cpp $(LIB_HALIDE) $(HALIDE_DISTRIB_PATH)/include/Halide.h
109109
@mkdir -p $(@D)
110110
$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) $(LIBHALIDE_LDFLAGS) $(OPTIMIZE) -o $@ $(HALIDE_RPATH_FOR_BIN)
111-
$(BIN)/weightsdir_to_weightsfile: $(SRC)/weightsdir_to_weightsfile.cpp $(SRC)/Weights.cpp
111+
$(BIN)/adams2019_weightsdir_to_weightsfile: $(SRC)/weightsdir_to_weightsfile.cpp $(SRC)/Weights.cpp
112112
@mkdir -p $(@D)
113113
$(CXX) $(CXXFLAGS) $^ $(OPTIMIZE) -o $@
114114

src/autoschedulers/adams2019/autotune_loop.sh src/autoschedulers/adams2019/adams2019_autotune_loop.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ for ((BATCH_ID=$((FIRST+1));BATCH_ID<$((FIRST+1+NUM_BATCHES));BATCH_ID++)); do
213213
echo Retraining model...
214214

215215
find ${SAMPLES} -name "*.sample" | \
216-
${AUTOSCHED_BIN}/retrain_cost_model \
216+
${AUTOSCHED_BIN}/adams2019_retrain_cost_model \
217217
--epochs=${BATCH_SIZE} \
218218
--rates="0.0001" \
219219
--num_cores=32 \

0 commit comments

Comments
 (0)