diff options
| author | levi2m <55702618+levi2m@users.noreply.github.com> | 2026-11-25 12:14:39 -0300 |
|---|---|---|
| committer | levi2m <55702618+levi2m@users.noreply.github.com> | 2026-11-25 12:14:39 -0300 |
| commit | de04d88b92643715b0257eee224bd8e35c912e58 (patch) | |
| tree | 58581c722a0f171f4e11a7a42037bd5d1034070b /docs/testing.md | |
| parent | b0f3d3998f0401eb7df8ddbb7a303d1e6bee9fb8 (diff) | |
vk_model_fuzz: judge pk16_diff, vint_diff and sdwa_diff on any Vulkan GPU against their reference model (VK-MODEL-ORACLE)
The Vulkan run of these fuzzers (--oracle hw,vk) takes its expected words
from a native AMD GPU, so a contributor with an NVIDIA or Intel card cannot
use it. tools/vk_model_fuzz.py runs the programs the fuzzer generates for
the same seed through the translator and vk_compute_test and judges them
against the fuzzer's reference model instead. A program the model declines
is a skip and never reaches the GPU. No existing fuzzer is edited.
tests/test_vk_model_fuzz.py stands in for the GPU, so it needs no Vulkan
device; docs/testing.md has a short section next to the AMD hardware oracle.
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/testing.md b/docs/testing.md index ffe729d24..7f0d070bc 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -731,6 +731,22 @@ exits 77, so CI skips it. `image_fuzz.py --oracle hw` loads a linear texture thr | |||
| 731 | its CPU model; add `--negative-control` to check that wrong models are caught. A gfx1150 (RDNA3.5) is not RDNA2: a | 731 | its CPU model; add `--negative-control` to check that wrong models are caught. A gfx1150 (RDNA3.5) is not RDNA2: a |
| 732 | match supports the model and does not prove RDNA2. Run these one at a time: a second job on the same GPU can hang it. | 732 | match supports the model and does not prove RDNA2. Run these one at a time: a second job on the same GPU can hang it. |
| 733 | 733 | ||
| 734 | ## Model oracle on any Vulkan GPU (no AMD hardware) | ||
| 735 | |||
| 736 | `pk16_diff.py`, `vint_diff.py` and `sdwa_diff.py` judge their translated programs on a Vulkan GPU only against the words | ||
| 737 | a native AMD GPU produced (`--oracle hw,vk`). `tools/vk_model_fuzz.py` runs the same programs, for the same seed, on | ||
| 738 | whatever Vulkan GPU you have and judges them against the fuzzer's reference model instead: | ||
| 739 | |||
| 740 | ```sh | ||
| 741 | python -I tools/vk_model_fuzz.py pk16_diff --programs 1500 --seed 11 --build runtime/build | ||
| 742 | ``` | ||
| 743 | |||
| 744 | `--build` is the folder with `vk_compute_test`; `llvm-mc` with the AMDGPU target is needed as for `valu_fuzz.py`. It exits | ||
| 745 | 0 when every judged program matched, 1 on a mismatch (the first few programs are printed), 2 when `vk_compute_test` is | ||
| 746 | missing and 77 when nothing could be judged. A program the model declines counts as a skip. A mismatch here is the GPU | ||
| 747 | disagreeing with the model, which is a driver difference, a translator bug or a model bug: re-read the program with | ||
| 748 | the fuzzer itself (`pk16_diff.py --seed S --programs N`) before reporting it. | ||
| 749 | |||
| 734 | ## Choosing the GPU | 750 | ## Choosing the GPU |
| 735 | 751 | ||
| 736 | With more than one GPU, pick one through the Vulkan loader, for example | 752 | With more than one GPU, pick one through the Vulkan loader, for example |