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

@junrushaojunrushao 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.

@tqchentqchen self-assigned this Sep 2, 2020
@tqchentqchen 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
MemberAuthor

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

@junrushaojunrushao changed the title [Target] Unified Target Creation[Target] Unified Target Creation: Tags, Composite Target and Unified InterfaceSep 6, 2020
@junrushaojunrushao changed the title [Target] Unified Target Creation: Tags, Composite Target and Unified Interface[Target] Target Tags, Composite Target and Unified InterfaceSep 6, 2020
Comment threadinclude/tvm/target/target_kind.h
Comment threadpython/tvm/target/target_tag.py
Comment threadpython/tvm/target/target_tag.py Outdated
Comment threadpython/tvm/target/target_tag.py
@junrushao

Copy link
Copy Markdown
MemberAuthor

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

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

Comment threadpython/tvm/relay/backend/graph_runtime_codegen.py
Comment threadpython/tvm/target/tag.py Outdated
Comment threadpython/tvm/target/tag.py Outdated
Comment threadpython/tvm/target/target.py Outdated
Comment threadpython/tvm/target/target.py
Comment threadsrc/target/target.cc
Comment threadsrc/target/target_kind.cc
Comment threadsrc/target/target_kind.cc
Comment threadinclude/tvm/target/tag.h
Comment threadinclude/tvm/target/tag.h

@comaniaccomaniac 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 threadinclude/tvm/target/target.h Outdated
Comment threadpython/tvm/target/tag.py Outdated
Comment threadpython/tvm/target/tag.py
Comment threadpython/tvm/target/tag.py
Comment threadpython/tvm/target/tag.py
Comment threadpython/tvm/target/target.py Outdated
Comment threadpython/tvm/target/tag.py
@junrushao

Copy link
Copy Markdown
MemberAuthor

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

@comaniaccomaniac 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

Copy link
Copy Markdown
Member

@junrushao1994 please rebase and resolve the conflicts

@junrushaojunrushao mentioned this pull request Sep 9, 2020
@junrushao

Copy link
Copy Markdown
MemberAuthor

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
MemberAuthor

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

@tqchentqchen 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:masterSep 10, 2020
@tqchen

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 freeto 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

@junrushao@tqchen@comaniac