Skip to content

test(BACKEND-ROCM): the block-size contract is enforced at its production call site - #1273

Open
tbrasser wants to merge 1 commit into
mudler:mainfrom
tbrasser:row/ROCM-ATTN-VALIDATE-GFX1151
Open

test(BACKEND-ROCM): the block-size contract is enforced at its production call site#1273
tbrasser wants to merge 1 commit into
mudler:mainfrom
tbrasser:row/ROCM-ATTN-VALIDATE-GFX1151

Conversation

@tbrasser

Copy link
Copy Markdown
Contributor

Closes the "Owed" item from #1065: CheckKvCacheShape's production call site in GPUModelRunner::initialize_kv_cache now has a test. Building the runner with a non-multiple-of-16 block size (kBlockSize = 8) asserts the throw at construction, from the FLASH_ATTN backend's own get_kv_cache_shape — the executable statement of the contract the server's --block-size validation and the bench rounding exist to prevent at the entry points.

Validated on gfx1151 (Strix Halo, ROCm 7.2.3) as part of the #41 M3 battery: test_runner 20/20 cases, 544 assertions, on the current-main build with #1056 + #1065 merged.

Issue: #41

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: DeepSeekV4:Flash [Freebuff]

…tion call site

`CheckKvCacheShape` is well tested in isolation (test_attn_backend_registry /
test_common_attn_metadata), but its install inside
`GPUModelRunner::initialize_kv_cache` had no test: deleting it left every
gate green (the mudler#1065 Owed item). A runner built with a non-multiple-of-16
block size now asserts the throw at construction, from the FLASH_ATTN
backend's own `get_kv_cache_shape` — the executable statement of the
contract the server's `--block-size` validation and the bench rounding
exist to prevent at the entry points.

Validated on gfx1151 (Strix Halo) as part of the M3 battery: test_runner
20/20, 544 assertions.

Issue: mudler#41

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: Buffy:assistant [Freebuff]
@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

@mudler This is good to merge. The test reaches the production GPUModelRunner::initialize_kv_cache call site, uses the existing dense fixture, and asserts the backend contract and exception type. The branch-specific record/documentation/protocol gates pass; the Windows and newest-GCC failures are current main/toolchain failures tracked separately, not caused by this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants