Unverified Commit 0da0989a authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

sync flashinfer and update sgl-kernel tests (#3081)

parent 07a22cbb
...@@ -47,7 +47,7 @@ jobs: ...@@ -47,7 +47,7 @@ jobs:
pip3 list | grep sgl-kernel pip3 list | grep sgl-kernel
- name: Run test - name: Run test
timeout-minutes: 10 timeout-minutes: 30
run: | run: |
cd sgl-kernel cd sgl-kernel
find tests -name "test_*.py" | xargs -n 1 python3 find tests -name "test_*.py" | xargs -n 1 python3
......
Subproject commit 4e8eb1879f9c3ba6d75511e5893183bf8f289a62 Subproject commit 93e1a2634e22355b0856246b032b285ad1d1da6b
...@@ -19,7 +19,7 @@ clean: ...@@ -19,7 +19,7 @@ clean:
@rm -rf build dist *.egg-info @rm -rf build dist *.egg-info
test: test:
@find tests -name "test_*.py" | xargs -n 1 python3 && pytest tests/test_norm.py && pytest tests/test_activation.py @find tests -name "test_*.py" | xargs -n 1 python3
format: format:
@find src tests -name '*.cc' -o -name '*.cu' -o -name '*.cuh' -o -name '*.h' -o -name '*.hpp' | xargs clang-format -i && find src tests -name '*.py' | xargs isort && find src tests -name '*.py' | xargs black @find src tests -name '*.cc' -o -name '*.cu' -o -name '*.cuh' -o -name '*.h' -o -name '*.hpp' | xargs clang-format -i && find src tests -name '*.py' | xargs isort && find src tests -name '*.py' | xargs black
...@@ -35,4 +35,5 @@ def test_fused_gelu_mul(dim, batch_size, seq_len): ...@@ -35,4 +35,5 @@ def test_fused_gelu_mul(dim, batch_size, seq_len):
torch.testing.assert_close(y_ref, y, rtol=1e-3, atol=1e-3) torch.testing.assert_close(y_ref, y, rtol=1e-3, atol=1e-3)
test_fused_silu_mul(128, 1, 1) if __name__ == "__main__":
pytest.main([__file__])
...@@ -82,3 +82,7 @@ def test_lightning_attention_decode(dtype, batch_size, num_heads, dim, embed_dim ...@@ -82,3 +82,7 @@ def test_lightning_attention_decode(dtype, batch_size, num_heads, dim, embed_dim
msg=f"New KV mismatch for batch_size={batch_size}, num_heads={num_heads}, " msg=f"New KV mismatch for batch_size={batch_size}, num_heads={num_heads}, "
f"dim={dim}, embed_dim={embed_dim}, dtype={dtype}", f"dim={dim}, embed_dim={embed_dim}, dtype={dtype}",
) )
if __name__ == "__main__":
pytest.main([__file__])
...@@ -127,3 +127,7 @@ def test_gemma_fused_add_rmsnorm(batch_size, hidden_size, dtype): ...@@ -127,3 +127,7 @@ def test_gemma_fused_add_rmsnorm(batch_size, hidden_size, dtype):
torch.testing.assert_close(x_fused, x_native, rtol=1e-3, atol=1e-3) torch.testing.assert_close(x_fused, x_native, rtol=1e-3, atol=1e-3)
torch.testing.assert_close(residual_fused, residual_native, rtol=1e-3, atol=1e-3) torch.testing.assert_close(residual_fused, residual_native, rtol=1e-3, atol=1e-3)
if __name__ == "__main__":
pytest.main([__file__])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment