Skip to content

test: keep the fp8 tests runnable in a single pytest process - #2

Open
MT-z wants to merge 4 commits into
ArqAlice:feat/fp8-quantizationfrom
MT-z:fix/fp8-tests-single-process
Open

test: keep the fp8 tests runnable in a single pytest process#2
MT-z wants to merge 4 commits into
ArqAlice:feat/fp8-quantizationfrom
MT-z:fix/fp8-tests-single-process

Conversation

@MT-z

@MT-z MT-z commented Sep 5, 2026

Copy link
Copy Markdown

Nothing is wrong with the branch -- @gdevenyi has it in production and I have been running it
here since yesterday. This is about how I was running the tests.

I had been going one file per process. Running it the way AGENTS.md gives it --
pytest tests/ -m "not slow", one process -- brought these four up, and they are the ones
already named in @gdevenyi's table on FlashML-org#354. Each is one line:

  • test_qsa_pool_fp8: the round-trip reaches row 256, so the pool gets the fifth page
  • test_kv_fp8: the scale-one encoder's V tensor gets a device
  • test_mha_pool_fp8: the remap pool is built deep enough for layer_ids=(1, 3)
  • test_triton_attention: the two FakeKVCache doubles answer k_scale / v_scale with None

With them the suite reports the same either way, one process or one file per process. RTX 4090
(sm_89), i9-14900KF, torch 2.11.0+cu130, triton 3.6.0, no checkpoint; nothing outside tests/
is touched. The reasoning for each is in its commit message.

Second time at your door with a patch, and I am grateful you opened it the first.

Assisted-by: Claude Opus 5

MT-z added 4 commits September 5, 2026 22:17
`test_store_kv_writes_the_slot_the_attend_kernel_will_read` reaches row 256 -- its comment
asks for the 255/256 page boundary -- against a four-page, 256-slot pool, so `codes[out_loc]`
gathers one row past the view. Five pages is what that row list needs.

The gather raises a device-side assert, and the CUDA context does not recover from it, so in
a single-process run everything scheduled afterwards is reported as failing as well -- not
because those tests stop working, but because there is no longer a context to run them in.
One file per process does not show that.

Assisted-by: Claude Opus 5
`test_encoder_inverts_the_grid_through_the_scale_one_path` moves `rows` to the device and
leaves the V tensor beside it on the host, so the kernel is handed a CPU pointer.

Assisted-by: Claude Opus 5
…its ids

`test_layer_ids_remap_applies_to_scales_too` backs `layer_ids=(1, 3)` on a pool built with
`num_layers=LAYERS`, and LAYERS is 3, so id 3 is one past the end and the constructor raises
before the assertion it is there to make. The helper now takes the depth.

Assisted-by: Claude Opus 5
…the backend now reads

`k_scale` / `v_scale` arrived with the fp8 store, and the backend reads them on every path,
including a 16-bit pool -- which answers None. The two hand-rolled `FakeKVCache` classes in
this file do not inherit the base pool, so they were left without them and raise
`AttributeError` instead.

Assisted-by: Claude Opus 5
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.

1 participant