Better continuous batching tests #42699
Open
+204
−299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since a lot of features have been added to continuous batching, this PR aims o refactor the associated tests so we can catch new failures. The structure of the tests used to be one test per model / attention implementation. Now we have one test backend, that makes sure the generation with and without CB is coherent. It is called in two tests:
There was also an effort to regroup the streaming tests so it can use the same backend.
Overhaul, the new tests cover more ground for a lesser amount of code. And it already caught one bug: zero-sized cuda graphs failed silently, which led to slight generation divergence.