Skip to content

[Target] Target Tags, Composite Target and Unified Interface - #6369

Merged
tqchen merged 1 commit into
apache:masterfrom
junrushao:feature/2020-08-31/unified-target-creation
Sep 10, 2020
Merged

[Target] Target Tags, Composite Target and Unified Interface#6369
tqchen merged 1 commit into
apache:masterfrom
junrushao:feature/2020-08-31/unified-target-creation

Conversation

@junrushao

@junrushao junrushao commented Sep 1, 2020

Copy link
Copy Markdown
Member
  • Add set_attr_preprocessor to TargetKind registry, which is used to pre-process attribute maps. For exmaple, add mtriple automatically.
  • Use set_attr_preprocessor for NVPTX and ROCm backend.
  • Add TargetTag registration and retrieval on C++ side and python side. Allow creation of Target using the tag name.
  • Unify target creation on C++ side, replace Target::Create and Target::FromConfig with the constructor.
  • Unify target creation on python side, deprecate tvm.target.create and encourage direct use of the constructor of tvm.target.Target instead.
  • Add initial support for composite target.

@tqchen tqchen self-assigned this Sep 2, 2020
@tqchen tqchen added the status: need update need update based on feedbacks label Sep 2, 2020
@junrushao
junrushao marked this pull request as ready for review September 6, 2020 02:37
@junrushao

Copy link
Copy Markdown
Member Author

@comaniac @tqchen @jwfromm The PR is ready for review :-)

@junrushao junrushao changed the title [Target] Unified Target Creation [Target] Unified Target Creation: Tags, Composite Target and Unified Interface Sep 6, 2020
@junrushao junrushao changed the title [Target] Unified Target Creation: Tags, Composite Target and Unified Interface [Target] Target Tags, Composite Target and Unified Interface Sep 6, 2020
Comment thread include/tvm/target/target_kind.h
Comment thread python/tvm/target/target_tag.py
Comment thread python/tvm/target/target_tag.py Outdated
Comment thread python/tvm/target/target_tag.py
@junrushao

Copy link
Copy Markdown
Member Author

@tqchen Comments are addressed. Would you like to take another look?

@comaniac Would you love to take a look as well? Thanks!

Comment thread python/tvm/relay/backend/graph_runtime_codegen.py
Comment thread python/tvm/target/tag.py Outdated
Comment thread python/tvm/target/tag.py Outdated
Comment thread python/tvm/target/target.py Outdated
Comment thread python/tvm/target/target.py
Comment thread src/target/target.cc
Comment thread src/target/target_kind.cc
Comment thread src/target/target_kind.cc
Comment thread include/tvm/target/tag.h
Comment thread include/tvm/target/tag.h

@comaniac comaniac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Last bunch of comments.

Comment thread include/tvm/target/target.h Outdated
Comment thread python/tvm/target/tag.py Outdated
Comment thread python/tvm/target/tag.py
Comment thread python/tvm/target/tag.py
Comment thread python/tvm/target/tag.py
Comment thread python/tvm/target/target.py Outdated
Comment thread python/tvm/target/tag.py
@junrushao
junrushao requested a review from tqchen September 9, 2020 18:41
@junrushao

Copy link
Copy Markdown
Member Author

@tqchen @comaniac Would you like to take another look? Thanks!

@comaniac comaniac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

@tqchen

tqchen commented Sep 9, 2020

Copy link
Copy Markdown
Member

@junrushao1994 please rebase and resolve the conflicts

@junrushao

Copy link
Copy Markdown
Member Author

Blocked by the windows built. Hot fix is here: #6434

* Add `set_attr_preprocessor` to TargetKind registry, which is used to pre-process attribute maps.
* Use `set_attr_preprocessor` for NVPTX and ROCm backend to check and add mcpu and mtriple.
* Add TargetTag registration and retrieval on C++ side and python side. Allow creation of Target using the tag name.
* Unify target creation on C++ side, replace Target::Create and Target::FromConfig with the constructor.
* Unify target creation on python side, deprecate tvm.target.create and encourage direct use of the constructor of tvm.target.Target instead.
* Add initial support for composite target.
@junrushao

Copy link
Copy Markdown
Member Author

@tqchen CI is green. Would you like to take another look? Thanks!

@tqchen tqchen added status: accepted and removed status: need review status: need update need update based on feedbacks labels Sep 10, 2020
@tqchen
tqchen merged commit 6b6661e into apache:master Sep 10, 2020
@tqchen

tqchen commented Sep 10, 2020

Copy link
Copy Markdown
Member

Thanks @junrushao1994 @comaniac

kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 17, 2020
* Add `set_attr_preprocessor` to TargetKind registry, which is used to pre-process attribute maps.
* Use `set_attr_preprocessor` for NVPTX and ROCm backend to check and add mcpu and mtriple.
* Add TargetTag registration and retrieval on C++ side and python side. Allow creation of Target using the tag name.
* Unify target creation on C++ side, replace Target::Create and Target::FromConfig with the constructor.
* Unify target creation on python side, deprecate tvm.target.create and encourage direct use of the constructor of tvm.target.Target instead.
* Add initial support for composite target.
kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 18, 2020
* Add `set_attr_preprocessor` to TargetKind registry, which is used to pre-process attribute maps.
* Use `set_attr_preprocessor` for NVPTX and ROCm backend to check and add mcpu and mtriple.
* Add TargetTag registration and retrieval on C++ side and python side. Allow creation of Target using the tag name.
* Unify target creation on C++ side, replace Target::Create and Target::FromConfig with the constructor.
* Unify target creation on python side, deprecate tvm.target.create and encourage direct use of the constructor of tvm.target.Target instead.
* Add initial support for composite target.
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 18, 2020
* Add `set_attr_preprocessor` to TargetKind registry, which is used to pre-process attribute maps.
* Use `set_attr_preprocessor` for NVPTX and ROCm backend to check and add mcpu and mtriple.
* Add TargetTag registration and retrieval on C++ side and python side. Allow creation of Target using the tag name.
* Unify target creation on C++ side, replace Target::Create and Target::FromConfig with the constructor.
* Unify target creation on python side, deprecate tvm.target.create and encourage direct use of the constructor of tvm.target.Target instead.
* Add initial support for composite target.
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.

3 participants