Uh oh!
There was an error while loading. Please reload this page.
[Relay][Op] Trilu operator implementation - #12124
Conversation
jwfromm
commented
Jul 18, 2022
@sfvaroglu Can you take a look at this PR? |
sfvaroglu
commented
Jul 19, 2022
LGTM! Thanks for doing this @jwfromm! cc @mikepapadim |
mikepapadim
commented
Jul 19, 2022
221026d to
cc2864eCompare| "test_tril_one_row_neg", | ||
| "test_tril_out_neg", | ||
| "test_tril_out_pos", | ||
| "test_tril_zero", |
There was a problem hiding this comment.
I haven't looked at this op at all. How tricky would it be to support the zero case? Otherwise LGTM.
There was a problem hiding this comment.
It actually works on llvm and cuda. I was testing on my macbook and it seems like the metal backend in general doesnt support empty tensors. I think for CI we could add these cases.
There was a problem hiding this comment.
Seems like it also doesnt work with nvptx for the same issue with empty tensors. I'll add them here and see how it does in CI.
shingjan
left a comment
There was a problem hiding this comment.
Overall LGTM. Thanks for sending this in! Our pytorch frontend could use this new Trilu op as well. Just one nit.
Uh oh!
There was an error while loading. Please reload this page.
jwfromm
commented
Jul 27, 2022
I added pytorch testing and integration. Thanks for the recommendation @shingjan. |
jwfromm
commented
Jul 27, 2022
Unfortunately the empty tensor tests still fail on CI GPUs. I'm not sure why, it doesnt seem like its directly related to this PR so I'm going to reenable skips for those tests. |
jwfromm
commented
Aug 2, 2022
@mbrookhart I think this is ready to merge. |
mbrookhart
commented
Aug 2, 2022
* Added topi trilu implementation * Implemented and tested full Trilu op. * Fix test type. * Add tril zero tests. * Add pytorch trilu integration. * Clean up torch integration. * Readded skip for zero tests.
This PR adds a new operator that supports triangular masking similar to that in
np.triuandnp.tril. The addition ofrelay.triluconveniently lets us pass many of the remaining onnx tests.