[CI] Add entrypoint to hc_combine test for standalone execution (#37406)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
@@ -51,3 +53,7 @@ def test_hc_combine_strided_pre():
|
|||||||
ref = _reference(x_flat, pre, hc, torch.bfloat16)
|
ref = _reference(x_flat, pre, hc, torch.bfloat16)
|
||||||
scale = ref.float().abs().max().clamp(min=1e-6)
|
scale = ref.float().abs().max().clamp(min=1e-6)
|
||||||
assert (got.float() - ref.float()).abs().max() / scale < 5e-2
|
assert (got.float() - ref.float()).abs().max() / scale < 5e-2
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(pytest.main([__file__]))
|
||||||
|
|||||||
Reference in New Issue
Block a user