Skip to content

Commit c42df5c

Browse files
committed
Fix part of error
Signed-off-by: Xu, He <[email protected]>
1 parent ffe4e85 commit c42df5c

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

tutorials/in_depth/tutorial04_execution.ipynb

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@
293293
]
294294
},
295295
{
296+
"attachments": {},
296297
"cell_type": "markdown",
297298
"metadata": {
298299
"pycharm": {
@@ -302,7 +303,11 @@
302303
"source": [
303304
"3. Compile stage: After a _Process_ has been configured, it needs to be compiled to\n",
304305
"become executable. After the compilation stage, the state of the _Process_ can\n",
305-
"still be manipulated and inspected."
306+
"still be manipulated and inspected.\n",
307+
"\n",
308+
"4. Execution stage: When compilation is complete, _Processes_ can be\n",
309+
"executed. The execution stage ensures that the (prior) compilation stage has\n",
310+
"been completed and otherwise invokes it."
306311
]
307312
},
308313
{
@@ -315,39 +320,18 @@
315320
},
316321
"outputs": [],
317322
"source": [
323+
"# Compile stage\n",
318324
"from lava.magma.compiler.compiler import Compiler\n",
319325
"from lava.magma.core.run_configs import Loihi1SimCfg\n",
320326
"\n",
321327
"# create a compiler\n",
322328
"compiler = Compiler()\n",
323329
"\n",
324330
"# compile the Process (and all connected Processes) into an executable\n",
325-
"executable = compiler.compile(lif2, run_cfg=Loihi1SimCfg())"
326-
]
327-
},
328-
{
329-
"cell_type": "markdown",
330-
"metadata": {
331-
"pycharm": {
332-
"name": "#%% md\n"
333-
}
334-
},
335-
"source": [
336-
"4. Execution stage: When compilation is complete, _Processes_ can be\n",
337-
"executed. The execution stage ensures that the (prior) compilation stage has\n",
338-
"been completed and otherwise invokes it."
339-
]
340-
},
341-
{
342-
"cell_type": "code",
343-
"execution_count": 10,
344-
"metadata": {
345-
"pycharm": {
346-
"name": "#%%\n"
347-
}
348-
},
349-
"outputs": [],
350-
"source": [
331+
"executable = compiler.compile(lif2, run_cfg=Loihi1SimCfg())\n",
332+
"\n",
333+
"# Execution stage\n",
334+
"\n",
351335
"from lava.magma.runtime.runtime import Runtime\n",
352336
"from lava.magma.core.run_conditions import RunSteps\n",
353337
"from lava.magma.runtime.message_infrastructure.message_interface_enum import ActorType\n",

tutorials/in_depth/tutorial05_connect_processes.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
" def run_spk(self):\n",
126126
" data = np.array([1, 2])\n",
127127
" self.out.send(data)\n",
128-
" print(\"Sent output data of P1: {}\".format(data))\n",
129128
"\n",
130129
"\n",
131130
"\n",
@@ -137,8 +136,7 @@
137136
" inp: PyInPort = LavaPyType(PyInPort.VEC_DENSE, int)\n",
138137
"\n",
139138
" def run_spk(self):\n",
140-
" in_data = self.inp.recv()\n",
141-
" print(\"Received input data for P2: {}\".format(in_data))"
139+
" in_data = self.inp.recv()"
142140
]
143141
},
144142
{

0 commit comments

Comments
 (0)