Skip to content
Merged
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
38 changes: 28 additions & 10 deletions examples/arm/vgf_minimal_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
"\n",
"Before you begin:\n",
"1. (In a clean virtual environment with a compatible Python version) Install executorch using `./install_executorch.sh`\n",
"2. Install MLSDK and Tosa using `examples/arm/setup.sh --disable-ethos-u-deps --enable-mlsdk-deps (For further guidance, refer to https://docs.pytorch.org/executorch/main/tutorial-arm.html)\n",
"2. Install MLSDK and Tosa using `examples/arm/setup.sh --disable-ethos-u-deps --enable-mlsdk-deps` (For further guidance, refer to https://docs.pytorch.org/executorch/main/tutorial-arm.html)\n",
"3. Export vulkan environment variables and add MLSDK components to PATH and LD_LIBRARY_PATH using `examples/arm/ethos-u-scratch/setup_path.sh`\n",
"\n",
"With all commands executed from the base `executorch` folder.\n",
"\n",
"\n",
"\n",
"*Some scripts in this notebook produce long output logs: Configuring the 'Customizing Notebook Layout' settings to enable 'Output:scrolling' and setting 'Output:Text Line Limit' makes this more manageable*"
]
},
Expand Down Expand Up @@ -165,6 +163,17 @@
"All of this happens behind the scenes in `to_edge_transform_and_lower`. Printing the graph module shows that what is left in the graph is two quantization nodes for `x` and `y` going into an `executorch_call_delegate` node, followed by a dequantization node."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"# Ensure the vulkan environment variables and MLSDK components are available on $PATH\n",
"source ethos-u-scratch/setup_path.sh"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -220,10 +229,21 @@
"\n",
"\n",
"After the AOT compilation flow is done, we need to build the executor_runner target. For this example the generic version will be used.\n",
"To do this, please ensure the following commands are executed before moving onto the next step.\n",
"To do this, please ensure the following commands are executed before moving onto the next step."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"# Ensure the vulkan environment variables and MLSDK components are available on $PATH\n",
"source ethos-u-scratch/setup_path.sh\n",
"\n",
"Clean and configure the CMake build system. Compiled programs will appear in the executorch/cmake-out directory we create here.\n",
"```\n",
"# Compiled programs will appear in the executorch/cmake-out directory we create here.\n",
"# Build example executor runner application to examples/arm/vgf_minimal_example\n",
"cmake \\\n",
" -DCMAKE_INSTALL_PREFIX=cmake-out \\\n",
" -DCMAKE_BUILD_TYPE=Debug \\\n",
Expand All @@ -237,11 +257,9 @@
" -DEXECUTORCH_BUILD_VGF=ON \\\n",
" -DEXECUTORCH_ENABLE_LOGGING=ON \\\n",
" -DPYTHON_EXECUTABLE=python \\\n",
" -Bcmake-out .\n",
"```\n",
" -B../../cmake-out-vkml ../..\n",
"\n",
"Build the executor_runner target\n",
"`cmake --build cmake-out --target executor_runner`\n"
"cmake --build ../../cmake-out-vkml --target executor_runner"
]
},
{
Expand Down
Loading