|
293 | 293 | ]
|
294 | 294 | },
|
295 | 295 | {
|
| 296 | + "attachments": {}, |
296 | 297 | "cell_type": "markdown",
|
297 | 298 | "metadata": {
|
298 | 299 | "pycharm": {
|
|
302 | 303 | "source": [
|
303 | 304 | "3. Compile stage: After a _Process_ has been configured, it needs to be compiled to\n",
|
304 | 305 | "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." |
306 | 311 | ]
|
307 | 312 | },
|
308 | 313 | {
|
|
315 | 320 | },
|
316 | 321 | "outputs": [],
|
317 | 322 | "source": [
|
| 323 | + "# Compile stage\n", |
318 | 324 | "from lava.magma.compiler.compiler import Compiler\n",
|
319 | 325 | "from lava.magma.core.run_configs import Loihi1SimCfg\n",
|
320 | 326 | "\n",
|
321 | 327 | "# create a compiler\n",
|
322 | 328 | "compiler = Compiler()\n",
|
323 | 329 | "\n",
|
324 | 330 | "# 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", |
351 | 335 | "from lava.magma.runtime.runtime import Runtime\n",
|
352 | 336 | "from lava.magma.core.run_conditions import RunSteps\n",
|
353 | 337 | "from lava.magma.runtime.message_infrastructure.message_interface_enum import ActorType\n",
|
|
0 commit comments