mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Enable half type support for unique cpu (#91666)
Test Plan: CI Differential Revision: D42326527 Pull Request resolved: https://github.com/pytorch/pytorch/pull/91666 Approved by: https://github.com/jgong5, https://github.com/ngimel
This commit is contained in:
committed by
PyTorch MergeBot
parent
04b4704a0b
commit
753c33bf86
@ -826,7 +826,7 @@ class TestSortAndSelect(TestCase):
|
||||
self.assertEqual(expected_inverse.view(additional_shape), y_inverse)
|
||||
self.assertEqual(expected_counts, y_counts)
|
||||
|
||||
@dtypesIfCPU(*all_types_and(torch.bool, torch.bfloat16))
|
||||
@dtypesIfCPU(*all_types_and(torch.bool, torch.float16, torch.bfloat16))
|
||||
@dtypes(*all_types_and(torch.half, torch.bool))
|
||||
def test_unique(self, device, dtype):
|
||||
def ensure_tuple(x):
|
||||
@ -883,7 +883,7 @@ class TestSortAndSelect(TestCase):
|
||||
count += 1
|
||||
self.assertEqual(j, count)
|
||||
|
||||
@dtypesIfCPU(*all_types_and(torch.bool, torch.bfloat16))
|
||||
@dtypesIfCPU(*all_types_and(torch.bool, torch.float16, torch.bfloat16))
|
||||
@dtypes(*all_types_and(torch.half, torch.bool))
|
||||
def test_unique_consecutive(self, device, dtype):
|
||||
if dtype is torch.bool:
|
||||
|
Reference in New Issue
Block a user