Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into arm_sve_redux
Browse files Browse the repository at this point in the history
  • Loading branch information
abadams committed Mar 13, 2024
2 parents 9d8e2c6 + 83616f2 commit 32d1fcb
Show file tree
Hide file tree
Showing 30 changed files with 884 additions and 388 deletions.
9 changes: 5 additions & 4 deletions apps/hexagon_benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ endmacro()
add_generator_and_library(dilate3x3)
add_generator_and_library(gaussian5x5)
add_generator_and_library(median3x3)
add_generator_and_library(sobel)

# Main executable
add_executable(process process.cpp)
target_compile_options(process PRIVATE $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-O2>)
if (Halide_TARGET MATCHES "hvx")
target_compile_definitions(process PRIVATE DILATE3X3 GAUSSIAN5X5 MEDIAN3X3 TARGET_HAS_HVX)
target_compile_definitions(process PRIVATE DILATE3X3 GAUSSIAN5X5 MEDIAN3X3 SOBEL TARGET_HAS_HVX)
else()
target_compile_definitions(process PRIVATE DILATE3X3 GAUSSIAN5X5 MEDIAN3X3)
target_compile_definitions(process PRIVATE DILATE3X3 GAUSSIAN5X5 MEDIAN3X3 SOBEL)
endif()
target_link_libraries(process
PRIVATE
Halide::Tools
dilate3x3 gaussian5x5 median3x3)
dilate3x3 gaussian5x5 median3x3 sobel)

# Test that the app actually works!
add_test(NAME hexagon_benchmarks COMMAND process -n 1)
set_tests_properties(hexagon_benchmarks PROPERTIES
LABELS hexagon_benchmarks
PASS_REGULAR_EXPRESSION "Success!"
SKIP_REGULAR_EXPRESSION "\\[SKIP\\]")
SKIP_REGULAR_EXPRESSION "\\[SKIP\\]")
5 changes: 3 additions & 2 deletions apps/hexagon_benchmarks/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ int main(int argc, char **argv) {
Dilate3x3Descriptor dilate3x3_pipeine(W, H);
Median3x3Descriptor median3x3_pipeline(W, H);
Gaussian5x5Descriptor gaussian5x5_pipeline(W, H);
SobelDescriptor sobel_pipeline(W, H);
Conv3x3a32Descriptor conv3x3a32_pipeline(W, H);

std::vector<PipelineDescriptorBase *> pipelines = {&conv3x3a16_pipeline, &dilate3x3_pipeine, &median3x3_pipeline,
&gaussian5x5_pipeline, &conv3x3a32_pipeline};
&gaussian5x5_pipeline, &sobel_pipeline, &conv3x3a32_pipeline};

for (PipelineDescriptorBase *p : pipelines) {
if (!p->defined()) {
Expand Down Expand Up @@ -85,4 +86,4 @@ int main(int argc, char **argv) {

printf("Success!\n");
return 0;
}
}
7 changes: 6 additions & 1 deletion apps/onnx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ ifeq ($(UNAME), Darwin)
# Keep OS X builds from complaining about missing libpython symbols
PYBIND11_CFLAGS += -undefined dynamic_lookup
endif
PY_EXT = $(shell $(PYTHON)-config --extension-suffix)
# Get the python extension module suffix from python itself. You can
# also do this with python-config, but that's not resistant to version
# mismatches between python and python-config. This can happen when
# using a virtualenv, because virtualenvs override python, but not
# python-config.
PY_EXT = $(shell $(PYTHON) -c 'import sysconfig; print(sysconfig.get_config_var("EXT_SUFFIX"))')
PY_MODEL_EXT = model_cpp$(PY_EXT)
PYCXXFLAGS = $(PYBIND11_CFLAGS) $(CXXFLAGS) -Wno-deprecated-register

Expand Down
Loading

0 comments on commit 32d1fcb

Please sign in to comment.