mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 03:39:52 +00:00
test: expand Phase 01 validation and benchmark evidence
This commit is contained in:
5 files changed
+251
-2
No files matched your search
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"run_id": "run-1795338391",
|
||||
"timestamp": "unix:1795338391",
|
||||
"device": "Apple M5",
|
||||
"host_arch": "aarch64",
|
||||
"os_version": "27.3",
|
||||
"os_build": "26C5047e",
|
||||
"rustc": "rustc 1.100.0 (0ef1bc386 2026-11-09) (Homebrew)",
|
||||
"xcode": "Xcode 27.2",
|
||||
"commit": "a34dadcbc06b696eae0d7b743845f4a2c9e67996",
|
||||
"profile": "release",
|
||||
"api_validation": "0",
|
||||
"shader_validation": "0",
|
||||
"power": "Battery Power",
|
||||
"thermal": "no warnings recorded",
|
||||
"reps": 7,
|
||||
"warmup": 2
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
# Xenora benchmark report
|
||||
|
||||
Generated by `xenora-bench`. Every timed fixture passed its correctness test in this run. Timings are single command-buffer samples; see `docs/testing/benchmarks.md` for the protocol.
|
||||
|
||||
## Environment
|
||||
|
||||
| Field | Value |
|
||||
| --- | --- |
|
||||
| Device | Apple M5 |
|
||||
| Host arch | aarch64 |
|
||||
| macOS | 27.3 |
|
||||
| Build | 26C5047e |
|
||||
| Rust | rustc 1.100.0 (0ef1bc386 2026-11-09) (Homebrew) |
|
||||
| Xcode | Xcode 27.2 |
|
||||
| Commit | a34dadcbc06b696eae0d7b743845f4a2c9e67996 |
|
||||
| Profile | release |
|
||||
| API validation | 0 |
|
||||
| Shader validation | 0 |
|
||||
| Power source | Battery Power |
|
||||
| Thermal | no warnings recorded |
|
||||
| Repetitions | 7 measured, 2 warm-up |
|
||||
|
||||
> **Protocol note.** The machine was not confirmed on AC power. The [benchmark protocol](../../docs/testing/benchmarks.md) requires AC power, so these timings are not protocol-compliant release evidence.
|
||||
|
||||
## Coverage
|
||||
|
||||
| Fixture | Stage | Source | Status |
|
||||
| --- | --- | --- | --- |
|
||||
| add | compute | translated-rdna | benchmarked |
|
||||
| bitwise-branch | compute | translated-rdna | benchmarked |
|
||||
| float-exact | compute | translated-rdna | benchmarked |
|
||||
|
||||
## Timings
|
||||
|
||||
Durations in microseconds. `compile` is the Rust decode/IR/MSL pipeline, `library` and `pipeline` are Metal compilation stages, `gpu` is the command-buffer GPU time, and `host` is the wall time of one dispatch. Values are medians with interquartile range; minimum and maximum are in `results.json`.
|
||||
|
||||
| Fixture | Words | compile | library | pipeline | gpu | host | IQR(gpu) | zero-gpu |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| add | 4 | 5.42 | 15.04 | 36.33 | 6.08 | 525.50 | 0.29 | 0% |
|
||||
| add | 64 | 4.54 | 11.83 | 28.17 | 6.08 | 529.92 | 0.06 | 0% |
|
||||
| add | 256 | 4.46 | 11.42 | 27.33 | 5.88 | 519.17 | 0.19 | 0% |
|
||||
| add | 1024 | 4.42 | 11.21 | 26.88 | 6.12 | 524.38 | 0.13 | 0% |
|
||||
| add | 4096 | 4.38 | 11.17 | 27.92 | 6.25 | 523.58 | 0.08 | 0% |
|
||||
| bitwise-branch | 4 | 11.38 | 13.00 | 28.96 | 6.12 | 509.37 | 0.00 | 0% |
|
||||
| bitwise-branch | 64 | 7.75 | 11.33 | 26.92 | 6.12 | 526.50 | 0.02 | 0% |
|
||||
| bitwise-branch | 256 | 7.71 | 11.21 | 26.62 | 6.00 | 513.71 | 0.02 | 0% |
|
||||
| bitwise-branch | 1024 | 7.54 | 11.25 | 26.58 | 6.25 | 519.62 | 0.02 | 0% |
|
||||
| bitwise-branch | 4096 | 7.58 | 11.21 | 27.25 | 6.21 | 523.33 | 0.04 | 0% |
|
||||
| float-exact | 4 | 9.12 | 12.08 | 27.12 | 6.17 | 510.67 | 0.10 | 0% |
|
||||
| float-exact | 64 | 8.58 | 11.46 | 26.50 | 6.04 | 523.79 | 0.06 | 0% |
|
||||
| float-exact | 256 | 8.58 | 11.12 | 26.46 | 6.04 | 514.92 | 0.08 | 0% |
|
||||
| float-exact | 1024 | 8.67 | 11.12 | 26.29 | 6.21 | 520.67 | 0.08 | 0% |
|
||||
| float-exact | 4096 | 8.67 | 11.17 | 26.46 | 6.25 | 514.67 | 0.08 | 0% |
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"fixtures": [
|
||||
{
|
||||
"name": "add",
|
||||
"stage": "compute",
|
||||
"source": "translated-rdna",
|
||||
"status": "benchmarked",
|
||||
"reason": "",
|
||||
"sizes": [
|
||||
{ "words": 4, "compile": { "median": 5.417000000e-6, "min": 4.875000000e-6, "max": 7.833000000e-6, "q1": 4.979500000e-6, "q3": 6.250500000e-6, "reps": 7 }, "library": { "median": 1.504200000e-5, "min": 1.254200000e-5, "max": 2.141700000e-5, "q1": 1.339600000e-5, "q3": 1.706300000e-5, "reps": 7 }, "pipeline": { "median": 3.633300000e-5, "min": 3.175000000e-5, "max": 4.900000000e-5, "q1": 3.245800000e-5, "q3": 4.106200000e-5, "reps": 7 }, "gpu": { "median": 6.083333574e-6, "min": 5.791662261e-6, "max": 6.125002983e-6, "q1": 5.833335308e-6, "q3": 6.124995707e-6, "reps": 7 }, "host": { "median": 5.255000000e-4, "min": 5.083750000e-4, "max": 5.870000000e-4, "q1": 5.120210000e-4, "q3": 5.354790000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 64, "compile": { "median": 4.542000000e-6, "min": 4.417000000e-6, "max": 4.584000000e-6, "q1": 4.500000000e-6, "q3": 4.562500000e-6, "reps": 7 }, "library": { "median": 1.183300000e-5, "min": 1.158300000e-5, "max": 1.204200000e-5, "q1": 1.172900000e-5, "q3": 1.191650000e-5, "reps": 7 }, "pipeline": { "median": 2.816700000e-5, "min": 2.779200000e-5, "max": 3.250000000e-5, "q1": 2.814550000e-5, "q3": 2.933350000e-5, "reps": 7 }, "gpu": { "median": 6.083333574e-6, "min": 5.750000128e-6, "max": 6.125002983e-6, "q1": 6.041664165e-6, "q3": 6.104164640e-6, "reps": 7 }, "host": { "median": 5.299160000e-4, "min": 4.869160000e-4, "max": 5.916250000e-4, "q1": 5.180835000e-4, "q3": 5.309585000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 256, "compile": { "median": 4.459000000e-6, "min": 4.375000000e-6, "max": 7.542000000e-6, "q1": 4.458000000e-6, "q3": 4.521000000e-6, "reps": 7 }, "library": { "median": 1.141700000e-5, "min": 1.120900000e-5, "max": 1.412500000e-5, "q1": 1.133350000e-5, "q3": 1.147900000e-5, "reps": 7 }, "pipeline": { "median": 2.733400000e-5, "min": 2.695800000e-5, "max": 2.758400000e-5, "q1": 2.706250000e-5, "q3": 2.750000000e-5, "reps": 7 }, "gpu": { "median": 5.875001079e-6, "min": 5.750000128e-6, "max": 6.000002031e-6, "q1": 5.791665899e-6, "q3": 5.979163689e-6, "reps": 7 }, "host": { "median": 5.191670000e-4, "min": 5.010000000e-4, "max": 5.346670000e-4, "q1": 5.137080000e-4, "q3": 5.276670000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 1024, "compile": { "median": 4.417000000e-6, "min": 4.250000000e-6, "max": 7.583000000e-6, "q1": 4.354500000e-6, "q3": 4.521000000e-6, "reps": 7 }, "library": { "median": 1.120900000e-5, "min": 1.091700000e-5, "max": 1.300000000e-5, "q1": 1.110400000e-5, "q3": 1.129150000e-5, "reps": 7 }, "pipeline": { "median": 2.687500000e-5, "min": 2.666600000e-5, "max": 3.350000000e-5, "q1": 2.670800000e-5, "q3": 2.716650000e-5, "reps": 7 }, "gpu": { "median": 6.124995707e-6, "min": 6.041664165e-6, "max": 6.208334526e-6, "q1": 6.062498869e-6, "q3": 6.187499821e-6, "reps": 7 }, "host": { "median": 5.243750000e-4, "min": 4.802500000e-4, "max": 6.343750000e-4, "q1": 5.193130000e-4, "q3": 5.442295000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 4096, "compile": { "median": 4.375000000e-6, "min": 4.250000000e-6, "max": 4.500000000e-6, "q1": 4.333000000e-6, "q3": 4.416500000e-6, "reps": 7 }, "library": { "median": 1.116600000e-5, "min": 1.095800000e-5, "max": 1.145900000e-5, "q1": 1.106250000e-5, "q3": 1.120800000e-5, "reps": 7 }, "pipeline": { "median": 2.791700000e-5, "min": 2.716700000e-5, "max": 3.229100000e-5, "q1": 2.743700000e-5, "q3": 2.833300000e-5, "reps": 7 }, "gpu": { "median": 6.249996659e-6, "min": 6.125002983e-6, "max": 6.250003935e-6, "q1": 6.166665116e-6, "q3": 6.250000297e-6, "reps": 7 }, "host": { "median": 5.235830000e-4, "min": 5.008330000e-4, "max": 5.484590000e-4, "q1": 5.165830000e-4, "q3": 5.246875000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "bitwise-branch",
|
||||
"stage": "compute",
|
||||
"source": "translated-rdna",
|
||||
"status": "benchmarked",
|
||||
"reason": "",
|
||||
"sizes": [
|
||||
{ "words": 4, "compile": { "median": 1.137500000e-5, "min": 8.125000000e-6, "max": 1.562500000e-5, "q1": 8.875000000e-6, "q3": 1.214650000e-5, "reps": 7 }, "library": { "median": 1.300000000e-5, "min": 1.150000000e-5, "max": 2.495800000e-5, "q1": 1.214600000e-5, "q3": 1.556200000e-5, "reps": 7 }, "pipeline": { "median": 2.895800000e-5, "min": 2.704200000e-5, "max": 5.566600000e-5, "q1": 2.762500000e-5, "q3": 3.600050000e-5, "reps": 7 }, "gpu": { "median": 6.124995707e-6, "min": 6.083333574e-6, "max": 6.208334526e-6, "q1": 6.124995707e-6, "q3": 6.125002983e-6, "reps": 7 }, "host": { "median": 5.093750000e-4, "min": 4.334590000e-4, "max": 5.999590000e-4, "q1": 4.986045000e-4, "q3": 5.409170000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 64, "compile": { "median": 7.750000000e-6, "min": 7.542000000e-6, "max": 7.917000000e-6, "q1": 7.625000000e-6, "q3": 7.771000000e-6, "reps": 7 }, "library": { "median": 1.133300000e-5, "min": 1.100000000e-5, "max": 1.158300000e-5, "q1": 1.127100000e-5, "q3": 1.141650000e-5, "reps": 7 }, "pipeline": { "median": 2.691600000e-5, "min": 2.641700000e-5, "max": 2.754200000e-5, "q1": 2.679150000e-5, "q3": 2.706200000e-5, "reps": 7 }, "gpu": { "median": 6.124995707e-6, "min": 6.000002031e-6, "max": 6.166665116e-6, "q1": 6.104164640e-6, "q3": 6.125002983e-6, "reps": 7 }, "host": { "median": 5.265000000e-4, "min": 4.912500000e-4, "max": 5.496250000e-4, "q1": 5.206460000e-4, "q3": 5.289170000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 256, "compile": { "median": 7.708000000e-6, "min": 7.583000000e-6, "max": 7.917000000e-6, "q1": 7.625000000e-6, "q3": 7.771000000e-6, "reps": 7 }, "library": { "median": 1.120900000e-5, "min": 1.091600000e-5, "max": 1.170900000e-5, "q1": 1.104150000e-5, "q3": 1.127100000e-5, "reps": 7 }, "pipeline": { "median": 2.662500000e-5, "min": 2.637500000e-5, "max": 2.679100000e-5, "q1": 2.652050000e-5, "q3": 2.666650000e-5, "reps": 7 }, "gpu": { "median": 6.000002031e-6, "min": 5.999994755e-6, "max": 6.124995707e-6, "q1": 6.000002031e-6, "q3": 6.020833098e-6, "reps": 7 }, "host": { "median": 5.137080000e-4, "min": 5.058750000e-4, "max": 5.431250000e-4, "q1": 5.129375000e-4, "q3": 5.265415000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 1024, "compile": { "median": 7.542000000e-6, "min": 7.416000000e-6, "max": 1.337500000e-5, "q1": 7.458500000e-6, "q3": 7.645500000e-6, "reps": 7 }, "library": { "median": 1.125000000e-5, "min": 1.091700000e-5, "max": 1.137500000e-5, "q1": 1.100000000e-5, "q3": 1.127100000e-5, "reps": 7 }, "pipeline": { "median": 2.658300000e-5, "min": 2.641700000e-5, "max": 2.945900000e-5, "q1": 2.652100000e-5, "q3": 2.668750000e-5, "reps": 7 }, "gpu": { "median": 6.250003935e-6, "min": 6.166665116e-6, "max": 6.250003935e-6, "q1": 6.229165592e-6, "q3": 6.250003935e-6, "reps": 7 }, "host": { "median": 5.196250000e-4, "min": 4.705420000e-4, "max": 5.796250000e-4, "q1": 4.989585000e-4, "q3": 5.451670000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 4096, "compile": { "median": 7.583000000e-6, "min": 7.458000000e-6, "max": 7.625000000e-6, "q1": 7.541500000e-6, "q3": 7.604500000e-6, "reps": 7 }, "library": { "median": 1.120900000e-5, "min": 1.100000000e-5, "max": 1.129200000e-5, "q1": 1.114600000e-5, "q3": 1.127050000e-5, "reps": 7 }, "pipeline": { "median": 2.725000000e-5, "min": 2.645900000e-5, "max": 3.054200000e-5, "q1": 2.693750000e-5, "q3": 2.866700000e-5, "reps": 7 }, "gpu": { "median": 6.208334526e-6, "min": 6.166672392e-6, "max": 6.333335477e-6, "q1": 6.208330888e-6, "q3": 6.250003935e-6, "reps": 7 }, "host": { "median": 5.233330000e-4, "min": 4.921660000e-4, "max": 5.424170000e-4, "q1": 5.017080000e-4, "q3": 5.346455000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "float-exact",
|
||||
"stage": "compute",
|
||||
"source": "translated-rdna",
|
||||
"status": "benchmarked",
|
||||
"reason": "",
|
||||
"sizes": [
|
||||
{ "words": 4, "compile": { "median": 9.125000000e-6, "min": 8.667000000e-6, "max": 1.658300000e-5, "q1": 8.812500000e-6, "q3": 1.385400000e-5, "reps": 7 }, "library": { "median": 1.208400000e-5, "min": 1.141600000e-5, "max": 1.837500000e-5, "q1": 1.166650000e-5, "q3": 1.229150000e-5, "reps": 7 }, "pipeline": { "median": 2.712500000e-5, "min": 2.662500000e-5, "max": 2.866700000e-5, "q1": 2.677050000e-5, "q3": 2.743750000e-5, "reps": 7 }, "gpu": { "median": 6.166665116e-6, "min": 5.958332622e-6, "max": 6.250003935e-6, "q1": 6.125002983e-6, "q3": 6.229165592e-6, "reps": 7 }, "host": { "median": 5.106660000e-4, "min": 4.910840000e-4, "max": 6.143750000e-4, "q1": 5.022500000e-4, "q3": 5.370625000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 64, "compile": { "median": 8.583000000e-6, "min": 8.541000000e-6, "max": 1.425000000e-5, "q1": 8.583000000e-6, "q3": 8.687500000e-6, "reps": 7 }, "library": { "median": 1.145800000e-5, "min": 1.116700000e-5, "max": 1.187500000e-5, "q1": 1.131200000e-5, "q3": 1.164600000e-5, "reps": 7 }, "pipeline": { "median": 2.650000000e-5, "min": 2.620800000e-5, "max": 2.725000000e-5, "q1": 2.631300000e-5, "q3": 2.700000000e-5, "reps": 7 }, "gpu": { "median": 6.041671440e-6, "min": 5.916670489e-6, "max": 6.125002983e-6, "q1": 6.041664165e-6, "q3": 6.104164640e-6, "reps": 7 }, "host": { "median": 5.237920000e-4, "min": 4.042920000e-4, "max": 5.358750000e-4, "q1": 5.191665000e-4, "q3": 5.336665000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 256, "compile": { "median": 8.583000000e-6, "min": 8.500000000e-6, "max": 8.834000000e-6, "q1": 8.562000000e-6, "q3": 8.708500000e-6, "reps": 7 }, "library": { "median": 1.112500000e-5, "min": 1.091600000e-5, "max": 1.129200000e-5, "q1": 1.110450000e-5, "q3": 1.120850000e-5, "reps": 7 }, "pipeline": { "median": 2.645900000e-5, "min": 2.629200000e-5, "max": 2.658400000e-5, "q1": 2.641650000e-5, "q3": 2.652100000e-5, "reps": 7 }, "gpu": { "median": 6.041664165e-6, "min": 5.999994755e-6, "max": 6.083333574e-6, "q1": 6.000002031e-6, "q3": 6.083333574e-6, "reps": 7 }, "host": { "median": 5.149170000e-4, "min": 5.000000000e-4, "max": 5.907500000e-4, "q1": 5.053955000e-4, "q3": 5.300000000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 1024, "compile": { "median": 8.667000000e-6, "min": 8.500000000e-6, "max": 8.792000000e-6, "q1": 8.583500000e-6, "q3": 8.791500000e-6, "reps": 7 }, "library": { "median": 1.112500000e-5, "min": 1.104100000e-5, "max": 1.120900000e-5, "q1": 1.106250000e-5, "q3": 1.114600000e-5, "reps": 7 }, "pipeline": { "median": 2.629200000e-5, "min": 2.612500000e-5, "max": 2.637500000e-5, "q1": 2.625000000e-5, "q3": 2.635400000e-5, "reps": 7 }, "gpu": { "median": 6.208327250e-6, "min": 6.000002031e-6, "max": 6.250003935e-6, "q1": 6.145830412e-6, "q3": 6.229169230e-6, "reps": 7 }, "host": { "median": 5.206670000e-4, "min": 5.023330000e-4, "max": 5.300840000e-4, "q1": 5.051045000e-4, "q3": 5.258955000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 },
|
||||
{ "words": 4096, "compile": { "median": 8.667000000e-6, "min": 8.458000000e-6, "max": 8.750000000e-6, "q1": 8.542000000e-6, "q3": 8.687500000e-6, "reps": 7 }, "library": { "median": 1.116700000e-5, "min": 1.100000000e-5, "max": 1.133400000e-5, "q1": 1.108350000e-5, "q3": 1.125000000e-5, "reps": 7 }, "pipeline": { "median": 2.645800000e-5, "min": 2.595900000e-5, "max": 2.691600000e-5, "q1": 2.641700000e-5, "q3": 2.658350000e-5, "reps": 7 }, "gpu": { "median": 6.250003935e-6, "min": 6.166665116e-6, "max": 6.375004887e-6, "q1": 6.250000297e-6, "q3": 6.333331839e-6, "reps": 7 }, "host": { "median": 5.146670000e-4, "min": 4.975000000e-4, "max": 5.337500000e-4, "q1": 5.105415000e-4, "q3": 5.209795000e-4, "reps": 7 }, "gpu_zero_fraction": 0.0000 }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -498,3 +498,135 @@ fn normalize_llvm_assembly(assembly: &str, next_offset: usize) -> String {
|
||||
_ => assembly.to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn displays_decoded_instructions_and_decode_errors() {
|
||||
let decoded = DecodedInstruction {
|
||||
offset: 0x1a,
|
||||
byte_len: 4,
|
||||
instruction: Instruction::EndProgram,
|
||||
};
|
||||
assert_eq!(decoded.to_string(), "001a: s_endpgm");
|
||||
for (error, expected) in [
|
||||
(
|
||||
DecodeError {
|
||||
offset: 0x10,
|
||||
kind: DecodeErrorKind::Truncated {
|
||||
needed: 8,
|
||||
available: 4,
|
||||
},
|
||||
},
|
||||
"gfx1030 decode at byte 0x10: instruction requires 8 bytes, found 4",
|
||||
),
|
||||
(
|
||||
DecodeError {
|
||||
offset: 0,
|
||||
kind: DecodeErrorKind::UnsupportedOpcode { word: 0xdead_beef },
|
||||
},
|
||||
"gfx1030 decode at byte 0x0: unsupported opcode in 0xdeadbeef",
|
||||
),
|
||||
(
|
||||
DecodeError {
|
||||
offset: 0,
|
||||
kind: DecodeErrorKind::UnsupportedForm {
|
||||
mnemonic: "s_mov_b32",
|
||||
detail: "expected a normal SGPR destination",
|
||||
},
|
||||
},
|
||||
"gfx1030 decode at byte 0x0: unsupported s_mov_b32 form: expected a normal SGPR destination",
|
||||
),
|
||||
(
|
||||
DecodeError {
|
||||
offset: 0,
|
||||
kind: DecodeErrorKind::InvalidBranchTarget { target: 0x20 },
|
||||
},
|
||||
"gfx1030 decode at byte 0x0: branch target 0x20 is outside instruction boundaries",
|
||||
),
|
||||
] {
|
||||
assert_eq!(error.to_string(), expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn decodes_inline_negative_and_register_sources() {
|
||||
// s_mov_b32 s10, 5; s_mov_b32 s11, -3; v_mov_b32_e32 v2, 5;
|
||||
// v_mov_b32_e32 v2, -3; v_mov_b32_e32 v2, v1.
|
||||
let words = [
|
||||
0xbe8a_0385u32,
|
||||
0xbe8b_03c3,
|
||||
0x7e04_0285,
|
||||
0x7e04_02c3,
|
||||
0x7e04_0301,
|
||||
];
|
||||
let bytes: Vec<_> = words.iter().flat_map(|word| word.to_le_bytes()).collect();
|
||||
let decoded = decode(Architecture::Gfx1030, &bytes).unwrap();
|
||||
assert_eq!(
|
||||
decoded[0].instruction,
|
||||
Instruction::ScalarMoveB32 {
|
||||
dst: 10,
|
||||
src: ScalarSource::Immediate(5)
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
decoded[1].instruction,
|
||||
Instruction::ScalarMoveB32 {
|
||||
dst: 11,
|
||||
src: ScalarSource::Immediate(0xffff_fffd)
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
decoded[2].instruction,
|
||||
Instruction::MoveB32 {
|
||||
dst: 2,
|
||||
src: VectorSource::Immediate(5)
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
decoded[3].instruction,
|
||||
Instruction::MoveB32 {
|
||||
dst: 2,
|
||||
src: VectorSource::Immediate(0xffff_fffd)
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
decoded[4].instruction,
|
||||
Instruction::MoveB32 {
|
||||
dst: 2,
|
||||
src: VectorSource::Register(1)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn accepts_scalar_destination_105_and_vgpr_zero_add_sources() {
|
||||
// s_mov_b32 s105, 0 is the highest normal SGPR destination.
|
||||
let valid = 0xbee9_0380u32.to_le_bytes();
|
||||
assert_eq!(
|
||||
decode(Architecture::Gfx1030, &valid).unwrap()[0].instruction,
|
||||
Instruction::ScalarMoveB32 {
|
||||
dst: 105,
|
||||
src: ScalarSource::Immediate(0)
|
||||
}
|
||||
);
|
||||
// s_mov_b32 s106, 0 does not fit the normal SGPR range.
|
||||
let invalid = 0xbeea_0380u32.to_le_bytes();
|
||||
assert_eq!(
|
||||
decode(Architecture::Gfx1030, &invalid).unwrap_err().kind,
|
||||
DecodeErrorKind::UnsupportedForm {
|
||||
mnemonic: "s_mov_b32",
|
||||
detail: "expected a normal SGPR destination",
|
||||
}
|
||||
);
|
||||
|
||||
// v_add_nc_u32_e64 v1, v0, v0 uses selector 256 (V0) for both sources.
|
||||
let words = [0xd525_0001u32, 0x0202_0100];
|
||||
let bytes: Vec<_> = words.iter().flat_map(|word| word.to_le_bytes()).collect();
|
||||
assert_eq!(
|
||||
decode(Architecture::Gfx1030, &bytes).unwrap()[0].instruction,
|
||||
Instruction::AddNoCarryU32 {
|
||||
dst: 1,
|
||||
src0: 0,
|
||||
src1: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -12,8 +12,8 @@
|
||||
| G6 | Automated form coverage is complete. LLVM 23.1.6 and both Xenora decoders matched 303 instructions across all 15 supported forms. Candidate-commit and independent reviewer sign-off remain open. See the [coverage matrix](../shaders/instruction-coverage.md#automated-three-way-comparison). |
|
||||
| G7 | `cargo mutants --workspace --list --json` restricted to the decoder, compiler and reference sources enumerated 373 source mutants. The source, semantic and oracle campaigns and survivor triage remain pending. No kill rate is available. |
|
||||
| G8 | `scripts/audit/claims.sh` passed for 15 entries (A=4, B=2, D=6, E=2, U=1). The lint checks registered references and verification state. The audit of all hardware claims in prose remains open. |
|
||||
| G9 | An earlier compiler campaign was interrupted after 74,020,192 reported executions. The latest decoder campaign was interrupted after 106,796,894 reported executions, about 212 seconds, exit 130. Neither log reports a crash before interruption. Latest compiler and reference campaigns were not started. The required 600 seconds per target remain pending. |
|
||||
| G10 | Benchmark implementation and reports are deferred. The host reported battery power. No measurements are available. |
|
||||
| G9 | All three CPU-only targets completed the required 600 seconds serially with no crash, timeout, OOM or leak report: `instruction_stream` 161,115,729 runs, `fixture` 98,204,690 runs and `reference` 176,482,975 runs, 435,803,394 executions in total. Logs are under ignored `artifacts/g9/`. Candidate rerun and R2 sign-off remain. |
|
||||
| G10 | `scripts/benchmark.sh` builds a release harness that gates every timed fixture on the Rust pipeline, the independent reference and a native GPU correctness check before timing, then reports compile, library, pipeline, GPU and host medians with quartiles. A reps=7 release run with validation off benchmarked all three fixtures at 4 to 4096 words on Apple M5 (`run-1795338391`); the GPU zero-sample fraction was 0%. The host was on battery power, so per protocol this run is **not** release evidence. An idle AC-power rerun remains. |
|
||||
| G11 | Pinned runtime and fuzz inventories and applicable repository notices are present. The upstream objc2 notice raises an unresolved SDK-derived binding redistribution question. Final independent license approval remains open. |
|
||||
| G12 | Independent initial history and local output inspection found no matching private key or token patterns. A previously unignored standalone validation build folder is now ignored. Full candidate and history audits remain open. |
|
||||
| G13 | README and machine-readable status reflect the three supported synthetic fixtures and the native suite. Final independent consistency review remains open. |
|
||||
|
||||
Reference in new issue
Block a user