CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / evidence / MODEL-CAPACITY-20261029.md
| 1 | <!-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --> |
| 2 | # Full-width model capacity guards |
| 3 | |
| 4 | Host-only, Linux AArch64, 2026-10-29. Fixes #129. No GPU opened. |
| 5 | Base: b348277e, with the independently reviewed component-capacity repair from #173. |
| 6 | |
| 7 | The old multiplication-first guards admit the reported full-width dimensions. |
| 8 | The replacement divides the capacity by a known nonzero factor before comparing. |
| 9 | The output guard handles zero columns separately. Positive block length and valid |
| 10 | nonzero K make both scale and element divisors nonzero. Zero-sized output retains |
| 11 | its existing policy and does not write the output array. |
| 12 | |
| 13 | ## Executed evidence |
| 14 | |
| 15 | `OMEGA_OMC=<pinned compiler> make test-model-capacity` |
| 16 | |
| 17 | - With original main's mxdot.om and the new fixture: make exits 2; |
| 18 | full-width-output-product expected 105, actual 0. |
| 19 | - With corrected mxdot.om: exit 0, MODEL CAPACITY PASS. |
| 20 | - Individual original full-width output/left/right cases: all exit 0. |
| 21 | - Corrected full-width output/left/right cases: all exit 105. |
| 22 | - Exact output capacity computes all zero results over sentinel-filled output. |
| 23 | - Zero-left and zero-right shapes return 0 and preserve sentinel output. |
| 24 | - Output, scale and element capacity overflow cases each exit 105. |
| 25 | |
| 26 | The fixture calls real mxmm with full-width dimensions, not the older byte-sized |
| 27 | wire driver. Reinstating the original source is the negative control. The guard |
| 28 | and fixture are included in the complete host-test manifest. |
| 29 | |
| 30 | ## Numeric checks |
| 31 | |
| 32 | WolframLanguageEvaluator query: |
| 33 | `With[{m=2^63,n=2,k=32},Mod[{m*n,(k/16)*m,(k/16)*n,(k/2)*m,(k/2)*n},2^64]]` |
| 34 | returned `{0,0,4,0,32}` (dimensionless counts). |
| 35 | |
| 36 | Query `2^63` returned `9223372036854775808` (dimensionless count). |
| 37 | |
| 38 | Query |
| 39 | `And@@Flatten[Table[Equivalent[a*b<=c,a<=Quotient[c,b]],{a,{0,1,16,256,4096,2^63,2^64-1}},{b,{1,2,16,32,256,4096,2^63}},{c,{256,4096}}]]` |
| 40 | returned `True`. This checks the selected integer examples, not a universal proof. |
| 41 | An attempted universal Resolve query remained unevaluated and is not claimed as proof. |
| 42 | |
| 43 | ## Tested source identities |
| 44 | 8f076133f4ef7a12050943c703bae3845bb31a3886084ee219dcaff38917721d native/models/mxdot.om |
| 45 | a72b834df231089b42850b078c6f007e838792b1d907a91c1c26dc5e4b3a0dcb tests/models/mxdot-capacity.om |
| 46 | 052f0380f0b137db97ba94fa69d3bde4e46dde6329fd0ed7945a65c6b5b31063 tests/models/capacity.sh |
| 47 | 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f pinned-omc |