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

[TVMC] Only load extra targets when there are workspace pools #12253

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented Aug 1, 2022

After #11427, tvmc compile wouldn't work for external codegens that don't have a Target registered by TVM_REGISTER_TARGET_KIND. This results in the error:

ValueError: Target kind <codegen> is not defined. Target creation from string failed: <target-string>

Such external codegens can be expected to have no workspace pools and may not always have a target associated as their implementation predates this mechanism. While it is likely a Target is specified for all external codegens in the future, we should still support external codegens without an associated Target until this is enforced.

cc @Mousius @areusch @dchauhan-arm @gromero @leandron

After apache#11427, `tvmc compile` wouldn't work for external codegens that
don't have a `Target` registered by `TVM_REGISTER_TARGET_KIND`. Such
external codegens can be expected to have no workspace pools and may not
always have a target associated as their implementation predates this
mechanism. While it is likely a `Target` is specified for all external
codegens in the future, we should still support external codegens
without an associated `Target` until this is enforced.

Change-Id: Ida8bf85ed1cafd301b9465641c66a5370d73c429
Copy link
Member

@Mousius Mousius left a comment

Choose a reason for hiding this comment

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

Can we get a test case to ensure we don't regress this in future?

@lhutton1
Copy link
Contributor Author

lhutton1 commented Aug 1, 2022

sure, just added one

@github-actions github-actions bot requested a review from gromero August 1, 2022 12:30
Co-authored-by: Chris Sidebottom <[email protected]>
Change-Id: I6a6bc9a023afd5a62a3c932dbc3ad535815b3963
Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

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

LGTM, @Mousius can you have another look?

@Mousius Mousius merged commit 759a648 into apache:main Aug 2, 2022
@lhutton1 lhutton1 deleted the fix-tvmc-compile branch August 3, 2022 22:21
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…#12253)

After apache#11427, `tvmc compile` wouldn't work for external codegens that
don't have a `Target` registered by `TVM_REGISTER_TARGET_KIND`. Such
external codegens can be expected to have no workspace pools and may not
always have a target associated as their implementation predates this
mechanism. While it is likely a `Target` is specified for all external
codegens in the future, we should still support external codegens
without an associated `Target` until this is enforced.

Co-authored-by: Chris Sidebottom <[email protected]>
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