Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Check that virtual device is unchanged in WithFields #9826

Merged
merged 17 commits into from
Jan 12, 2022

Conversation

electriclilies
Copy link
Contributor

@electriclilies electriclilies commented Jan 4, 2022

Right now, WithFields doesn't check that the virtual device is unchanged, which is incorrect-- this was either a bug or due to a bad merge. I also set the default value of virtual_device_ to FullyUnconstrainedThis change fixes the problem.

NOTE: To make sure that virtual_device_ is propagated across the python boundary, I had to visit the field in VisitAttrs. This changes the serialization of the relay expressions.

@mbs-octoml @mikepapadim

Copy link
Contributor

@mikepapadim mikepapadim left a comment

Choose a reason for hiding this comment

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

LGTM, just check the CI

@electriclilies
Copy link
Contributor Author

I also visit the virtual device in the TVMAttrVisitor to ensure that the virtual device is properly copied across the FFI boundary.

@electriclilies electriclilies force-pushed the with-fields-virtual-device-bug branch from 84510b3 to dd19645 Compare January 8, 2022 01:47
@electriclilies
Copy link
Contributor Author

Rebased with #9874

@masahi masahi merged commit 44fe7ef into apache:main Jan 12, 2022
@electriclilies
Copy link
Contributor Author

Thanks @masahi!

@electriclilies electriclilies deleted the with-fields-virtual-device-bug branch January 12, 2022 02:57
Raghav-Chakravarthy pushed a commit to Raghav-Chakravarthy/tvm that referenced this pull request Jan 28, 2022
…#9826)

* Add default to serialization

* revert changes in serialization.cc

* update 0.6 converter

* json updater working, except for cycles

* clean up code

* Fix tests

* formatting

* format
:

* Check that virtual id is unchanged in WithFields

* Set virtual_device_ to fully unconstrained in ctor

* visit virtual device in the attr visitor

Fix serialization tests

* Fix tests after bad merge

* Change virtual_device() getter method

* lint

* ci failed

* ci was broken
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
…#9826)

* Add default to serialization

* revert changes in serialization.cc

* update 0.6 converter

* json updater working, except for cycles

* clean up code

* Fix tests

* formatting

* format
:

* Check that virtual id is unchanged in WithFields

* Set virtual_device_ to fully unconstrained in ctor

* visit virtual device in the attr visitor

Fix serialization tests

* Fix tests after bad merge

* Change virtual_device() getter method

* lint

* ci failed

* ci was broken
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