-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-891] Support tuple of scales in upsample operator #14042
Conversation
@mxnet-label-bot add [pr-work-in-progress, ONNX, Operator] |
fb8046f
to
f5dd911
Compare
@mxnet-label-bot update [pr-awaiting-review, ONNX, Operator] |
f5dd911
to
e97232d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! Looks like quite a few CI jobs have failed - have a look.
} | ||
|
||
// perform the upsampling | ||
int i0, i1, i2, i3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about using index_t as datatype for all of them
Since for large operator support it was found to be useful -#13418
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll make this change
@Roshrini Ping for review! |
e97232d
to
b2a6219
Compare
@anirudh2290 @samskalicky @apeforest for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
int iout[4]; // Output indices | ||
int iin[4]; // Input indices | ||
|
||
for (i0 = 0; i0 < osz0; i0++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this nested for loop be vectorized?
@mxnet-label-bot update [ONNX, Operator, pr-work-in-progress] |
@vandanavk Thanks for your contribution! Could you please rebase and resolve conflicts? |
@vandanavk Gentle ping... |
@vandanavk Can you resolve conflicts and look into build failures? |
@vandanavk, thanks for your contribution, and I'm interested in this feature. But I have a question about it, have you tested the effect of this fix on the performance of the original int scale in upsample operator? I have a simple test script, and the result are below:
could you help check the performance drop after you rebase and resolve conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Significant performance difference from the new implementation on the CPU.
@vandanavk could you help to fix it? Feel free to let me know if anything I can help :)
@huangzhiyuan thanks for the script and performance numbers. I haven't had a chance to look into the performance yet. Will work on it soon. |
@vandanavk Did you get a chance to work on it ? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I use the UpSampling code here?
Just copying and pasting that code into _op_transalations.py doesn’t work. it spits the error the 'UpSampling' isn't found. It’s probably because there’s a ‘get_inputs’ function which I don’t know where is located. and also it uses ‘onnx.’ i guess I should import onnx in the same file?
Any updates on that? This would be quite appreciated: https://stackoverflow.com/questions/56246010/the-upsampling-operation-is-not-supported-when-convert-mxnet-model-to-onnx-model |
@benhe2011 is working on optimizing the code based on @huangzhiyuan's comments. |
Closing in favor of #15811. |
Description
This PR adds the option to specify different scales for different dimensions.
Ref: #12602
Fixes #12851
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments