Schema change to support dynamic shapes in ORT#2955
Merged
askhade merged 10 commits intoonnx:masterfrom Sep 15, 2020
Merged
Conversation
34303f1 to
eec2d91
Compare
gramalingam
reviewed
Aug 21, 2020
gramalingam
reviewed
Aug 21, 2020
gramalingam
reviewed
Aug 21, 2020
fe5bb8e to
8b484f8
Compare
gramalingam
approved these changes
Aug 27, 2020
Contributor
|
It would be helpful if someone familiar with the optimizer and convertor could also review the PR, as it has updates to those too. |
Contributor
|
Can you fix the CI errors? Thanks! |
Contributor
|
Looks good to me. Please address the CI failures and make sure to regenerate the test data before checking in. |
linkerzhang
reviewed
Sep 7, 2020
82be6db to
d79da37
Compare
bde3d80 to
520ca87
Compare
Member
|
Should we also update other ops (ReduceMax/Min/...) in the ReduceX family (they all have an 'axes' attribute) so that they can be consistent with ReduceSum? |
daquexian
pushed a commit
to daquexian/onnx
that referenced
this pull request
Sep 19, 2020
* Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com> Signed-off-by: daquexian <daquexian566@gmail.com>
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Sep 22, 2020
* Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com>
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Sep 22, 2020
* Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Sep 23, 2020
* Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
gramalingam
added a commit
that referenced
this pull request
Sep 23, 2020
* remove wrong description for pow Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Add size check to make_tensor (#2987) Co-authored-by: Ke Zhang <linkerzhang@yeah.net> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix float16 data convert issue in numpy_helper.to_array (#3002) * handle f16 case for to_array * fix flake8 * nit: comment Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Deprecate Travis CI (#2773) * adding gtests for c++ api test * deprecate travis * adding the build badges for the new pipelines in Azure, deprecating travis build badge, renaming circleCI badge * updating badge label * removing - in badge names * c++ api changes for linux * update environment variables * update env variables, setup tools call * Update Linux-CI.yml for Azure Pipelines * revert changes to Linux and Mac CIs * delete last travis file Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix shape inference of scalar ConstantOfShape (#3005) When input shape is (0), we do not add any dim to inferred shape but we should initialize tensor_type.shape by calling mutable_shape(). Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * fix shape inference for loop (#3014) Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix ConvTranspose: enhance attribute check (#3000) * add check for using auto_pad and pads simultaneously * fix description for auto_pads == SAME_UPPER * update docs for operator * fix the old one as well * add a test * Revert "fix description for auto_pads == SAME_UPPER" This reverts commit e75e287. * Revert "update docs for operator" This reverts commit 70952c0. * Revert "fix the old one as well" This reverts commit 8a0482d. Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Schema change to support dynamic shapes in ORT (#2955) * Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * fix loop shape inference for ver 11 (#3023) Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Update softmax family ops behavior to align with other frameworks (fix #2289) (#2879) * Update softmax family ops behavior to align with other frameworks * Update logsoftmax, hardmax tests, regenerate docs and test data * fix wrong input name in function * regenerate test data * fix flake8 error * regenerate docs * regenerate docs * add missing type annotation for hardmax * add the math for softmax family operators * remove the 'description' field in docs as it is covered by the math * fix wrong format in axis attr * replace name with description * restore the name field for axis attr * regenerate docs * regenerate docs * add the missing name * regenerate docs * update reducesum to align with master * regenerate tests Co-authored-by: Wei-Sheng Chin <wschin@outlook.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: G. Ramalingam <grama@microsoft.com> Co-authored-by: Ke Zhang <linkerzhang@yeah.net> Co-authored-by: Ashwini Khade <askhade@microsoft.com> Co-authored-by: Vinitra Swamy <vinitras@gmail.com> Co-authored-by: Shinichiro Hamaji <shinichiro.hamaji@gmail.com> Co-authored-by: ashbhandare <ash.bhandare@gmail.com> Co-authored-by: daquexian <daquexian566@gmail.com> Co-authored-by: Wei-Sheng Chin <wschin@outlook.com>
jcwchen
pushed a commit
to jcwchen/onnx
that referenced
this pull request
Oct 8, 2020
* Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com>
jcwchen
added a commit
to jcwchen/onnx
that referenced
this pull request
Oct 8, 2020
…x#2999) * remove wrong description for pow Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Add size check to make_tensor (onnx#2987) Co-authored-by: Ke Zhang <linkerzhang@yeah.net> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix float16 data convert issue in numpy_helper.to_array (onnx#3002) * handle f16 case for to_array * fix flake8 * nit: comment Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Deprecate Travis CI (onnx#2773) * adding gtests for c++ api test * deprecate travis * adding the build badges for the new pipelines in Azure, deprecating travis build badge, renaming circleCI badge * updating badge label * removing - in badge names * c++ api changes for linux * update environment variables * update env variables, setup tools call * Update Linux-CI.yml for Azure Pipelines * revert changes to Linux and Mac CIs * delete last travis file Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix shape inference of scalar ConstantOfShape (onnx#3005) When input shape is (0), we do not add any dim to inferred shape but we should initialize tensor_type.shape by calling mutable_shape(). Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * fix shape inference for loop (onnx#3014) Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Fix ConvTranspose: enhance attribute check (onnx#3000) * add check for using auto_pad and pads simultaneously * fix description for auto_pads == SAME_UPPER * update docs for operator * fix the old one as well * add a test * Revert "fix description for auto_pads == SAME_UPPER" This reverts commit e75e287. * Revert "update docs for operator" This reverts commit 70952c0. * Revert "fix the old one as well" This reverts commit 8a0482d. Co-authored-by: Ashwini Khade <askhade@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Schema change to support dynamic shapes in ORT (onnx#2955) * Changes to schema and python tests * Modify test * Remove attribute that is input also * Changes to optimizers, adapters and tests * Run flake8 * undo unrequired comit files, fix formatting, review changes * Fix ci test, cleanup * Fix narrowing conversion error * add missed test model Co-authored-by: G. Ramalingam <grama@microsoft.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * fix loop shape inference for ver 11 (onnx#3023) Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> * Update softmax family ops behavior to align with other frameworks (fix onnx#2289) (onnx#2879) * Update softmax family ops behavior to align with other frameworks * Update logsoftmax, hardmax tests, regenerate docs and test data * fix wrong input name in function * regenerate test data * fix flake8 error * regenerate docs * regenerate docs * add missing type annotation for hardmax * add the math for softmax family operators * remove the 'description' field in docs as it is covered by the math * fix wrong format in axis attr * replace name with description * restore the name field for axis attr * regenerate docs * regenerate docs * add the missing name * regenerate docs * update reducesum to align with master * regenerate tests Co-authored-by: Wei-Sheng Chin <wschin@outlook.com> Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: G. Ramalingam <grama@microsoft.com> Co-authored-by: Ke Zhang <linkerzhang@yeah.net> Co-authored-by: Ashwini Khade <askhade@microsoft.com> Co-authored-by: Vinitra Swamy <vinitras@gmail.com> Co-authored-by: Shinichiro Hamaji <shinichiro.hamaji@gmail.com> Co-authored-by: ashbhandare <ash.bhandare@gmail.com> Co-authored-by: daquexian <daquexian566@gmail.com> Co-authored-by: Wei-Sheng Chin <wschin@outlook.com>
yan12125
added a commit
to EMCLab-Sinica/Stateful-CNN
that referenced
this pull request
Nov 17, 2020
> Schema change to support dynamic shapes in ORT > Squeeze-> 'axes' attribute to input Ref: onnx/onnx#2955
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the schema of the following ops:
ReduceSum -> 'axes' attribute to input
Squeeze-> 'axes' attribute to input
Unsqueeze-> 'axes' attribute to input
Split -> 'split' attribute to input
It also modifies the function body of ops SoftmaxCrossEntropyLoss and NegativeLogLikelihoodLoss where they use the above ops with a modified schema.
The changes also include adding adapters for opset version conversion of these ops from 12->13 and 13->12.
This includes required changes to existing and new tests.