Skip to content

Commit 74a26aa

Browse files
STFlemingmariodruizskalade
authored
Riallto v1.1 (#38)
This PR contains contributions for the v1.1 release of Riallto. * Beta Linux support + Installation scripts for Ubuntu 24.04 using the 6.10 Linux kernel. + A docker based installation flow for Linux * Upgrade flows for Ryzen AI SW to v1.1 * Hawkpoint support * bfloat16 support * Improvements for combining multiple kernels. * Improvements to nputop (Windows) * Visualisation fixes * Fixes to sequence codegen --------- Co-authored-by: Shane Fleming <sfleming@xilinx.com> Co-authored-by: Mario Ruiz <11815099+mariodruiz@users.noreply.github.com> Co-authored-by: skalade <sarunask@xilinx.com>
1 parent a2978ea commit 74a26aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1174
-254
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#
3+
# Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
4+
# SPDX-License-Identifier: MIT
5+
6+
docker container stop riallto_ci || true
7+
docker container wait riallto_ci || true
8+
9+
docker run -dit --rm --name riallto_ci \
10+
--cap-add=NET_ADMIN \
11+
-v $(pwd):/workspace \
12+
--device=/dev/accel/accel0:/dev/accel/accel0 \
13+
-w /workspace \
14+
riallto:latest \
15+
/bin/bash
16+
17+
docker exec -i riallto_ci /bin/bash -c "source ~/.bashrc && cd /workspace/ && python3 -m pip install . && python3 -m pytest ./tests"
18+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Linux Riallto CI Testing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'README.md'
9+
- 'CONTRIBUTING.md'
10+
- 'LICENSE**'
11+
- 'notebooks/**'
12+
- 'scripts/utils/**'
13+
- 'scripts/wsl/**'
14+
- '**/*.ipynb'
15+
- '.github/ISSUE_TEMPLATE/**'
16+
- '.github/*.md'
17+
pull_request:
18+
types: [assigned, opened, synchronize, reopened]
19+
paths-ignore:
20+
- 'README.md'
21+
- 'CONTRIBUTING.md'
22+
- 'LICENSE**'
23+
- 'notebooks/**'
24+
- 'scripts/utils/**'
25+
- 'scripts/wsl/**'
26+
- '**/*.ipynb'
27+
- '.github/ISSUE_TEMPLATE/**'
28+
- '.github/*.md'
29+
workflow_dispatch:
30+
31+
jobs:
32+
birman-tests:
33+
name: not-birman-15-linux-tests
34+
runs-on: self-hosted-linux
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
with:
39+
fetch-depth: 1
40+
41+
- name: run pytests
42+
run: |
43+
ls ./
44+
./.github/workflows/linux_ci_script.sh

.github/workflows/win_buildAndRun.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
jobs:
3232
birman-tests:
3333
name: not-birman-15-tests
34-
runs-on: self-hosted
34+
runs-on: self-hosted-windows
3535
steps:
3636
- name: Checkout
3737
uses: actions/checkout@v2

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ install/installed
1111
install/tarballs/*.tar.gz
1212

1313
*-checkpoint.ipynb
14+
15+
tests/images/*.svg
16+
17+
/*.json
18+
/*.xclbin
19+
/*.mlir
20+
/*.seq

CITATION.cff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ authors:
3030
- family-names: "Joshua"
3131
given-names: "Lu"
3232
title: "Riallto: an open-source exploration framework for first time users of the AMD Ryzen AI NPU"
33-
version: 1.0
34-
date-released: 2021-12-12
35-
url: "https://github.com/AMDResearch/Riallto"
33+
version: 1.1
34+
date-released: 2023-12-12
35+
url: "https://github.com/AMDResearch/Riallto"

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Riallto is an open source project that aims to bridge the gap between newcomers
44

55
The educational examples and software in this repository will enable you to interact with the NPU and learn how to write custom applications with this novel accelerator.
66

7-
Note that NPUs can also be referred to as Inference Processing Units, or IPUs. You may see the NPU referred to as an "IPU" in some Ryzen AI documentation. Once the Ryzen AI driver is installed on your computer, you will see a device named "IPU" in the Windows Device Manager."
7+
Note that NPUs can also be referred to as Inference Processing Units, or IPUs. You may see the NPU referred to as an "IPU" in some Ryzen AI documentation. On Windows once the Ryzen AI driver is installed on your computer, you will see a device named "IPU" in the Windows Device Manager."
88

9-
## Quick Start
9+
## Quick Start (Windows)
1010

1111
The Riallto installer is separated into 'Lite' and 'Full' installation versions. The 'Lite' version has all the essential packages required for the Riallto and ONNX runtimes on the NPU to get started with prebuilt vision applications. The 'Full' version enables developers to write their own custom applications, which requires additional tools.
1212

1313
The steps below will allow you to get quickly started using the 'Lite' version of Riallto. For details on requirements and installation for the 'Full' version, follow the instructions in the [Install Riallto](https://riallto.ai/install-riallto.html) guide.
1414

15-
* [Download and unzip the the v10.1109.8.100 IPU driver](https://account.amd.com/en/forms/downloads/ryzen-ai-software-platform-xef.html?filename=ipu_stack_rel_silicon_1.0.zip). You will need to create an AMD account if you do not have one.
15+
* [Download and unzip the the v10.1109.8.128 IPU driver](https://account.amd.com/en/forms/downloads/ryzen-ai-software-platform-xef.html?filename=ipu_stack_rel_silicon_prod_1.1.zip). You will need to create an AMD account if you do not have one.
1616
* Open a Windows Command Prompt, or Powershell, as administrator.
1717
* Change directory to the unzipped IPU driver directory, then run the `amd_install_kipudrv.bat` file. Press Enter if prompted.
1818
* Confirm the IPU driver has installed correctly by running the following command in a Powershell terminal and checking the output matches that of the figure below:
@@ -23,7 +23,7 @@ The steps below will allow you to get quickly started using the 'Lite' version o
2323

2424
![IPU driver dialog](docs/images/ipu_driver.png)
2525

26-
* [Download and unzip the Riallto installer](https://www.xilinx.com/bin/public/openDownload?filename=Riallto-v1.0.zip).
26+
* [Download and unzip the Riallto installer](https://www.amd.com/bin/public/amdOpenDownload?filename=Riallto-v1.1.zip).
2727
* Navigate to the `installer.exe` using the File Explorer and run as administrator, making sure the 'Lite' install option is selected when prompted, as shown in the figure below.
2828

2929
![Riallto installer options](docs/images/installer.png)
@@ -34,6 +34,10 @@ The installer places a shortcut on the desktop, which allows you to launch Riall
3434

3535
Note that the notebooks from sections 1, 2, 3, and 5 can be run using the 'Lite' install option. A 'Full' install is required to run the notebooks from section 4. See instructions in the [Install Riallto](https://riallto.ai/install-riallto.html) guide for more details.
3636

37+
## Quick Start (Linux)
38+
39+
Along with Windows support there is also support to install Riallto in Ubuntu 24.04 provided you upgrade to the 6.10 Linux Kernel. Steps for the installation process for this can be found [here](./scripts/linux).
40+
3741
## Contribute
3842

3943
Contributions to this repository are welcome. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for how to improve Riallto.

docs/images/ipu_driver.png

5.31 KB
Loading

notebooks/1_0_Introduction.ipynb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
"\n",
7575
"Demonstrates the Ryzen AI NPU in action, running real-time AI workloads in Microsoft's Windows Studio Effects (WSE).\n",
7676
"\n",
77+
"**This is only supported on Windows.**\n",
78+
"\n",
7779
"**[1. Windows Studio Effects demo](2_1_MS_Windows_Studio_Effects.ipynb)**\n"
7880
]
7981
},
@@ -135,6 +137,8 @@
135137
"\n",
136138
"Introduces the PyTorch-ONNX flow for running AI applications on the Ryzen AI NPU.\n",
137139
"\n",
140+
"**This is currently not supported on Linux.** \n",
141+
"\n",
138142
"**[1. Machine Learning Inference with PyTorch and ONNX](5_1_pytorch_onnx_inference.ipynb)**\n",
139143
"\n",
140144
"**[2. Machine Learning re-training with PyTorch and ONNX](5_2_pytorch_onnx_re-train.ipynb)**\n",
@@ -184,7 +188,7 @@
184188
"name": "python",
185189
"nbconvert_exporter": "python",
186190
"pygments_lexer": "ipython3",
187-
"version": "3.9.2"
191+
"version": "3.10.6"
188192
},
189193
"widgets": {
190194
"application/vnd.jupyter.widget-state+json": {

notebooks/2_1_MS_Windows_Studio_Effects.ipynb

100644100755
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,23 @@
1313
"\n",
1414
"* Demonstrate the NPU in action using the Windows Studio Effects\n",
1515
"\n",
16+
"\n",
1617
"## References\n",
1718
"\n",
1819
"**[Windows Studio Effects](https://support.microsoft.com/en-us/windows/manage-cameras-with-camera-settings-in-windows-11-97997ed5-bb98-47b6-a13d-964106997757#ID0EDBBF)**\n",
1920
" \n",
20-
"---\n"
21+
"---"
22+
]
23+
},
24+
{
25+
"cell_type": "markdown",
26+
"metadata": {},
27+
"source": [
28+
"<div class=\"alert alert-box alert-warning\">\n",
29+
"\n",
30+
"This is only supported on Windows and is not supported on the Linux release of Riallto\n",
31+
"\n",
32+
"</div>"
2133
]
2234
},
2335
{
@@ -219,7 +231,7 @@
219231
"name": "python",
220232
"nbconvert_exporter": "python",
221233
"pygments_lexer": "ipython3",
222-
"version": "3.9.2"
234+
"version": "3.10.6"
223235
}
224236
},
225237
"nbformat": 4,

notebooks/4_1_software_framework.ipynb

100644100755
Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"* **AIEtools**\n",
5353
" * These are the compilation tools used to build the Ryzen AI NPU application. \n",
5454
"\n",
55-
"The AIETools tools are Linux based. For Windows laptops, they run in [Windows Subsystem for Linux 2 (WSL 2)](https://learn.microsoft.com/en-us/windows/wsl/about). If you have installed Riallto and are reading this material on your laptop as a Jupyter notebook, WSL 2 should have been already installed and enabled on your system. "
55+
"The AIETools tools are Linux based. For Windows laptops, they run in [Windows Subsystem for Linux 2 (WSL 2)](https://learn.microsoft.com/en-us/windows/wsl/about). If you have installed Riallto and are reading this material on your Windows laptop as a Jupyter notebook, WSL 2 should have been already installed and enabled on your system. WSL 2 is not required for the Linux installation. On Linux the AIETools tools are contained within a docker container."
5656
]
5757
},
5858
{
@@ -62,7 +62,7 @@
6262
},
6363
"source": [
6464
"<div class=\"alert alert-box alert-info\">\n",
65-
"To check that the WSL 2 instance, where the <em>Riallto</em> tools are installed, is enabled on your system, run the following cell:\n",
65+
"On Windows to check that the WSL 2 instance, where the <em>Riallto</em> tools are installed, is enabled on your system, run the following cell (Note: this will not work on a Linux installation of Riallto):\n",
6666
"</div>"
6767
]
6868
},
@@ -103,6 +103,32 @@
103103
"The output of this cell should report the OS version where the 'Riallto' tools are installed. If you do not see this, or if you installed the **Lite** version of Riallto, please refer to the [Riallto installation instructions](https://www.riallto.ai/install-riallto.html) to install the **Full** version of Riallto."
104104
]
105105
},
106+
{
107+
"cell_type": "markdown",
108+
"metadata": {},
109+
"source": [
110+
"<div class=\"alert alert-box alert-info\">\n",
111+
"On Ubuntu to check that your Linux Kernel version is >6.10 which <em>Riallto</em> requires, run the following cell:\n",
112+
"</div>"
113+
]
114+
},
115+
{
116+
"cell_type": "code",
117+
"execution_count": 1,
118+
"metadata": {},
119+
"outputs": [
120+
{
121+
"name": "stdout",
122+
"output_type": "stream",
123+
"text": [
124+
"6.10.0-061000rc2-generic\n"
125+
]
126+
}
127+
],
128+
"source": [
129+
"! uname -r"
130+
]
131+
},
106132
{
107133
"cell_type": "markdown",
108134
"metadata": {},
@@ -280,7 +306,7 @@
280306
"\n",
281307
"This will construct a passthrough npu.build.Kernel object that can be used within\n",
282308
"a callgraph to construct a complete application. \n",
283-
"\u001b[1;31mFile:\u001b[0m c:\\users\\riallto\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\npu\\magic.py"
309+
"\u001b[1;31mFile:\u001b[0m c:\\users\\shane\\appdata\\local\\riallto\\riallto_venv\\lib\\site-packages\\npu\\magic.py"
284310
]
285311
},
286312
"metadata": {},
@@ -476,7 +502,7 @@
476502
"name": "python",
477503
"nbconvert_exporter": "python",
478504
"pygments_lexer": "ipython3",
479-
"version": "3.9.2"
505+
"version": "3.12.3"
480506
},
481507
"widgets": {
482508
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)