Skip to content

Commit

Permalink
Merge branch 'master' into merge_master
Browse files Browse the repository at this point in the history
  • Loading branch information
jingpu committed Jun 14, 2017
2 parents 8a44e3e + d55ebd5 commit 4d1d8d3
Show file tree
Hide file tree
Showing 112 changed files with 4,672 additions and 2,251 deletions.
185 changes: 140 additions & 45 deletions Makefile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Build Status

Updates
------------

- 2017/06/13 merge Halide release 2017/05/03
- 2017/06/14 merge Halide nightly 2017/06/13 ( d55ebd5b806110cd77e7c4f2616ddb9ffbf2e99e ), picking up aotcpp_generators tests.
- 2017/06/13 merge Halide release 2017/05/03.
11 changes: 0 additions & 11 deletions README.orig.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,17 +376,6 @@ To build and run the HelloHexagon example in Halide/apps/HelloHexagon on the sim

#### To build and run the HelloHexagon example in Halide/apps/HelloHexagon on Android:

The device needs to be prepared to run Halide Hexagon code. Halide uses a small
runtime library that must be present on the device. The device must be signed as
a debug device to run Hexagon code, or the libhalide\_hexagon\_remote\_skel.so
library must be signed. Refer to the Hexagon SDK documentation for more information
about signing Hexagon binaries (see: Hexagon\_SDK/3.0/docs/Tools\_Signing.html).

adb shell mkdir -p /system/lib/rfsa/adsp
adb push src/runtime/hexagon_remote/bin/arm-32-android/libhalide_hexagon_host.so /system/lib/
adb push src/runtime/hexagon_remote/bin/arm-64-android/libhalide_hexagon_host.so /system/lib64/
adb push src/runtime/hexagon_remote/bin/v60/libhalide_hexagon_remote_skel.so /system/lib/rfsa/adsp/

To build the example for Android, first ensure that you have a standalone toolchain
created from the NDK using the make-standalone-toolchain.sh script:

Expand Down
2 changes: 2 additions & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ macro(add_if_have_libpng dirname)
endif()
endmacro()

include(${CMAKE_SOURCE_DIR}/HalideGenerator.cmake)

add_if_have_libpng(bilateral_grid)
add_subdirectory(blur)
add_subdirectory(c_backend)
Expand Down
17 changes: 11 additions & 6 deletions apps/HelloHexagon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ $(BIN)/%/pipeline_hvx128.o: $(BIN)/pipeline
$(BIN)/process-%: process.cpp $(BIN)/%/pipeline_cpu.o $(BIN)/%/pipeline_hvx64.o $(BIN)/%/pipeline_hvx128.o
$(CXX-$*) $(CXXFLAGS) $(CXXFLAGS-$*) -I $(BIN)/$* -Wall -O3 process.cpp $(BIN)/$*/pipeline_cpu.o $(BIN)/$*/pipeline_hvx64.o $(BIN)/$*/pipeline_hvx128.o -o $(BIN)/process-$* $(LDFLAGS-$*)

# This requires root: adb root && adb wait-for-device && adb remount
DEVICE_PATH ?= /data/local/tmp/HelloHexagon
DEVICE_ENV = "LD_LIBRARY_PATH=$(DEVICE_PATH):/vendor/lib64 ADSP_LIBRARY_PATH=\"$(DEVICE_PATH);/dsp\""
HEXAGON_RUNTIME_PATH = $(HALIDE_SRC_PATH)/src/runtime/hexagon_remote
run-%-android: $(BIN)/process-%-android
adb push $(BIN)/process-$*-android /data/
adb shell chmod +x /data/process-$*-android
adb shell /data/process-$*-android cpu 10
adb shell /data/process-$*-android hvx64 10
adb shell /data/process-$*-android hvx128 10
adb shell mkdir -p $(DEVICE_PATH)
adb push $(BIN)/process-$*-android $(DEVICE_PATH)
adb push $(HEXAGON_RUNTIME_PATH)/bin/$*-android/libhalide_hexagon_host.so $(DEVICE_PATH)
adb push $(HEXAGON_RUNTIME_PATH)/bin/v60/signed_by_debug/libhalide_hexagon_remote_skel.so $(DEVICE_PATH)
adb shell chmod +x $(DEVICE_PATH)/process-$*-android
adb shell $(DEVICE_ENV) $(DEVICE_PATH)/process-$*-android cpu 10
adb shell $(DEVICE_ENV) $(DEVICE_PATH)/process-$*-android hvx64 10
adb shell $(DEVICE_ENV) $(DEVICE_PATH)/process-$*-android hvx128 10

run-host: $(BIN)/process-host
$(BIN)/process-host cpu 10
Expand Down
2 changes: 1 addition & 1 deletion apps/c_backend/pipeline_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Pipeline : public Halide::Generator<Pipeline> {
h.define_extern("an_extern_stage", {f}, Int(16), 0, NameMangling::C);
g(x, y) = cast<uint16_t>(f(y, x) + f(x, y) + an_extern_func(x, y) + h());

f.compute_root();
f.compute_root().vectorize(x, 8);
h.compute_root();

return g;
Expand Down
Loading

0 comments on commit 4d1d8d3

Please sign in to comment.