Skip to content

Commit

Permalink
Merge branch 'master' into release/1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnycase committed Sep 28, 2021
2 parents 9fd39f9 + fd3ee91 commit 5cfcbd7
Show file tree
Hide file tree
Showing 183 changed files with 5,225 additions and 1,069 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/compiler-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
if: runner.os == 'Linux'
shell: bash
run: |
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0 opencv-python
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install https://github.com/kendryte/caffe/releases/download/v1.0.0.20210829/kendryte_caffe-1.0.0.20210829-cp37-cp37m-manylinux_2_24_x86_64.whl
pip install pytest
Expand All @@ -152,7 +152,7 @@ jobs:
if: runner.os == 'Windows'
shell: bash
run: |
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0 opencv-python
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install https://github.com/kendryte/caffe/releases/download/v1.0.0.20210829/kendryte_caffe-1.0.0.20210829-cp37-cp37m-win_amd64.whl
pip install pytest
Expand All @@ -161,7 +161,7 @@ jobs:
if: runner.os == 'Macos'
shell: bash
run: |
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0 opencv-python
pip install torch==1.9.0 torchvision==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install https://github.com/kendryte/caffe/releases/download/v1.0.0.20210829/kendryte_caffe-1.0.0.20210829-cp37-cp37m-macosx_10_9_x86_64.whl
pip install pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: compiler-python-build
name: compiler-python-release

on: [push, pull_request]
on:
push:
tags:
- '*'

env:
BUILD_TYPE: Release
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/compiler-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
if: runner.os != 'Macos'
shell: bash
run: |
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0
pip install conan tensorflow==2.5.0 matplotlib pillow onnx==1.9.0 onnx-simplifier==0.3.6 onnxoptimizer==0.2.6 onnxruntime==1.8.0 opencv-python
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install https://github.com/kendryte/caffe/releases/download/v1.0.0.20210829/kendryte_caffe-1.0.0.20210829-cp37-cp37m-manylinux_2_24_x86_64.whl
pip install kendryte_caffe
pip install pytest
- name: Create Test Environment
Expand All @@ -96,11 +96,13 @@ jobs:
shell: bash
env:
PYTHONPATH: /tmp/nncase/lib:/tmp/nncase/python:${{github.workspace}}/tests
ONNX_MODELS_DIR: /compiler/github-runner/onnx-models
run: |
pytest tests/other --doctest-modules --junitxml=test_results/other.xml
pytest tests/importer --doctest-modules --junitxml=test_results/importer.xml
pytest tests/schedule --doctest-modules --junitxml=test_results/schedule.xml
pytest tests/graph_partition --doctest-modules --junitxml=test_results/graph_partition.xml
pytest tests/models --doctest-modules --junitxml=test_results/models.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,5 @@ tests_output

.DS_Store
RC*
wheelhouse/
wheelhouse/
test_local*
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ if (BUILDING_RUNTIME)
add_compile_options(-Wall -Wextra -pedantic -Werror -Wno-multichar -Wno-missing-field-initializers -Wno-unused-function -Wno-type-limits)
if (APPLE)
add_compile_options(-Wno-four-char-constants -Wno-sometimes-uninitialized)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wno-uninitialized -Wno-unused-private-field)
else ()
add_compile_options(-Wno-maybe-uninitialized)
add_compile_options(-Wno-maybe-uninitialized -Wno-unused-private-field)
endif()
endif()

Expand Down Expand Up @@ -152,6 +154,8 @@ else()
add_compile_options(-Wall -Wextra -pedantic -Werror -Wno-multichar -Wno-missing-field-initializers -Wno-unused-function -Wno-type-limits -Wno-unused-local-typedefs -Wno-sign-compare)
if (APPLE)
add_compile_options(-Wno-four-char-constants -Wno-sometimes-uninitialized -Wno-deprecated)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wno-uninitialized)
else ()
add_compile_options(-Wno-maybe-uninitialized -Wno-deprecated-copy)
add_link_options(-Wl,--exclude-libs,ALL)
Expand Down
2 changes: 2 additions & 0 deletions benchmark/gen_kmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def _make_module(name, target):
compile_options.dump_dir = os.path.join(TEMP_DIR, name)
compile_options.dump_ir = True
compile_options.dump_asm = True
compile_options.dump_quant_error = True
compile_options.use_mse_quant_w = True
compile_options.benchmark_only = True
compiler = nncase.Compiler(compile_options)

Expand Down
2 changes: 1 addition & 1 deletion cmake/configure-conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _SET_CONANOPT(CONAN_OPTS "halide" ENABLE_HALIDE)

if (NOT DEFINED CMAKE_CXX_STANDARD)
if (BUILDING_RUNTIME)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD 17)
else ()
set (CMAKE_CXX_STANDARD 20)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def cmake_configure(self):
cmake.definitions['ENABLE_HALIDE'] = self.options.halide
cmake.definitions['BUILD_PYTHON_BINDING'] = self.options.python
if self.options.runtime:
cmake.definitions["CMAKE_CXX_STANDARD"] = 14
cmake.definitions["CMAKE_CXX_STANDARD"] = 17
cmake.configure()
return cmake

Expand Down
Loading

0 comments on commit 5cfcbd7

Please sign in to comment.