-
Notifications
You must be signed in to change notification settings - Fork 28k
Static size boolean masking #96111
Copy link
Copy link
Open
Labels
module: advanced indexingRelated to x[i] = y, index functionsRelated to x[i] = y, index functionstriagedThis 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: advanced indexingRelated to x[i] = y, index functionsRelated to x[i] = y, index functionstriagedThis 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
Type
Fields
Give feedbackNo fields configured for issues without a type.
🐛 Describe the bug
A long standing request is #62320 ; Executorch team has agreed to implement it.
Once this is implemented, we can also get static size boolean masking to work too. The easiest way is to convert the boolean mask into an index tensor. You can use the meta implementation for indexing to do this:
The main annoyance is that if there are not enough elements to fill the nonzero, it will be zero padded. For a boolean mask, a zero pad is inappropriate; instead you want an invalid index, and then to fill the indexing op with some placeholder element like 0.
Versions
master