Conversation
|
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8866
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit e52508d with merge base cca6917 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| data_out[out_index] = | ||
| data_cond[cond_index] ? data_a[a_index] : data_b[b_index]; |
There was a problem hiding this comment.
Love how clean it reads :)
Couple of high level comments,
- Not too familiar with how people use this op i.e. any common case we see often in the wild, but are there any short-circuits we can do to avoid coming here?
- Similarly, depending on the condition, if we know we are biased towards A vs. B, we can first copy A to the result and then go through data_cond and pick B.
- Lastly, I am assuming we want to do SIMD later, if we do then we can use predicates, that should make it less "branchy". It may not help much with load/stores though.
There was a problem hiding this comment.
if we know we are biased towards A vs. B
we can't possibly know this in general.
SIMD later
not currently on my agenda, but I may have to come back.
|
unittest-editable failure is a known flake, so noting that we have green CI. I think this will cause -Wunused -Werror builds to fail though, so I need to fix that before merging. |
Checked, works fine, I misread my own code. |
It materializes separate kernels for the cases where the two input data tensors have the same dtype and the third one has dtype bool.
ghstack-comment-id: 2691805026 ghstack-source-id: 38e1996 ghstack-comment-id: 2691808920 Pull Request resolved: pytorch/executorch#8866
It materializes separate kernels for the cases where the two input data tensors have the same dtype and the third one has dtype bool.