Skip to content

Remove allowconsumed enforceconsumed from op schema.#617

Merged
linkerzhang merged 25 commits intoonnx:masterfrom
linkerzhang:kezhan/remove_memory_op_from_opschema
Mar 25, 2018
Merged

Remove allowconsumed enforceconsumed from op schema.#617
linkerzhang merged 25 commits intoonnx:masterfrom
linkerzhang:kezhan/remove_memory_op_from_opschema

Conversation

@linkerzhang
Copy link
Copy Markdown
Member

This is for issue #595 .

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1599 failed (commit 8a7ef0391e by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1600 completed (commit 26926f53d5 by @linkerzhang)

Copy link
Copy Markdown
Contributor

@gramalingam gramalingam left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bddppq
Copy link
Copy Markdown
Contributor

bddppq commented Mar 15, 2018

Here also needs to be removed:
https://github.com/linkerzhang/onnx/blob/e0ffbea9d46007ea75cba1371c03a5715207d9f1/onnx/defs/schema.cc#L161

@bddppq
Copy link
Copy Markdown
Contributor

bddppq commented Mar 15, 2018

@houseroad Models in model zoo have consumed_inputs attributes

@linkerzhang
Copy link
Copy Markdown
Member Author

@bddppq Thank you for the comments! Removed the piece of codes. As you said, models in model zoo are using the consumed_inputs attribute, which is being broken.

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1611 failed (commit 24a976b4e1 by @linkerzhang)

@houseroad
Copy link
Copy Markdown
Member

Let's fix the model zoo first, will do it soon :-)

Tracking here: onnx/models#26

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1645 failed (commit d5a672d5a3 by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1722 failed (commit 4cf895eab8 by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1725 failed (commit b51a82736d by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1801 failed (commit 56580e86b2 by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1813 failed (commit ffbc03ae1b by @linkerzhang)

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1820 completed (commit e591e2ef08 by @linkerzhang)

@linkerzhang
Copy link
Copy Markdown
Member Author

onnx-fb-universe error:
E AssertionError: 'ir_version: 2\nproducer_name: "pytorch"\nproducer_version: "0.3"\ngraph {\n no [truncated]... != 'ir_version: 3\nproducer_name: "pytorch"\nproducer_version: "0.3"\ngraph {\n no [truncated]...
00:43:49 E - ir_version: 2
00:43:49 E ? ^
00:43:49 E + ir_version: 3
00:43:49 E ?

@houseroad I think the error is not related with this change, right?

@bddppq
Copy link
Copy Markdown
Contributor

bddppq commented Mar 24, 2018

@onnxbot retest this please

Comment thread onnx/defs/schema.h Outdated
// operator schema on specific domain. Update the lowest version when it's
// determined to remove too old version history.
map_[ONNX_DOMAIN] = std::make_pair(1, 6);
map_[ONNX_DOMAIN] = std::make_pair(1, 7);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It has been bumped from 5 to 6 for this purpose 5f69c37

Comment thread onnx/defs/schema.h Outdated
// operator schema on specific domain. Update the lowest version when it's
// determined to remove too old version history.
map_[ONNX_DOMAIN] = std::make_pair(1, 6);
map_[ONNX_DOMAIN] = std::make_pair(1, 7);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wait, as we discussed, we just keep using 6 right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

technically, it's risky to reuse 6. as in the time in-between, there could be models using the other operators with consumed_input with version 6. :) I'm changing to use version 6 though.

Comment thread onnx/defs/math/defs.cc Outdated

ONNX_OPERATOR_SCHEMA(PRelu)
.AllowConsumed({{0, 0}})
.SinceVersion(7)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As we discussed, this should be .SinceVersion(6), (because in my previous PR, we already bump up the opset version, no need to do it again, otherwise, I have to prepare opset_7 model zoos, which does not exist yet... why our test case does not fail on this?

Copy link
Copy Markdown
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

We should still use 6 instead of 7, since the last opset version bumping is also due to consumed_inputs.

@AppVeyorBot
Copy link
Copy Markdown

Build onnx 0.3.1846 completed (commit 627c8f2451 by @linkerzhang)

@linkerzhang
Copy link
Copy Markdown
Member Author

Thank you very much @bddppq and @houseroad a lot for reviewing the PR and helping on make it happen. All comments are resolved and I'm merging it. Let me know if there're more comments please.

@linkerzhang linkerzhang merged commit f4acf28 into onnx:master Mar 25, 2018
Ac2zoom pushed a commit to Ac2zoom/onnx that referenced this pull request Jun 21, 2018
* Remove allowconsumed enforceconsumed from op schema.

* update the binding part.

* remove consumed attributes logic.

* add consumed_input attribute in old.cc to simulate the API allowconsumed

* fix build break.

* simulate allowconsumed and enforceconsumed with attr api.

* use vesion 6 instead of 7.
jcwchen pushed a commit to jcwchen/onnx that referenced this pull request Sep 23, 2020
* Remove allowconsumed enforceconsumed from op schema.

* update the binding part.

* remove consumed attributes logic.

* add consumed_input attribute in old.cc to simulate the API allowconsumed

* fix build break.

* simulate allowconsumed and enforceconsumed with attr api.

* use vesion 6 instead of 7.
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.

5 participants