-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Bitwise shifts should retain the same dtype as the first input #59867
Copy link
Copy link
Closed
Labels
module: python array apiIssues related to the Python Array APIIssues related to the Python Array APImodule: type promotionRelated to semantics of type promotionRelated to semantics of type promotionneeds designWe want to add this feature but we need to figure out how firstWe want to add this feature but we need to figure out how firsttriagedThis 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
Metadata
Metadata
Assignees
Labels
module: python array apiIssues related to the Python Array APIIssues related to the Python Array APImodule: type promotionRelated to semantics of type promotionRelated to semantics of type promotionneeds designWe want to add this feature but we need to figure out how firstWe want to add this feature but we need to figure out how firsttriagedThis 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
The array API specification stipulates that
bitwise_left_shiftandbitwise_left_shift(which don't exist yet (see #58742) but their magics__lshift__and__rshift__do) do not participate in the default type promotion, but rather retain thedtypeof the first input. PyTorch performs the standard type promotion.cc @mruberry @rgommers @pmeier @asmeurer @leofang @nairbv