mirror of https://github.com/kendryte/nncase.git
Compare commits
9 Commits
abf5525756
...
a0ecf2bedf
Author | SHA1 | Date |
---|---|---|
huochenghai | a0ecf2bedf | |
huochenghai | 2ad15afdfd | |
huochenghai | 83ca3fbb11 | |
huochenghai | f452b5ac6b | |
huochenghai | f520ebe825 | |
huochenghai | 68a761db2e | |
huochenghai | 8e922609e8 | |
zhangyang2057 | b17e5b22b6 | |
huochenghai | 91ea4df975 |
|
@ -17,7 +17,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest, cmakeArgs: -DENABLE_X86SIMD=OFF, buildType: Release}
|
||||
- {name: x86_64-macos, os: macos-12, cmakeArgs: -DENABLE_X86SIMD=OFF, buildType: Release}
|
||||
- {name: x86_64-linux, os: ubuntu-latest, cmakeArgs: '', buildType: Release}
|
||||
- {name: x86_64-windows, os: windows-latest, arch: x64, cmakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl, buildType: Release}
|
||||
|
||||
|
@ -79,7 +79,7 @@ jobs:
|
|||
matrix:
|
||||
dotnet-version: ['7.0']
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest, shell: bash, rid: osx-x64, buildType: Release}
|
||||
- {name: x86_64-macos, os: macos-12, shell: bash, rid: osx-x64, buildType: Release}
|
||||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash, rid: linux-x64, buildType: Release}
|
||||
- {name: x86_64-windows, os: windows-latest, shell: bash, rid: win-x64, buildType: Release}
|
||||
|
||||
|
@ -168,7 +168,7 @@ jobs:
|
|||
matrix:
|
||||
dotnet-version: ['7.0']
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest, shell: bash}
|
||||
- {name: x86_64-macos, os: macos-12, shell: bash}
|
||||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash}
|
||||
- {name: x86_64-windows, os: windows-latest, shell: bash}
|
||||
|
||||
|
@ -245,7 +245,7 @@ jobs:
|
|||
cache-dependency-path: '**/requirements.test.txt'
|
||||
|
||||
- name: Install Python Packages
|
||||
run:
|
||||
run:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.test.txt
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
matrix:
|
||||
dotnet-version: ['7.0']
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest, shell: bash, rid: osx-x64, buildType: Release}
|
||||
- {name: x86_64-macos, os: macos-12, shell: bash, rid: osx-x64, buildType: Release}
|
||||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash, rid: linux-x64, buildType: Release}
|
||||
- {name: x86_64-windows, os: windows-latest, shell: bash, rid: win-x64, buildType: Release}
|
||||
|
||||
|
@ -53,7 +53,7 @@ jobs:
|
|||
matrix:
|
||||
dotnet-version: ['7.0']
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest}
|
||||
- {name: x86_64-macos, os: macos-12}
|
||||
- {name: x86_64-linux, os: ubuntu-latest}
|
||||
- {name: x86_64-windows, os: windows-latest, arch: x64}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {name: x86_64-macos, os: macos-latest}
|
||||
- {name: x86_64-macos, os: macos-12}
|
||||
- {name: x86_64-linux, os: ubuntu-latest}
|
||||
- {name: x86_64-windows, os: windows-latest}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { name: x86_64-macos, os: macos-latest, cmakeArgs: '', buildType: Release }
|
||||
- { name: x86_64-macos, os: macos-12, cmakeArgs: '', buildType: Release }
|
||||
- { name: x86_64-linux, os: ubuntu-latest, cmakeArgs: '', buildType: Release }
|
||||
- { name: x86_64-windows, os: windows-latest, arch: x64, cmakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl, buildType: Release }
|
||||
|
||||
|
@ -109,7 +109,7 @@ jobs:
|
|||
wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.toolchain_file}}.tar.xz -O toolchain.tar.xz
|
||||
sudo tar xf toolchain.tar.xz -C $GITHUB_WORKSPACE
|
||||
echo "${{matrix.config.toolchain_env}}=$GITHUB_WORKSPACE/${{matrix.config.toolchain_file}}" >> $GITHUB_ENV
|
||||
|
||||
|
||||
wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.qemu}}.tgz -O qemu.tgz
|
||||
sudo tar xf qemu.tgz -C /usr/local/bin
|
||||
echo "TESTS_EXECUTABLE_LOADER=${{matrix.config.qemu}}" >> $GITHUB_ENV
|
||||
|
|
|
@ -307,3 +307,6 @@ cmake-build-*
|
|||
*.ipynb_checkpoints*
|
||||
# Auto generated files
|
||||
# generated/
|
||||
|
||||
.mono/
|
||||
.history/
|
|
@ -54,7 +54,7 @@ class nncaseConan(ConanFile):
|
|||
self.requires('rapidjson/1.1.x')
|
||||
|
||||
if self.options.python:
|
||||
self.requires('pybind11/2.6.1')
|
||||
self.requires('pybind11/2.12.0')
|
||||
|
||||
if not self.options.runtime:
|
||||
self.requires('abseil/20220623.1')
|
||||
|
|
5
setup.py
5
setup.py
|
@ -83,8 +83,7 @@ class InstallCMakeLibs(install_lib):
|
|||
os.walk(os.path.join(bin_dir, 'sharplibs')) for _lib in files if
|
||||
os.path.isfile(os.path.join(root, _lib)) and
|
||||
(os.path.splitext(_lib)[-1] in [".dll", ".so", ".dylib", ".json"] or
|
||||
_lib.startswith("lib"))
|
||||
and not _lib.endswith(".deps.json")]
|
||||
_lib.startswith("lib"))]
|
||||
|
||||
for lib in sharp_libs:
|
||||
shutil.move(lib, os.path.join(self.build_dir,
|
||||
|
@ -204,7 +203,7 @@ class BuildCMakeExt(build_ext):
|
|||
extdir += os.path.sep
|
||||
|
||||
bin_dir = os.path.abspath(os.path.join(self.build_temp, 'install'))
|
||||
cmake_args = ['-G', 'Ninja', '-DDOTNET_INIT_FOR_CONFIG=ON']
|
||||
cmake_args = ['-G', 'Ninja', '-DDOTNET_INIT_FOR_CONFIG=OFF']
|
||||
if platform.system() == 'Windows':
|
||||
cmake_args += ['-DCMAKE_C_COMPILER=clang-cl']
|
||||
cmake_args += ['-DCMAKE_CXX_COMPILER=clang-cl']
|
||||
|
|
|
@ -58,11 +58,13 @@ class OnnxTestRunner(TestRunner):
|
|||
elif model_file.startswith('onnx-models'):
|
||||
model_file = os.path.join(os.getenv('ONNX_MODELS_DIR'),
|
||||
model_file[len('onnx-models/'):])
|
||||
has_external_data = False
|
||||
if self.case_dir != os.path.dirname(model_file):
|
||||
new_file = os.path.join(self.case_dir, 'test.onnx')
|
||||
shutil.copy(model_file, new_file)
|
||||
for tensor in external_data_helper._get_all_tensors(onnx.load(model_file, load_external_data=False)):
|
||||
if external_data_helper.uses_external_data(tensor):
|
||||
has_external_data = True
|
||||
info = external_data_helper.ExternalDataInfo(tensor)
|
||||
file_location = external_data_helper._sanitize_path(info.location)
|
||||
external_data_src_path = os.path.join(
|
||||
|
@ -76,7 +78,8 @@ class OnnxTestRunner(TestRunner):
|
|||
if not self.inputs:
|
||||
self.parse_model(model_file)
|
||||
|
||||
model_file = self.do_preprocess(model_file)
|
||||
if not has_external_data:
|
||||
model_file = self.do_preprocess(model_file)
|
||||
|
||||
super().run(model_file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue