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

Tutorial bug fix #253

Merged
merged 45 commits into from
Jun 10, 2022
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f456afb
- Initial enablement of RefPort and VarPorts
PhilippPlank Nov 12, 2021
2d0ec74
- Initial enablement of RefPort and VarPorts
PhilippPlank Nov 12, 2021
25a3a68
- Initial enablement of RefPort and VarPorts
PhilippPlank Nov 12, 2021
a2d1765
- Initial enablement of RefPort and VarPorts
PhilippPlank Nov 12, 2021
74dfdf6
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 15, 2021
1daa9af
- Enablement of RefPorts and VarPorts - addressed change requests fro…
PhilippPlank Nov 16, 2021
5908401
- Enablement of RefPorts and VarPorts - addressed change requests fro…
PhilippPlank Nov 16, 2021
3df2847
- Enablement of RefPorts and VarPorts - addressed change requests fro…
PhilippPlank Nov 16, 2021
9581fae
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 16, 2021
6e4716a
- Enablement of RefPorts and VarPorts - addressed change requests fro…
PhilippPlank Nov 16, 2021
e22def6
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 17, 2021
bd25a80
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 17, 2021
7edeb1f
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 18, 2021
23fb8d7
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 18, 2021
f6686b4
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 23, 2021
86867c2
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 23, 2021
859a195
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 24, 2021
f7007f8
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 25, 2021
0163202
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 25, 2021
bf934ef
modified connection tutorial for release 0.2.0
PhilippPlank Nov 26, 2021
0eef67e
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 26, 2021
f08a35c
fixed typos
PhilippPlank Nov 26, 2021
ceddf2a
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 26, 2021
f798b0a
Merge branch 'lava-nc:main' into main
PhilippPlank Nov 30, 2021
b6e72bb
Merge branch 'lava-nc:main' into main
PhilippPlank Dec 1, 2021
9c57309
Merge branch 'lava-nc:main' into main
PhilippPlank Dec 3, 2021
7425f7e
Merge branch 'lava-nc:main' into main
PhilippPlank Dec 6, 2021
bc353c7
Merge branch 'lava-nc:main' into main
PhilippPlank Jan 27, 2022
73288a4
Merge branch 'lava-nc:main' into main
PhilippPlank Jan 31, 2022
3f5c2d7
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 9, 2022
e691b1d
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 10, 2022
9ab9a5d
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 10, 2022
a1f0367
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 16, 2022
50f9113
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 16, 2022
e2342f5
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 24, 2022
0b7cedb
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 24, 2022
6a30ad7
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 25, 2022
8e652bc
Merge branch 'lava-nc:main' into main
PhilippPlank Feb 25, 2022
3b3cc6f
Merge branch 'lava-nc:main' into main
PhilippPlank Mar 2, 2022
46b54ad
Merge branch 'lava-nc:main' into main
PhilippPlank Mar 3, 2022
0c02489
Merge branch 'lava-nc:main' into main
PhilippPlank Mar 4, 2022
01d9097
Merge branch 'lava-nc:main' into main
PhilippPlank Mar 11, 2022
efc0bd4
Merge branch 'lava-nc:main' into main
PhilippPlank Mar 16, 2022
976c5d2
Merge branch 'lava-nc:main' into main
PhilippPlank Jun 9, 2022
aca5819
Bugfix for the tutorial07_remote_memory_access.ipynb
PhilippPlank Jun 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 21 additions & 4 deletions tutorials/in_depth/tutorial07_remote_memory_access.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "8ff39dda",
"metadata": {},
"source": [
"*Copyright (C) 2021 Intel Corporation*<br>\n",
Expand All @@ -28,6 +29,7 @@
},
{
"cell_type": "markdown",
"id": "d3568645",
"metadata": {},
"source": [
"## Recommended tutorials before starting: \n",
Expand All @@ -42,13 +44,15 @@
},
{
"cell_type": "markdown",
"id": "b2e5ed15",
"metadata": {},
"source": [
"## Create a minimal _Process_ and _ProcessModel_ with a _RefPort_"
]
},
{
"cell_type": "markdown",
"id": "9407a4f8",
"metadata": {},
"source": [
"The [ProcessModel Tutorial](#tutorial03_process_models.ipynb) walks through the creation of _Processes_ and corresponding _ProcessModels_. In order to demonstrate RefPorts we create a minimal process P1 with a _RefPort_ `ref` and a minimal process P2 with a _Var_ `var`. \n",
Expand All @@ -59,6 +63,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "b72d269a",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,6 +88,7 @@
},
{
"cell_type": "markdown",
"id": "d3beee93",
"metadata": {},
"source": [
"#### Create a Python Process Model implementing the Loihi Sync Protocol and requiring a CPU compute resource\n",
Expand All @@ -92,6 +98,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "b9b8bad0",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -111,10 +118,10 @@
"class PyProcModel1(PyLoihiProcessModel):\n",
" ref: PyRefPort = LavaPyType(PyRefPort.VEC_DENSE, int)\n",
"\n",
" def pre_guard(self):\n",
" def post_guard(self):\n",
" return True\n",
"\n",
" def run_pre_mgmt(self):\n",
" def run_post_mgmt(self):\n",
" # Retrieve current value of the Var of P2\n",
" cur_val = self.ref.read()\n",
" print(\"Value of var: {} at time step: {}\".format(cur_val, self.time_step))\n",
Expand All @@ -134,6 +141,7 @@
},
{
"cell_type": "markdown",
"id": "614aa4be",
"metadata": {},
"source": [
"## Run the _Processes_\n",
Expand All @@ -143,6 +151,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "47698fc0",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -175,6 +184,7 @@
},
{
"cell_type": "markdown",
"id": "b9bf440f",
"metadata": {},
"source": [
"## Implicit and explicit VarPorts\n",
Expand All @@ -184,6 +194,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "d9dd7405",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -200,6 +211,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "e2215c6d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -215,6 +227,7 @@
},
{
"cell_type": "markdown",
"id": "683df3ff",
"metadata": {},
"source": [
"This time the _RefPort_ `ref` is connected to the explicitly defined _VarPort_ `var_port`. The output is the same as before."
Expand All @@ -223,6 +236,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "bfc0ec3b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -252,6 +266,7 @@
},
{
"cell_type": "markdown",
"id": "ff8db42e",
"metadata": {},
"source": [
"## Options to connect RefPorts and VarPorts\n",
Expand All @@ -269,6 +284,7 @@
},
{
"cell_type": "markdown",
"id": "1eb2d987",
"metadata": {},
"source": [
"## How to learn more?\n",
Expand All @@ -281,14 +297,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2bf6cbaa",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -302,7 +319,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down