Skip to content

Commit 721e641

Browse files
authored
Arm backend: Split smaller stories tests per backend (pytorch#19972)
### Summary Splitup smaller stories tests per backend and adds runtime info ### Test plan This updated GitHub tests and get tested by it. Signed-off-by: Zingo Andersen <Zingo.Andersen@arm.com>
1 parent 4227c90 commit 721e641

3 files changed

Lines changed: 32 additions & 13 deletions

File tree

.github/workflows/trunk.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
- test_arm_backend: test_pytest_ops_ethos_u85
258258
- test_arm_backend: test_pytest_models_ethos_u85
259259
- test_arm_backend: test_run_ethos_u85
260-
- test_arm_backend: test_smaller_stories_llama
260+
- test_arm_backend: test_smaller_stories_llama_tosa
261261
- test_arm_backend: test_memory_allocation
262262
- test_arm_backend: test_ootb_tests_ethos_u
263263
- test_arm_backend: test_ootb_tests_tosa
@@ -305,6 +305,7 @@ jobs:
305305
- test_arm_backend: test_pytest_ops_vkml
306306
- test_arm_backend: test_pytest_models_vkml
307307
- test_arm_backend: test_ootb_tests_vgf
308+
- test_arm_backend: test_smaller_stories_llama_vkml
308309
fail-fast: false
309310
with:
310311
runner: linux.2xlarge.memory

backends/arm/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PyTorch models to a TOSA representation. This representation is used to
66
deploy to the following targets:
77

88
- **Arm&reg; Ethos&trade;-U55/65/85** - Compiled using the Ethos-U Vela compiler.
9-
- **VGF Format, for ML extensions for Vulkan®** – a format containing SPIR-V™ ML operators for Vulkan-capable devices.
9+
- **VKML using VGF Format, for ML extensions for Vulkan®** – a format containing SPIR-V™ ML operators for Vulkan Machine Learning (VKML) devices.
1010

1111
The backend provides an ahead-of-time (AOT) flow, that produces a PTE file for your
1212
chosen target. The AOT flow supports the following development operating systems:
@@ -248,15 +248,16 @@ Below is an overview of some of the testing options this script provides:
248248
| `test_arm_backend.sh test_pytest_ops_ethos_u85` | Runs operator unit tests for Ethos-U85 specific use-cases. |
249249
| `test_arm_backend.sh test_pytest_models_ethos_u85` | Runs model unit tests for Ethos-U85 specific use-cases. |
250250
| `test_arm_backend.sh test_run_ethos_u85` | Runs end-to-end unit tests for Ethos-U85 specific use-cases. |
251-
| `test_arm_backend.sh test_pytest_ops_vkml` | Runs operator unit tests for VGF specific use-cases. |
252-
| `test_arm_backend.sh test_pytest_models_vkml` | Runs model unit tests for VGF specific use-cases. |
253-
| `test_arm_backend.sh test_run_vkml` | Runs end-to-end unit tests for VGF specific use-cases. |
251+
| `test_arm_backend.sh test_pytest_ops_vkml` | Runs operator unit tests for VKML/VGF specific use-cases. |
252+
| `test_arm_backend.sh test_pytest_models_vkml` | Runs model unit tests for VKML/VGF specific use-cases. |
253+
| `test_arm_backend.sh test_run_vkml` | Runs end-to-end unit tests for VKML/VGF specific use-cases. |
254254
| `test_arm_backend.sh test_model_smollm2_135M` | Runs some models with Corstone FVP. |
255255
| `test_arm_backend.sh test_ootb_tests_ethos_u` | Runs out-of-the-box tests for Ethos-U. |
256256
| `test_arm_backend.sh test_ootb_tests_tosa` | Runs out-of-the-box tests for TOSA. |
257-
| `test_arm_backend.sh test_ootb_tests_vgf` | Runs out-of-the-box tests for VGF. |
257+
| `test_arm_backend.sh test_ootb_tests_vgf` | Runs out-of-the-box tests for VKML/VGF. |
258258
| `test_arm_backend.sh test_deit_e2e_ethos_u` | Runs DEiT end-to-end tests on Ethos-U. |
259-
| `test_arm_backend.sh test_smaller_stories_llama` | Runs E2E model tests on Corstone FVP. |
259+
| `test_arm_backend.sh test_smaller_stories_llama_tosa` | Runs Llama model tests for TOSA. |
260+
| `test_arm_backend.sh test_smaller_stories_llama_vkml` | Runs Llama model tests for VKML/VGF. |
260261
| `test_arm_backend.sh test_memory_allocation` | Runs memory allocation tests for Ethos-U specific targets |
261262

262263
For more information, please refer to the `backends/arm/test/test_arm_backend.sh` script.

backends/arm/test/test_arm_backend.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,16 @@ test_model_smollm2_135M() {
336336
-a "${et_root_dir}"/arm_test/ethos-u85-256_${pte_addr}/cmake-out/arm_executor_runner \
337337
-C mps4_board.subsystem.ethosu.extra_args="--fast" \
338338
--data smollm2.pte@"${pte_addr}"
339-
339+
340340
echo "${TEST_SUITE_NAME}: PASS"
341341
}
342342

343-
test_smaller_stories_llama() {
344-
echo "${TEST_SUITE_NAME}: Test smaller_stories_llama"
343+
_test_smaller_stories_llama() {
344+
local backend=$1
345345

346-
backends/arm/scripts/build_executorch.sh
346+
echo "${TEST_SUITE_NAME}: Test smaller_stories_llama for ${backend}"
347+
348+
# This model might consume a lot of memory so --numprocesses=auto is not used to avoid parallel testing
347349

348350
mkdir -p stories110M
349351
pushd stories110M
@@ -357,14 +359,29 @@ test_smaller_stories_llama() {
357359
"${PYTEST_RETRY_ARGS[@]}" \
358360
--verbose \
359361
--color=yes \
360-
--numprocesses=auto \
361-
--junit-xml=stories110M/test-reports/unittest.xml \
362+
--durations=0 \
362363
backends/arm/test/models/test_llama.py \
364+
-k "${backend}" \
363365
--llama_inputs stories110M/stories110M.pt stories110M/params.json stories110m
364366

365367
echo "${TEST_SUITE_NAME}: PASS"
366368
}
367369

370+
test_smaller_stories_llama_tosa() {
371+
_test_smaller_stories_llama tosa
372+
}
373+
374+
test_smaller_stories_llama_vkml() {
375+
source backends/arm/test/setup_testing_vkml.sh
376+
377+
_test_smaller_stories_llama vgf
378+
}
379+
380+
test_smaller_stories_llama() {
381+
test_smaller_stories_llama_tosa
382+
test_smaller_stories_llama_vkml
383+
}
384+
368385
test_memory_allocation() {
369386
echo "${TEST_SUITE_NAME}: Test ethos-u memory allocation with run.sh"
370387

0 commit comments

Comments
 (0)