Unverified Commit 00c3edc1 authored by Chang Liu's avatar Chang Liu Committed by GitHub
Browse files

[Bugfix] Fix unit test failures on older GPUs (#5579)

parent c0f346e7
......@@ -405,6 +405,16 @@ def test_gather_mm_idx_b(feat_size, dtype, tol):
):
pytest.skip("BF16 is not supported.")
if (
F._default_context_str == "gpu"
and dtype == torch.float16
and torch.cuda.get_device_capability() < (7, 0)
):
pytest.skip(
f"FP16 is not supported for atomic operations on GPU with "
f"cuda capability ({torch.cuda.get_device_capability()})."
)
dev = F.ctx()
# input
a = torch.tensor(np.random.rand(100, feat_size)).to(dev).to(dtype)
......
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