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

windows-arm64 #756

Merged
merged 6 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body:
- Web (WASM)
- Linux (x86_64)
- macOS (x86_64, arm64)
- Windows (x86_64)
- Windows (x86_64, arm64)
- Raspberry Pi
- ARM Cortex-M
validations:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/c-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ jobs:
strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]

make_file: ["Unix Makefiles"]
include:
- machine: pv-windows-arm64
make_file: "MinGW Makefiles"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Create build directory
run: cmake -B ./build
run: cmake -G "${{ matrix.make_file }}" -B ./build

- name: Build micdemo
run: cmake --build ./build --target rhino_demo_mic
Expand Down Expand Up @@ -123,6 +126,7 @@ jobs:
strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
make_file: ["Unix Makefiles"]
include:
- machine: rpi3-32
platform: raspberry-pi
Expand All @@ -139,14 +143,18 @@ jobs:
- machine: rpi5-64
platform: raspberry-pi
arch: cortex-a76-aarch64
- machine: pv-windows-arm64
platform: windows
arch: arm64
make_file: "MinGW Makefiles"

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Create build directory
run: cmake -B ./build
run: cmake -G "${{ matrix.make_file }}" -B ./build

- name: Build filedemo
run: cmake --build ./build --target rhino_demo_file
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dotnet-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
include:
- machine: rpi3-32
platform: raspberry-pi
Expand All @@ -71,6 +71,8 @@ jobs:
platform: raspberry-pi
- machine: rpi5-64
platform: raspberry-pi
- machine: pv-windows-arm64
platform: windows

steps:
- uses: actions/checkout@v3
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
binding-framework: net8.0
test-framework: net8.0
exclude:
- os: ubuntu-latest
dotnet-version: 2.1.x
- os: ubuntu-latest
dotnet-version: 3.0.x
- os: ubuntu-latest
dotnet-version: 3.1.x
- os: ubuntu-latest
dotnet-version: 5.0.x
- os: macos-latest
dotnet-version: 2.1.x
- os: macos-latest
Expand All @@ -87,11 +95,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup .NET 8.0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Set up .NET (8)
if: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '6.0.x' }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Build binding
run: dotnet build Rhino/Rhino.csproj --framework ${{ matrix.binding-framework }}

Expand All @@ -105,7 +119,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/java-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
include:
- machine: rpi3-32
platform: raspberry-pi
Expand All @@ -66,6 +66,8 @@ jobs:
platform: raspberry-pi
- machine: rpi5-64
platform: raspberry-pi
- machine: pv-windows-arm64
platform: windows

steps:
- uses: actions/checkout@v3
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/java-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,24 @@ jobs:
- name: Machine state after
working-directory: resources/scripts
run: bash machine-state.sh

perf-windows-arm64:
runs-on: ${{ matrix.machine }}

strategy:
fail-fast: false
matrix:
machine: [pv-windows-arm64]
include:
- machine: pv-windows-arm64
num_test_iterations: 50
performance_threshold_sec: 0.5

steps:
- uses: actions/checkout@v3

- name: Build
run: ./gradlew assemble

- name: Test
run: ./gradlew test --info --tests RhinoPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="${{matrix.num_test_iterations}}" -DperformanceThresholdSec="${{matrix.performance_threshold_sec}}"
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nodejs-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
include:
- machine: rpi3-32
platform: raspberry-pi
Expand All @@ -69,6 +69,8 @@ jobs:
platform: raspberry-pi
- machine: rpi5-64
platform: raspberry-pi
- machine: pv-windows-arm64
platform: windows

steps:
- uses: actions/checkout@v3
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/nodejs-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,23 @@ jobs:
- name: Machine state after
working-directory: resources/scripts
run: bash machine-state.sh

build-windows-arm64:
runs-on: ${{ matrix.machine }}

strategy:
matrix:
machine: [pv-windows-arm64]
include:
- machine: pv-windows-arm64
num_test_iterations: 50
performance_threshold_sec: 0.2

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: yarn install

- name: Test
run: yarn test test/perf.test.ts --access_key=${{secrets.PV_VALID_ACCESS_KEY}} --num_test_iterations=${{matrix.num_test_iterations}} --performance_threshold_sec=${{matrix.performance_threshold_sec}}
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/python-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]
include:
- machine: rpi3-32
platform: raspberry-pi
Expand All @@ -69,6 +69,8 @@ jobs:
platform: raspberry-pi
- machine: rpi5-64
platform: raspberry-pi
- machine: pv-windows-arm64
platform: windows

steps:
- uses: actions/checkout@v3
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/python-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,21 @@ jobs:
- name: Machine state after
working-directory: resources/scripts
run: bash machine-state.sh

perf-windows-arm64:
runs-on: ${{ matrix.machine }}

strategy:
fail-fast: false
matrix:
machine: [pv-windows-arm64]
include:
- machine: pv-windows-arm64
num_test_iterations: 50
performance_threshold_sec: 0.2

steps:
- uses: actions/checkout@v3

- name: Test
run: python3 test_rhino_perf.py ${{secrets.PV_VALID_ACCESS_KEY}} ${{matrix.num_test_iterations}} ${{matrix.performance_threshold_sec}}
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:

strategy:
matrix:
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64]
machine: [rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-64, pv-windows-arm64]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Rhino is:
- Raspberry Pi
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64)
- Linux (x86_64), macOS (x86_64, arm64), and Windows (x86_64, arm64)
- self-service. Developers can train custom contexts using [Picovoice Console](https://console.picovoice.ai/).

## Table of Contents
Expand Down
4 changes: 2 additions & 2 deletions binding/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Rhino is:

Platform compatible with .NET Framework 4.6.1+:

- Windows (x86_64)
- Windows (x86_64, arm64)

Platforms compatible with .NET Core 2.0+:

- Linux (x86_64)
- macOS (x86_64)
- Windows (x86_64)
- Windows (x86_64, arm64)

Platforms compatible with .NET Core 3.0+:

Expand Down
57 changes: 30 additions & 27 deletions binding/dotnet/Rhino/Rhino.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0;netcoreapp3.0;netstandard2.0</TargetFrameworks>
<Version>3.0.4</Version>
<Version>3.0.5</Version>
<Authors>Picovoice</Authors>
<Company />
<Product>Rhino Speech-to-Intent Engine</Product>
Expand All @@ -22,7 +22,7 @@
- using deep neural networks trained in real-world environments.
- compact and computationally-efficient, making it perfect for IoT.
- cross-platform. It is implemented in fixed-point ANSI C. Raspberry Pi (Zero, 3, 4, 5),
Android, iOS, Linux (x86_64), Mac (x86_64), Windows (x86_64), and web browsers are supported.
Android, iOS, Linux (x86_64), Mac (x86_64), Windows (x86_64, arm64), and web browsers are supported.
Furthermore, Support for various ARM Cortex-A microprocessors and ARM Cortex-M microcontrollers
is available for enterprise customers.
- self-service. Developers and UX designers can train custom models using Picovoice Console.
Expand Down Expand Up @@ -62,17 +62,6 @@
<Link>lib\windows\amd64\libpv_rhino.dll</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\linux\x86_64\libpv_rhino.so">
<PackagePath>
build/netstandard2.0/libpv_rhino.so;
build/netcoreapp3.0/lib/linux/x86_64/libpv_rhino.so;
build/net6.0/lib/linux/x86_64/libpv_rhino.so;
build/net8.0/lib/linux/x86_64/libpv_rhino.so;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\linux\x86_64\libpv_rhino.so</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\mac\x86_64\libpv_rhino.dylib">
<PackagePath>
build/netstandard2.0/libpv_rhino.dylib;
Expand All @@ -86,20 +75,6 @@
</Content>
</ItemGroup>

<!--.NET Core 3.0+ Libs-->
<ItemGroup>
<Content Include="..\..\..\lib\raspberry-pi\**\*" Exclude="..\..\..\lib\raspberry-pi\arm11\*">
<PackagePath>
build/netcoreapp3.0/lib/raspberry-pi;
build/net6.0/lib/raspberry-pi;
build/net8.0/lib/raspberry-pi;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\raspberry-pi\%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

<!--.NET 6.0+ libs-->
<ItemGroup>
<Content Include="..\..\..\lib\mac\arm64\libpv_rhino.dylib">
Expand All @@ -111,6 +86,34 @@
<Link>lib\mac\arm64\libpv_rhino.dylib</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\windows\arm64\libpv_rhino.dll">
<PackagePath>
build/net6.0/lib/windows/arm64/libpv_rhino.dll;
build/net8.0/lib/windows/arm64/libpv_rhino.dll;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\windows\arm64\libpv_rhino.dll</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\linux\x86_64\libpv_rhino.so">
<PackagePath>
build/net6.0/lib/linux/x86_64/libpv_rhino.so;
build/net8.0/lib/linux/x86_64/libpv_rhino.so;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\linux\x86_64\libpv_rhino.so</Link>
<Visible>false</Visible>
</Content>
<Content Include="..\..\..\lib\raspberry-pi\**\*" Exclude="..\..\..\lib\raspberry-pi\arm11\*">
<PackagePath>
build/netcoreapp3.0/lib/raspberry-pi;
build/net6.0/lib/raspberry-pi;
build/net8.0/lib/raspberry-pi;
</PackagePath>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>lib\raspberry-pi\%(RecursiveDir)%(Filename)%(Extension)</Link>
<Visible>false</Visible>
</Content>
</ItemGroup>

<!--Resources-->
Expand Down
4 changes: 4 additions & 0 deletions binding/dotnet/Rhino/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public static string PvLibraryPath(string libName)
{
return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/amd64/{libName}.dll");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && _arch == Architecture.Arm64)
{
return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/arm64/{libName}.dll");
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && _arch == Architecture.X64)
{
return Path.Combine(AppContext.BaseDirectory, $"lib/{_env}/x86_64/{libName}.dylib");
Expand Down
Loading
Loading