Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Halide Conv Layer Benchmark. #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taiqzheng
Copy link
Contributor

@taiqzheng taiqzheng commented Feb 27, 2023

Update:
Three versions of the Halide Conv Layer benchmark:
- Non schedule
- Manually schedule
- Auto schedule

Build Halide:
Please build Halide 14.0.0 with cmake , here is the link -> Halide-cmake.

Though Halide 14.0.0 is the latest version, it doesn't support LLVM 15.0.0, so I built LLVM 14.0.0 from source.

Note:

  1. xxx_generator.cpp file generate the header file and the library which was needed for the AOT Compilation Mode.
  2. See <path/to/buddy-benchmark/benchmarks/DeepLearning/Layers>/CMakeLists.txt for porting other Halide Benchmarks.

@zhanghb97
Copy link
Member

Encountered the following error:

CMake Error at CMakeLists.txt:97 (find_package):
  Found package configuration file:

    /root/Halide/build/packaging/HalideConfig.cmake

  but it set Halide_FOUND to FALSE so package "Halide" is considered to be
  NOT FOUND.  Reason given by package:

  Halide `static` libraries were requested but not found.

Any ideas?

@taiqzheng
Copy link
Contributor Author

taiqzheng commented Mar 14, 2023

Halide supports limited versions of LLVM, the above error appears when encountering unsupported versions of LLVM.

Update:
Build & Install Halide (main branch):
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=<path/to/buddy-mlir>/llvm/build/lib/cmake/llvm -S . -B build
cmake --build build
cmake --install ./build --prefix ./Halide-install

Build DeepLearning Benchmark:
cmake -G Ninja ..
-DDEEP_LEARNING_BENCHMARKS=ON \
-DOpenCV_DIR=<path/to/OpenCV>/build/ \
-DCMAKE_PREFIX_PATH=$PWD/../thirdparty/Halide/Halide-install/ \
-DBUDDY_MLIR_BUILD_DIR=<path/to/buddy-mlir>/build/ \
-DCMAKE_BUILD_TYPE=RELEASE
ninja

Run Halide Benchmark:
cd build/bin/
./halide-convlayer-benchmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants