[Bugfix][Attention] Normalize FlashInfer prefill LSE before merging (#52796)
Signed-off-by: yimdev <5779256+yimdev@users.noreply.github.com> Co-authored-by: usberkeley <150880684+usberkeley@users.noreply.github.com>
This commit is contained in:
@@ -1662,6 +1662,12 @@ def _run_backend_correctness(
|
||||
kv_cache_per_block_size[block_size] = kv_cache
|
||||
|
||||
# 4. Run vLLM backends and compare
|
||||
rtol = 1e-2
|
||||
atol = {
|
||||
"auto": 1e-2,
|
||||
"fp8": 1.5e-1,
|
||||
"fp8_e4m3": 1.5e-1,
|
||||
}[kv_cache_dtype]
|
||||
failures = []
|
||||
for backend_idx, backend_name in enumerate(backends_to_test):
|
||||
# Skip backends that don't support spec decode for spec decode tests
|
||||
@@ -1726,10 +1732,6 @@ def _run_backend_correctness(
|
||||
f"[{backend_name}] produced non-finite values"
|
||||
)
|
||||
|
||||
# Check numerical similarity
|
||||
rtol = 1e-2
|
||||
atol = 5e-1
|
||||
|
||||
max_diff = torch.max(torch.abs(backend_output - expected_output)).item()
|
||||
max_rel_diff = torch.max(
|
||||
torch.abs(backend_output - expected_output) / torch.abs(expected_output)
|
||||
|
||||
Reference in New Issue
Block a user