[Refactor] Reducing code duplication across FP8 CUDA quantization kernels (#4163)
This commit is contained in:
1 parent
c7f254468f
commit
95085d65e9
5 files changed
+32
-64
No files matched your search
@@ -40,9 +40,6 @@ def calculate_diff(batch_size: int, seq_len: int):
|
||||
scale_diff = torch.abs(vllm_scale - sglang_scale).mean().item()
|
||||
output_diff = torch.abs(vllm_out.float() - sglang_out.float()).mean().item()
|
||||
|
||||
print(f"Scale difference: {scale_diff}")
|
||||
print(f"Output difference: {output_diff}")
|
||||
|
||||
if torch.allclose(
|
||||
vllm_out.to(torch.float32), sglang_out.to(torch.float32), rtol=1e-3, atol=1e-5
|
||||
) and torch.allclose(vllm_scale, sglang_scale, rtol=1e-3, atol=1e-5):
|
||||
|
||||
Reference in new issue
Block a user