-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Open
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
argmax and other functions make sense for finding position of True element. Functions working with uint8 should likely be able to handle torch.bool as well.
In [16]: torch.__version__
Out[16]: '1.5.0.dev20200310'
In [11]: torch.ones(3, dtype = torch.bool).argmax()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/convasr/ot/vis.py in <module>
----> 1 torch.ones(3, dtype = torch.bool).argmax()
RuntimeError: "argmax_cpu" not implemented for 'Bool'
In [12]: torch.ones(3, dtype = torch.bool).argmin()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/convasr/ot/vis.py in <module>
----> 1 torch.ones(3, dtype = torch.bool).argmin()
RuntimeError: "argmin_cpu" not implemented for 'Bool'
In [13]: torch.ones(3, dtype = torch.bool).argsort()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/convasr/ot/vis.py in <module>
----> 1 torch.ones(3, dtype = torch.bool).argsort()
RuntimeError: _th_sort not supported on CPUType for Bool
In [14]: torch.ones(3, dtype = torch.bool).topk(1)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/convasr/ot/vis.py in <module>
----> 1 torch.ones(3, dtype = torch.bool).topk(1)
RuntimeError: "topk_cpu" not implemented for 'Bool'
In [15]: torch.ones(3, dtype = torch.bool).sort()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~/convasr/ot/vis.py in <module>
----> 1 torch.ones(3, dtype = torch.bool).sort()
RuntimeError: _th_sort not supported on CPUType for Bool
stefanik12, function2-llx and DarkLight1337
Metadata
Metadata
Assignees
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module