Skip to content

Commit 01258d2

Browse files
authored
Arm backend: Add VGF minimal example to out-of-box testing (pytorch#13861)
### Summary Adding the VGF minimal example to automated test flow - Minor fixes to VGF minimal example
1 parent cec1400 commit 01258d2

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

examples/arm/vgf_minimal_example.ipynb

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
"\n",
2424
"Before you begin:\n",
2525
"1. (In a clean virtual environment with a compatible Python version) Install executorch using `./install_executorch.sh`\n",
26-
"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",
26+
"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",
2727
"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",
2828
"\n",
2929
"With all commands executed from the base `executorch` folder.\n",
3030
"\n",
31-
"\n",
32-
"\n",
3331
"*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*"
3432
]
3533
},
@@ -165,6 +163,17 @@
165163
"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."
166164
]
167165
},
166+
{
167+
"cell_type": "code",
168+
"execution_count": null,
169+
"metadata": {},
170+
"outputs": [],
171+
"source": [
172+
"%%bash\n",
173+
"# Ensure the vulkan environment variables and MLSDK components are available on $PATH\n",
174+
"source ethos-u-scratch/setup_path.sh"
175+
]
176+
},
168177
{
169178
"cell_type": "code",
170179
"execution_count": null,
@@ -220,10 +229,21 @@
220229
"\n",
221230
"\n",
222231
"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",
223-
"To do this, please ensure the following commands are executed before moving onto the next step.\n",
232+
"To do this, please ensure the following commands are executed before moving onto the next step."
233+
]
234+
},
235+
{
236+
"cell_type": "code",
237+
"execution_count": null,
238+
"metadata": {},
239+
"outputs": [],
240+
"source": [
241+
"%%bash\n",
242+
"# Ensure the vulkan environment variables and MLSDK components are available on $PATH\n",
243+
"source ethos-u-scratch/setup_path.sh\n",
224244
"\n",
225-
"Clean and configure the CMake build system. Compiled programs will appear in the executorch/cmake-out directory we create here.\n",
226-
"```\n",
245+
"# Compiled programs will appear in the executorch/cmake-out directory we create here.\n",
246+
"# Build example executor runner application to examples/arm/vgf_minimal_example\n",
227247
"cmake \\\n",
228248
" -DCMAKE_INSTALL_PREFIX=cmake-out \\\n",
229249
" -DCMAKE_BUILD_TYPE=Debug \\\n",
@@ -237,11 +257,9 @@
237257
" -DEXECUTORCH_BUILD_VGF=ON \\\n",
238258
" -DEXECUTORCH_ENABLE_LOGGING=ON \\\n",
239259
" -DPYTHON_EXECUTABLE=python \\\n",
240-
" -Bcmake-out .\n",
241-
"```\n",
260+
" -B../../cmake-out-vkml ../..\n",
242261
"\n",
243-
"Build the executor_runner target\n",
244-
"`cmake --build cmake-out --target executor_runner`\n"
262+
"cmake --build ../../cmake-out-vkml --target executor_runner"
245263
]
246264
},
247265
{

0 commit comments

Comments
 (0)