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

[Relay][heterogeneous] Fix tuple annotation #3311

Merged
merged 3 commits into from
Jun 10, 2019

Conversation

zhiics
Copy link
Member

@zhiics zhiics commented Jun 7, 2019

This PR fixes the annotation on tuple nodes. The device type of TupleGetItem should be the same to the associated Tuple.

For example,

fn (%x: Tensor[(3, 3, 4), float32]) {
  %0 = split(%x, indices_or_sections=int64(3))
  %1 = on_device(%0, meta[relay.attrs.OnDeviceAttrs][0])
  %2 = %1.0
  %3 = %1.1
  subtract(%2, %3)
}

should return after rewrite_annotated_ops

fn (%x: Tensor[(3, 3, 4), float32]) {
  %0 = split(%x, indices_or_sections=int64(3))
  %1 = %0.0
  %2 = device_copy(%1, meta[relay.attrs.DeviceCopyAttrs][0])
  %3 = %0.1
  %4 = device_copy(%3, meta[relay.attrs.DeviceCopyAttrs][1])
  subtract(%2, %4)
}

cc @jroesch @yzhliu @imorinaga @jwfromm

@yzhliu yzhliu merged commit 3294d72 into apache:master Jun 10, 2019
@yzhliu
Copy link
Member

yzhliu commented Jun 10, 2019

Thanks!

@zhiics zhiics deleted the hetero_get_elem branch June 11, 2019 01:08
wweic pushed a commit to wweic/tvm that referenced this pull request Jun 26, 2019
* [Relay][heterogeneous] Fix TupleGetItem

* retrigger ci

* retrigger ci
wweic pushed a commit to neo-ai/tvm that referenced this pull request Jun 27, 2019
* [Relay][heterogeneous] Fix TupleGetItem

* retrigger ci

* retrigger ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants