mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add cummax
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32169 Differential Revision: D19393236 Pulled By: anjali411 fbshipit-source-id: 5dac6b0a4038eb48458d4a0b253418daeccbb6bc
This commit is contained in:
committed by
Facebook Github Bot
parent
02c3493a84
commit
8dc67a014f
@ -977,6 +977,14 @@ class TestNamedTensor(TestCase):
|
||||
for testcase, device in itertools.product(tests, torch.testing.get_all_device_types()):
|
||||
_test(testcase, device=device)
|
||||
|
||||
def test_cummax(self):
|
||||
for device in torch.testing.get_all_device_types():
|
||||
names = ('N', 'D')
|
||||
tensor = torch.rand(2, 3, names=names)
|
||||
result = torch.cummax(tensor, 0)
|
||||
self.assertEqual(result[0].names, names)
|
||||
self.assertEqual(result[1].names, names)
|
||||
|
||||
def test_bitwise_not(self):
|
||||
for device in torch.testing.get_all_device_types():
|
||||
names = ('N', 'D')
|
||||
|
Reference in New Issue
Block a user