Skip to content

Conversation

TMVector
Copy link
Contributor

I noticed some backend tests on master hadn't been generated. Looks like the function-expanded ones for #2570 and #2573, so should probably go in for 1.7.

@TMVector TMVector requested a review from a team as a code owner February 24, 2020 10:07
@TMVector
Copy link
Contributor Author

Maybe a check could be added to CI, similar to how (I believe) it checks docs are up to date

@linkerzhang
Copy link
Member

exactly, I like the idea on adding a check on the doc update, same as proto and operator docs. @TMVector are you interested in it? :)

@TMVector TMVector requested a review from a team as a code owner February 25, 2020 23:39
This should partly fix a bug where names are mapped differently for node
inputs and outputs.
@TMVector
Copy link
Contributor Author

Unfortunately generating these tests seems to expose issues with the definition of MeanSquareDistance and SoftmaxCrossEntropyLoss, plus with function expansion. I'm looking at fixes now.

This hopefully fixes a bug related to intermediate values inside
function bodies being erroneously dropped if they were also outputs.
@@ -22,22 +22,28 @@
from onnx.onnx_operators_pb import FunctionProto


# FIXME(TMVector): Any reason we can't get rid of this and use the C++ helper directly?
Copy link
Contributor Author

@TMVector TMVector Feb 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO/question -- can we remove the Python function expansion helper and use the one from C++?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me, thanks! I guess we can import the C++ version into Python (provided there is no subtle difference between them due to bugs, etc., I suppose). I guess that could be a different PR, given that we are close to the cutoff date for the next ONNX release.

@gramalingam gramalingam added this to the 1.7 milestone Feb 27, 2020
@linkerzhang linkerzhang merged commit 2275235 into onnx:master Feb 27, 2020
@TMVector TMVector deleted the generate-tests branch February 27, 2020 09:16
jcwchen pushed a commit to jcwchen/onnx that referenced this pull request Sep 23, 2020
…nx#2623)

* Generate tests for MeanSquareDistance and SoftmaxCrossEntropyLoss

* Fix logic error in MSD/SCE function builders

* Regenerate MeanSquareDistance and SoftmaxCrossEntropyLoss backend tests

* Add keepdims=0 to Reduce operators in function body of MSD

* Add shape inference test for reducing all dims with keepdims=0

* Unify input/output name mapping in function expansion

This should partly fix a bug where names are mapped differently for node
inputs and outputs.

* Use fresh name for missing outputs of functions

This hopefully fixes a bug related to intermediate values inside
function bodies being erroneously dropped if they were also outputs.

* Regenerate MeanSquareDistance and SoftmaxCrossEntropy backend tests

* Fix SCE to use 'reduction' attribute from function for NLL

* Regenerate backend tests for SoftmaxCrossEntropyLoss

Co-authored-by: Prasanth Pulavarthi <prasantp@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants