Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

onnx broadcast ops fixes #13604

Merged
merged 5 commits into from
Feb 21, 2019
Merged

Conversation

Roshrini
Copy link
Member

@Roshrini Roshrini commented Dec 10, 2018

Description

Fixes #13138

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@Roshrini Roshrini requested a review from szha as a code owner December 10, 2018 23:29
@roywei
Copy link
Member

roywei commented Dec 12, 2018

@mxnet-label-bot add[ONNX, pr-awaiting-review]

@marcoabreu marcoabreu added ONNX pr-awaiting-review PR is waiting for code review labels Dec 12, 2018
@roywei
Copy link
Member

roywei commented Dec 12, 2018

@Roshrini Thanks for the contribution, seems one of the onnx unit test failed.
@vandanavk for review

Copy link
Contributor

@sandeep-krishnamurthy sandeep-krishnamurthy left a comment

Choose a reason for hiding this comment

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

Thanks,
Can we please add test case for invoking this path of broadcast operation.

python/mxnet/contrib/onnx/onnx2mx/_op_translations.py Outdated Show resolved Hide resolved
@stu1130
Copy link
Contributor

stu1130 commented Jan 16, 2019

@Roshrini could you address the comment? Thanks!

@sandeep-krishnamurthy sandeep-krishnamurthy added the pr-work-in-progress PR is still work in progress label Jan 28, 2019
@Roshrini Roshrini force-pushed the broadcast-fixes branch 2 times, most recently from 47b059d to e6e74ee Compare February 18, 2019 18:44
@Roshrini Roshrini changed the title [WIP] onnx broadcast ops fixes onnx broadcast ops fixes Feb 18, 2019
@Roshrini Roshrini removed the pr-work-in-progress PR is still work in progress label Feb 18, 2019
@Roshrini
Copy link
Member Author

Roshrini commented Feb 18, 2019

@sandeep-krishnamurthy This path of broadcast ops is used by multiple models which are already tested in CI like inception, etc. Addressed comments. Can you take a look again? Thanks!

Copy link
Contributor

@vandanavk vandanavk left a comment

Choose a reason for hiding this comment

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

LGTM

if inputs[0].name.startswith(op_name):
op_value = _fix_broadcast(current_op_name, inputs, broadcast_axis, proto_obj)
return op_value, new_attr, inputs
return current_op_name, new_attr, inputs
Copy link
Contributor

Choose a reason for hiding this comment

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

So we are losing info about attrs here? We always return empty from this function. Sorry couldn't understand this logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

onnx attrs can have "broadcast/consumed_inputs" as input according to old onnx opset.. If broadcast is mentioned, we check that in line 253. But MXNet doesnt have these inputs.. broadcast ops in mxnet have empty attr. So by default passing empty.

Copy link
Contributor

@sandeep-krishnamurthy sandeep-krishnamurthy left a comment

Choose a reason for hiding this comment

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

Thanks

@sandeep-krishnamurthy sandeep-krishnamurthy merged commit 0398a7e into apache:master Feb 21, 2019
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
jessr92 pushed a commit to jessr92/incubator-mxnet that referenced this pull request Feb 28, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
drivanov pushed a commit to drivanov/incubator-mxnet that referenced this pull request Mar 4, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* broadcasting fixes

* fix

* addressing comments

* fix

* fix
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ONNX pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MXNet crashes while trying load ONNX model
6 participants