Compare commits

...

4 Commits

Author SHA1 Message Date
dependabot[bot] 8e91228706
Merge 0ff949144c into b17e5b22b6 2024-05-04 23:26:28 -03:00
zhangyang2057 b17e5b22b6
Fix macos-latest doesn't support python 3.7 issue. (#1194)
* Fix macos-latest doesn't support python 3.7 issue.

* Set macos version to 12(13 uses Xcode 15).
2024-04-26 17:03:38 +08:00
huochenghai 91ea4df975
fix fold binary (#1182) 2024-04-12 12:26:50 +08:00
dependabot[bot] 0ff949144c
Bump tensorflow from 2.10.0 to 2.11.1
Bumps [tensorflow](https://github.com/tensorflow/tensorflow) from 2.10.0 to 2.11.1.
- [Release notes](https://github.com/tensorflow/tensorflow/releases)
- [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md)
- [Commits](https://github.com/tensorflow/tensorflow/compare/v2.10.0...v2.11.1)

---
updated-dependencies:
- dependency-name: tensorflow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-25 00:41:52 +00:00
6 changed files with 13 additions and 12 deletions

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -1,4 +1,4 @@
tensorflow==2.10.0
tensorflow==2.11.1
matplotlib
pillow
opencv-python

View File

@ -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
{