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

[Target] Fix device mask issue and typos #9768

Merged
merged 2 commits into from
Dec 23, 2021
Merged

[Target] Fix device mask issue and typos #9768

merged 2 commits into from
Dec 23, 2021

Conversation

leeexyz
Copy link
Contributor

@leeexyz leeexyz commented Dec 17, 2021

Hi Community,

Currently, I am working on the Heterogeneous Execution by using Composite Target. I found it is not included in the Device.STR2MASK map and will be failed when compiling with it. So, I added it back and checked all the other targets. Not surprisingly, there are some other issues. Now, I add a Consistency verification case to help us check it. :)

In addition to these, I still have some doubts.

  1. Since introducing the new Target System, the device type is saved in each Target (tvm.target.Target.kind). It seems that some attributes of the Device in runtime_ctypes.py are redundant, such as MASK2STR and STR2MASK. Then the issue raised here is the same or equaled features located in different locations make things messy. I think we can refactor the Runtime Device.
  2. It seems that the devices of Composite Target cannot be optimized or even recognized by all relay passes. Ideally, the Partition Pass can perform the partitioning and annotation automatically based on those devices (order does matter), and then select the best op strategy. So my question is: What is the current status for Composite Target and is anyone working on it?

Any help would be much appreciated. :)

@leeexyz leeexyz force-pushed the main branch 2 times, most recently from 09e1f9d to 8683a6a Compare December 18, 2021 08:57
@@ -217,13 +216,15 @@ class Device(ctypes.Structure):
"stackvm": 1,
"cpu": 1,
"c": 1,
"hybrid": 1,
Copy link
Member

Choose a reason for hiding this comment

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

what is hybrid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@masahi there is a legacy thing called TE hybrid script. Probably it’s related?

@masahi
Copy link
Member

masahi commented Dec 19, 2021

cc @zxybazh @junrushao1994

@leeexyz leeexyz requested a review from masahi December 23, 2021 13:52
@masahi masahi merged commit 4af2a66 into apache:main Dec 23, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* [Target] Fix device mask issue and typos

* Skip target hook
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [Target] Fix device mask issue and typos

* Skip target hook
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.

3 participants