Skip to content

Commit

Permalink
[TRANSFORM] Fix virtual device anaotation issue with BYOC subgraphs
Browse files Browse the repository at this point in the history
Heterogeneous module partitioned by BYOC has functions nodes without any VirtualDevice
definition (having FullyUnconstrained device). Ignoring the device here causes
expr_virtual_devices_ being empty when PopVirtualDevice is called assuming above PushVirtualDevice
is succeeded. PushVirtualDevice and PopVirtualDevice occurs as pairs across function body,
hence it's better to insert the The Virtual Device for Uncontrained and Pop it subsequently.
  • Loading branch information
Siva Rama Krishna Reddy B committed Nov 8, 2022
1 parent 60e2c98 commit 19a7aaa
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/relay/transforms/device_aware_visitors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ void LexicalOnDeviceMixin::ExitFunctionBody() {
}

void LexicalOnDeviceMixin::PushVirtualDevice(const VirtualDevice& virtual_device) {
if (virtual_device->IsFullyUnconstrained()) {
return;
}
expr_virtual_devices_.emplace_back(virtual_device);
}

Expand Down

0 comments on commit 19a7aaa

Please sign in to comment.