forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Relay] Allow Primitive functions to carry virtual device annotations…
… in PlanDevices (apache#12095) * [Relay] Allow Primitive function to carry virtual device annotations in PlanDevices Previously Primitive=1 functions not analyzed and calls to such were completely unconstrained. With this change at least any virtual device annotation on the function are respected and accounted for in calls, even though the body is not analyzed. This may help with piggy-backing on PlanDevices for doing memory scope analysis, since it is now possible to express cross-scope functions on Primitive functions. However I believe there are other issues to deal with in addition to this one. * - comments * - also canonicalize targets When including virtual device annotations in test relay programs the annotation will typically use a target which was used as an input to the make_compilation_config helper, but due to various canonicalization make not be pointer equal to the final structurally equal target which ends up inside the constructed CompilationConfig. However VirtualDevices use pointer equality when comparing their target field. So make sure the notion of CanonicalVirtualDevice also accounts for canonical targets. * - update unit test to reflect the Ardreno example * - trivial cleanup
- Loading branch information
1 parent
0c59647
commit 941f609
Showing
8 changed files
with
168 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters