Skip to content
Closed
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
14 changes: 7 additions & 7 deletions apps/HelloPyTorch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $(BIN)/%/add_float32.a: $(GENERATOR_BIN)/add.generator
-f add_float32 \
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
target=$* \
target=$(HL_TARGET) \
auto_schedule=false

$(BIN)/%/add_halidegrad_float32.a: $(GENERATOR_BIN)/add.generator
Expand All @@ -96,7 +96,7 @@ $(BIN)/%/add_halidegrad_float32.a: $(GENERATOR_BIN)/add.generator
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
-d 1 \
target=$* \
target=$(HL_TARGET) \
auto_schedule=true

$(BIN)/%/add_grad_float32.a: $(GENERATOR_BIN)/add.generator
Expand All @@ -107,7 +107,7 @@ $(BIN)/%/add_grad_float32.a: $(GENERATOR_BIN)/add.generator
-f add_grad_float32 \
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
target=$* \
target=$(HL_TARGET) \
auto_schedule=false

$(BIN)/%/add_float64.a: $(GENERATOR_BIN)/add.generator
Expand All @@ -118,7 +118,7 @@ $(BIN)/%/add_float64.a: $(GENERATOR_BIN)/add.generator
-f add_float64 \
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
target=$* \
target=$(HL_TARGET) \
auto_schedule=false

$(BIN)/%/add_halidegrad_float64.a: $(GENERATOR_BIN)/add.generator
Expand All @@ -129,9 +129,9 @@ $(BIN)/%/add_halidegrad_float64.a: $(GENERATOR_BIN)/add.generator
-f add_halidegrad_float64 \
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
target=$* \
target=$(HL_TARGET) \
-d 1 \
target=$* \
target=$(HL_TARGET) \
auto_schedule=true

$(BIN)/%/add_grad_float64.a: $(GENERATOR_BIN)/add.generator
Expand All @@ -142,7 +142,7 @@ $(BIN)/%/add_grad_float64.a: $(GENERATOR_BIN)/add.generator
-f add_grad_float64 \
-e static_library,c_header,pytorch_wrapper \
-o $(@D) \
target=$* \
target=$(HL_TARGET) \
auto_schedule=false

# -----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions apps/auto_viz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ $$(BIN)/%/auto_viz_demo_$(1)_up.a: $$(GENERATOR_BIN)/auto_viz_demo.generator
@mkdir -p $$(@D)
$$^ -g auto_viz_demo -o $$(@D) -f auto_viz_demo_$(1)_up \
-e $$(GENERATOR_OUTPUTS) \
target=$$*-no_runtime-trace_all \
target=$$(HL_TARGET)-no_runtime-trace_all \
schedule_type=$$$$(echo $(1) | cut -d_ -f1) \
upsample=true

$$(BIN)/%/auto_viz_demo_$(1)_down.a: $$(GENERATOR_BIN)/auto_viz_demo.generator
@mkdir -p $$(@D)
$$^ -g auto_viz_demo -o $$(@D) -f auto_viz_demo_$(1)_down \
-e $$(GENERATOR_OUTPUTS) \
target=$$*-no_runtime-trace_all \
target=$$(HL_TARGET)-no_runtime-trace_all \
schedule_type=$$$$(echo $(1) | cut -d_ -f1) \
upsample=false

Expand Down Expand Up @@ -59,7 +59,7 @@ $(foreach V,$(VARIANTS),$(eval $(call GEN_RULES,$(V))))

$(BIN)/%/runtime.a: $(GENERATOR_BIN)/auto_viz_demo.generator
@mkdir -p $(@D)
$^ -r runtime -o $(@D) target=$*
$^ -r runtime -o $(@D) target=$(HL_TARGET)

LIBRARIES = $(foreach V,$(VARIANTS),$(BIN)/%/auto_viz_demo_$(V)_up.a $(BIN)/%/auto_viz_demo_$(V)_down.a)
$(BIN)/%/auto_viz_demo: auto_viz_demo.cpp $(BIN)/%/runtime.a $(LIBRARIES)
Expand Down
6 changes: 3 additions & 3 deletions apps/bgu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ $(GENERATOR_BIN)/bgu.generator: bgu_generator.cpp $(GENERATOR_DEPS)

$(BIN)/%/bgu.a: $(GENERATOR_BIN)/bgu.generator
@mkdir -p $(@D)
$< -g bgu -f bgu -o $(BIN)/$* target=$*-no_runtime auto_schedule=false
$< -g bgu -f bgu -o $(BIN)/$* target=$(HL_TARGET)-no_runtime auto_schedule=false

$(BIN)/%/bgu_auto_schedule.a: $(GENERATOR_BIN)/bgu.generator
@mkdir -p $(@D)
$< -g bgu -f bgu_auto_schedule -o $(BIN)/$* target=$*-no_runtime auto_schedule=true
$< -g bgu -f bgu_auto_schedule -o $(BIN)/$* target=$(HL_TARGET)-no_runtime auto_schedule=true

$(BIN)/%/runtime.a: $(GENERATOR_BIN)/bgu.generator
@mkdir -p $(@D)
$< -r runtime -o $(BIN)/$* target=$*
$< -r runtime -o $(BIN)/$* target=$(HL_TARGET)

$(BIN)/%/filter: filter.cpp $(BIN)/%/bgu.a $(BIN)/%/bgu_auto_schedule.a $(BIN)/%/runtime.a
@mkdir -p $(@D)
Expand Down
4 changes: 2 additions & 2 deletions apps/bilateral_grid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ $(GENERATOR_BIN)/bilateral_grid.generator: bilateral_grid_generator.cpp $(GENERA

$(BIN)/%/bilateral_grid.a: $(GENERATOR_BIN)/bilateral_grid.generator
@mkdir -p $(@D)
$^ -g bilateral_grid -e $(GENERATOR_OUTPUTS) -o $(@D) -f bilateral_grid target=$* auto_schedule=false
$^ -g bilateral_grid -e $(GENERATOR_OUTPUTS) -o $(@D) -f bilateral_grid target=$(HL_TARGET) auto_schedule=false

$(BIN)/%/bilateral_grid_auto_schedule.a: $(GENERATOR_BIN)/bilateral_grid.generator
@mkdir -p $(@D)
$^ -g bilateral_grid -e $(GENERATOR_OUTPUTS) -o $(@D) -f bilateral_grid_auto_schedule target=$*-no_runtime auto_schedule=true -e static_library,c_header,schedule
$^ -g bilateral_grid -e $(GENERATOR_OUTPUTS) -o $(@D) -f bilateral_grid_auto_schedule target=$(HL_TARGET)-no_runtime auto_schedule=true -e static_library,c_header,schedule

$(BIN)/%/filter: filter.cpp $(BIN)/%/bilateral_grid.a $(BIN)/%/bilateral_grid_auto_schedule.a
@mkdir -p $(@D)
Expand Down
2 changes: 1 addition & 1 deletion apps/blur/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(GENERATOR_BIN)/halide_blur.generator: halide_blur_generator.cpp $(GENERATOR_DE

$(BIN)/%/halide_blur.a: $(GENERATOR_BIN)/halide_blur.generator
@mkdir -p $(@D)
$^ -g halide_blur -e $(GENERATOR_OUTPUTS) -o $(@D) target=$*
$^ -g halide_blur -e $(GENERATOR_OUTPUTS) -o $(@D) target=$(HL_TARGET)

# g++ on OS X might actually be system clang without openmp
CXX_VERSION=$(shell $(CXX) --version)
Expand Down
4 changes: 2 additions & 2 deletions apps/c_backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ $(GENERATOR_BIN)/pipeline.generator: pipeline_generator.cpp $(GENERATOR_DEPS)

$(BIN)/%/pipeline_native.a: $(GENERATOR_BIN)/pipeline.generator
@mkdir -p $(@D)
$^ -g pipeline -o $(@D) -f pipeline_native -e $(GENERATOR_OUTPUTS) target=$*
$^ -g pipeline -o $(@D) -f pipeline_native -e $(GENERATOR_OUTPUTS) target=$(HL_TARGET)

$(BIN)/%/pipeline_c.halide_generated.cpp: $(GENERATOR_BIN)/pipeline.generator
@mkdir -p $(@D)
$^ -g pipeline -o $(@D) -f pipeline_c -e c_source,c_header target=$*
$^ -g pipeline -o $(@D) -f pipeline_c -e c_source,c_header target=$(HL_TARGET)

$(BIN)/%/run: run.cpp $(BIN)/%/pipeline_c.halide_generated.cpp $(BIN)/%/pipeline_native.a
$(CXX) $(CXXFLAGS) -Wall -I$(BIN)/$* $(filter-out %.h,$^) -o $@ $(LDFLAGS)
Expand Down
4 changes: 2 additions & 2 deletions apps/camera_pipe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ $(GENERATOR_BIN)/camera_pipe.generator: camera_pipe_generator.cpp $(GENERATOR_DE

$(BIN)/%/camera_pipe.a: $(GENERATOR_BIN)/camera_pipe.generator
@mkdir -p $(@D)
$^ -g camera_pipe -e $(GENERATOR_OUTPUTS) -o $(@D) -f camera_pipe target=$* auto_schedule=false
$^ -g camera_pipe -e $(GENERATOR_OUTPUTS) -o $(@D) -f camera_pipe target=$(HL_TARGET) auto_schedule=false

$(BIN)/%/camera_pipe_auto_schedule.a: $(GENERATOR_BIN)/camera_pipe.generator
@mkdir -p $(@D)
$^ -g camera_pipe -e $(GENERATOR_OUTPUTS) -o $(@D) -f camera_pipe_auto_schedule target=$*-no_runtime auto_schedule=true
$^ -g camera_pipe -e $(GENERATOR_OUTPUTS) -o $(@D) -f camera_pipe_auto_schedule target=$(HL_TARGET)-no_runtime auto_schedule=true

$(BIN)/%/process: process.cpp $(BIN)/%/camera_pipe.a $(BIN)/%/camera_pipe_auto_schedule.a
@mkdir -p $(@D)
Expand Down
4 changes: 2 additions & 2 deletions apps/conv_layer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ $(GENERATOR_BIN)/conv_layer.generator: conv_layer_generator.cpp $(GENERATOR_DEPS

$(BIN)/%/conv_layer.a: $(GENERATOR_BIN)/conv_layer.generator
@mkdir -p $(@D)
$^ -g conv_layer -e $(GENERATOR_OUTPUTS) -o $(@D) -f conv_layer target=$* auto_schedule=false
$^ -g conv_layer -e $(GENERATOR_OUTPUTS) -o $(@D) -f conv_layer target=$(HL_TARGET) auto_schedule=false

$(BIN)/%/conv_layer_auto_schedule.a: $(GENERATOR_BIN)/conv_layer.generator
@mkdir -p $(@D)
$^ -g conv_layer -e $(GENERATOR_OUTPUTS) -o $(@D) -f conv_layer_auto_schedule target=$*-no_runtime auto_schedule=true
$^ -g conv_layer -e $(GENERATOR_OUTPUTS) -o $(@D) -f conv_layer_auto_schedule target=$(HL_TARGET)-no_runtime auto_schedule=true

$(BIN)/%/process: process.cpp $(BIN)/%/conv_layer.a $(BIN)/%/conv_layer_auto_schedule.a
@mkdir -p $(@D)
Expand Down
4 changes: 2 additions & 2 deletions apps/depthwise_separable_conv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ $(GENERATOR_BIN)/depthwise_separable_conv.generator: depthwise_separable_conv_ge

$(BIN)/%/depthwise_separable_conv.a: $(GENERATOR_BIN)/depthwise_separable_conv.generator
@mkdir -p $(@D)
$^ -g depthwise_separable_conv -e $(GENERATOR_OUTPUTS) -o $(@D) -f depthwise_separable_conv target=$* auto_schedule=false
$^ -g depthwise_separable_conv -e $(GENERATOR_OUTPUTS) -o $(@D) -f depthwise_separable_conv target=$(HL_TARGET) auto_schedule=false

$(BIN)/%/depthwise_separable_conv_auto_schedule.a: $(GENERATOR_BIN)/depthwise_separable_conv.generator
@mkdir -p $(@D)
$^ -g depthwise_separable_conv -e $(GENERATOR_OUTPUTS) -o $(@D) -f depthwise_separable_conv_auto_schedule target=$*-no_runtime auto_schedule=true
$^ -g depthwise_separable_conv -e $(GENERATOR_OUTPUTS) -o $(@D) -f depthwise_separable_conv_auto_schedule target=$(HL_TARGET)-no_runtime auto_schedule=true

$(BIN)/%/process: process.cpp $(BIN)/%/depthwise_separable_conv.a $(BIN)/%/depthwise_separable_conv_auto_schedule.a
@-mkdir -p $(BIN)
Expand Down
10 changes: 5 additions & 5 deletions apps/fft/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ bench_64x64: $(BIN)/$(HL_TARGET)/bench_fft

$(GENERATOR_BIN)/fft.generator: fft_generator.cpp fft.cpp fft.h $(GENERATOR_DEPS)
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@ $(LIBHALIDE_LDFLAGS)
$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@ $(LIBHALIDE_LDFLAGS)

# Generate four AOT compiled FFT variants. Forward versions have gain set to 1 / 256.0
$(BIN)/%/fft_forward_r2c.a: $(GENERATOR_BIN)/fft.generator
@mkdir -p $(@D)
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_forward_r2c target=$* direction=samples_to_frequency size0=16 size1=16 gain=0.00390625 input_number_type=real output_number_type=complex
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_forward_r2c target=$(HL_TARGET) direction=samples_to_frequency size0=16 size1=16 gain=0.00390625 input_number_type=real output_number_type=complex

$(BIN)/%/fft_inverse_c2r.a: $(GENERATOR_BIN)/fft.generator
@mkdir -p $(@D)
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_inverse_c2r target=$* direction=frequency_to_samples size0=16 size1=16 input_number_type=complex output_number_type=real
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_inverse_c2r target=$(HL_TARGET) direction=frequency_to_samples size0=16 size1=16 input_number_type=complex output_number_type=real

$(BIN)/%/fft_forward_c2c.a: $(GENERATOR_BIN)/fft.generator
@mkdir -p $(@D)
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_forward_c2c target=$* direction=samples_to_frequency size0=16 size1=16 gain=0.00390625 input_number_type=complex output_number_type=complex
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_forward_c2c target=$(HL_TARGET) direction=samples_to_frequency size0=16 size1=16 gain=0.00390625 input_number_type=complex output_number_type=complex

$(BIN)/%/fft_inverse_c2c.a: $(GENERATOR_BIN)/fft.generator
@mkdir -p $(@D)
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_inverse_c2c target=$* direction=frequency_to_samples size0=16 size1=16 input_number_type=complex output_number_type=complex
$^ -g fft -e $(GENERATOR_OUTPUTS) -o $(@D) -f fft_inverse_c2c target=$(HL_TARGET) direction=frequency_to_samples size0=16 size1=16 input_number_type=complex output_number_type=complex

$(BIN)/%/fft_aot_test: fft_aot_test.cpp $(BIN)/%/fft_forward_r2c.a $(BIN)/%/fft_inverse_c2r.a $(BIN)/%/fft_forward_c2c.a $(BIN)/%/fft_inverse_c2c.a
@mkdir -p $(@D)
Expand Down
4 changes: 2 additions & 2 deletions apps/glsl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ $(GENERATOR_BIN)/halide_blur_glsl.generator: halide_blur_glsl_generator.cpp $(GE

$(BIN)/%/halide_blur_glsl.a: $(GENERATOR_BIN)/halide_blur_glsl.generator
@mkdir -p $(@D)
$^ -g halide_blur_glsl -e $(GENERATOR_OUTPUTS) -o $(@D) target=$*-opengl-debug
$^ -g halide_blur_glsl -e $(GENERATOR_OUTPUTS) -o $(@D) target=$(HL_TARGET)-opengl-debug

$(GENERATOR_BIN)/halide_ycc_glsl.generator: halide_ycc_glsl_generator.cpp $(GENERATOR_DEPS)
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(filter %.cpp,$^) -o $@ $(LIBHALIDE_LDFLAGS)

$(BIN)/%/halide_ycc_glsl.a: $(GENERATOR_BIN)/halide_ycc_glsl.generator
@mkdir -p $(@D)
$^ -g halide_ycc_glsl -e $(GENERATOR_OUTPUTS) -o $(@D) target=$*-opengl-debug
$^ -g halide_ycc_glsl -e $(GENERATOR_OUTPUTS) -o $(@D) target=$(HL_TARGET)-opengl-debug

$(BIN)/%/opengl_test: opengl_test.cpp $(BIN)/%/halide_blur_glsl.a $(BIN)/%/halide_ycc_glsl.a
@mkdir -p $(@D)
Expand Down
6 changes: 3 additions & 3 deletions apps/harris/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ $(GENERATOR_BIN)/harris.generator: harris_generator.cpp $(GENERATOR_DEPS)

$(BIN)/%/harris.a: $(GENERATOR_BIN)/harris.generator
@mkdir -p $(@D)
$< -g harris -f harris -o $(BIN)/$* target=$*-no_runtime auto_schedule=false
$< -g harris -f harris -o $(BIN)/$* target=$(HL_TARGET)-no_runtime auto_schedule=false

$(BIN)/%/harris_auto_schedule.a: $(GENERATOR_BIN)/harris.generator
@mkdir -p $(@D)
$< -g harris -f harris_auto_schedule -o $(BIN)/$* target=$*-no_runtime auto_schedule=true
$< -g harris -f harris_auto_schedule -o $(BIN)/$* target=$(HL_TARGET)-no_runtime auto_schedule=true

$(BIN)/%/runtime.a: $(GENERATOR_BIN)/harris.generator
@mkdir -p $(@D)
$< -r runtime -o $(BIN)/$* target=$*
$< -r runtime -o $(BIN)/$* target=$(HL_TARGET)

$(BIN)/%/filter: filter.cpp $(BIN)/%/harris.a $(BIN)/%/harris_auto_schedule.a $(BIN)/%/runtime.a
@mkdir -p $(@D)
Expand Down
12 changes: 6 additions & 6 deletions apps/hexagon_benchmarks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ $(GENERATOR_BIN)/%.generator : %_generator.cpp $(GENERATOR_DEPS)

$(BIN)/%/conv3x3a16.o: $(GENERATOR_BIN)/conv3x3.generator
@mkdir -p $(@D)
$^ -g conv3x3 -o $(@D) -e object,c_header -f conv3x3a16 target=$* accumulator_type=int16 ${SCHEDULING_OPTS}
$^ -g conv3x3 -o $(@D) -e object,c_header -f conv3x3a16 target=$(HL_TARGET) accumulator_type=int16 ${SCHEDULING_OPTS}

$(BIN)/%/dilate3x3.o: $(GENERATOR_BIN)/dilate3x3.generator
@mkdir -p $(@D)
$^ -g dilate3x3 -o $(@D) -e object,c_header -f dilate3x3 target=$* ${SCHEDULING_OPTS}
$^ -g dilate3x3 -o $(@D) -e object,c_header -f dilate3x3 target=$(HL_TARGET) ${SCHEDULING_OPTS}

$(BIN)/%/median3x3.o: $(GENERATOR_BIN)/median3x3.generator
@mkdir -p $(@D)
$^ -g median3x3 -o $(@D) -e object,c_header -f median3x3 target=$* ${SCHEDULING_OPTS}
$^ -g median3x3 -o $(@D) -e object,c_header -f median3x3 target=$(HL_TARGET) ${SCHEDULING_OPTS}

$(BIN)/%/gaussian5x5.o: $(GENERATOR_BIN)/gaussian5x5.generator
@mkdir -p $(@D)
$^ -g gaussian5x5 -o $(@D) -e object,c_header -f gaussian5x5 target=$* ${SCHEDULING_OPTS}
$^ -g gaussian5x5 -o $(@D) -e object,c_header -f gaussian5x5 target=$(HL_TARGET) ${SCHEDULING_OPTS}

$(BIN)/%/sobel.o: $(GENERATOR_BIN)/sobel.generator
@mkdir -p $(@D)
$^ -g sobel -o $(@D) -e object,c_header -f sobel target=$* ${SCHEDULING_OPTS}
$^ -g sobel -o $(@D) -e object,c_header -f sobel target=$(HL_TARGET) ${SCHEDULING_OPTS}

$(BIN)/%/conv3x3a32.o: $(GENERATOR_BIN)/conv3x3.generator
@mkdir -p $(@D)
$^ -g conv3x3 -o $(@D) -e object,c_header -f conv3x3a32 target=$* accumulator_type=int32 ${SCHEDULING_OPTS}
$^ -g conv3x3 -o $(@D) -e object,c_header -f conv3x3a32 target=$(HL_TARGET) accumulator_type=int32 ${SCHEDULING_OPTS}

$(BIN)/%/filters.a : $(OBJS)
ar q $(BIN)/$*/filters.a $^
Expand Down
Loading