mirror of https://github.com/kendryte/nncase.git
Compare commits
4 Commits
2a4bdd5ddc
...
8e91228706
Author | SHA1 | Date |
---|---|---|
dependabot[bot] | 8e91228706 | |
zhangyang2057 | b17e5b22b6 | |
huochenghai | 91ea4df975 | |
dependabot[bot] | 0ff949144c |
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tensorflow==2.10.0
|
||||
tensorflow==2.11.1
|
||||
matplotlib
|
||||
pillow
|
||||
opencv-python
|
||||
|
|
|
@ -23,13 +23,14 @@ public sealed partial class FoldNopBinary : IRewriteRule
|
|||
/// <inheritdoc/>
|
||||
public IPattern Pattern { get; } = IsBinary(
|
||||
"binary",
|
||||
"call",
|
||||
x => x.BinaryOp is BinaryOp.Add or BinaryOp.Sub or BinaryOp.Mul or BinaryOp.Div or BinaryOp.Mod or BinaryOp.Pow,
|
||||
IsWildcard("lhs"),
|
||||
IsTensorConst("rhs"));
|
||||
|
||||
private Expr? GetReplace(Binary binary, Expr lhs, TensorConst rhs)
|
||||
private Expr? GetReplace(Binary binary, Call call, Expr lhs, TensorConst rhs)
|
||||
{
|
||||
if (lhs.CheckedType is Nncase.IR.AnyType || lhs.CheckedShape == rhs.CheckedShape)
|
||||
if ((lhs.CheckedType is Nncase.IR.AnyType && rhs.CheckedShape.IsScalar) || (lhs.CheckedShape == call.CheckedShape))
|
||||
{
|
||||
return binary.BinaryOp switch
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue