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

[RFC] Build and Evolve Low-level IR (HalideIR) Internally #3474

Closed
2 tasks done
tqchen opened this issue Jul 2, 2019 · 3 comments
Closed
2 tasks done

[RFC] Build and Evolve Low-level IR (HalideIR) Internally #3474

tqchen opened this issue Jul 2, 2019 · 3 comments

Comments

@tqchen
Copy link
Member

tqchen commented Jul 2, 2019

TVM uses HalideIR as its low-level IR structure, which has served us well. One of the main gains we get is the integer simplification infrastructure provided by HalideIR. As the project moves forward, we start to introduce our own integer simplification infra to tackle new problems. As of now, we start to rely on the new integer analysis infra in TVM.

We also see increasing needs to evolve our own version of low-level IRs.

Brief summary of needs:

  • Introducing new IR nodes to enhance the analysis required by TVM (Reduce, ConstraintHints)
  • Different dialect and intrinsics support, mainly in the case of pragma, and region annotations, both of which will make the IR more coupled with the project.
    • Examples include dma_copy regions, thread bindings, and bound hints.
  • Unification of the object protocol with the rest of the project, in particular, runtime::Object, Node, and NDArray.
  • General refactoring concerns to reduce duplicated objects(Var, Range)
  • Unified text format that allows roundtripping
  • Long term: unification of IR infra, in particular between low-level IR and high-level IRs(relay).

These technical needs will require us to evolve the IR more frequently, and it starts to make sense to build and evolve our own version of low-level IR.

Action Items

  • Create include/tvm/node to introduce the node infra
    • As we start to unify node with objects, we might consider moving certain things to runtime.
  • Create include/tvm/ir.h to add support for the IR nodes.
    • Add clear acknowledgment to the original design (Halide).
  • Start to evolve new IRs, refactoring and remove duplicated objects and further changes as mentioned above.

Please share your thoughts and suggestions about the proposal

@tqchen tqchen changed the title [RFC] Build and Evolve Internal Low-level IR (HalideIR) [RFC] Build and Evolve internal Low-level IR (HalideIR) Jul 2, 2019
@tqchen tqchen changed the title [RFC] Build and Evolve internal Low-level IR (HalideIR) [RFC] Build and Evolve Low-level IR (HalideIR) Internally Jul 2, 2019
@yzhliu
Copy link
Member

yzhliu commented Jul 3, 2019

include/tvm/include is to replace HalideIR/src/tvm/node and
include/tvm/ir is to replace HalideIR/src/ir
is it true?

@tqchen
Copy link
Member Author

tqchen commented Jul 3, 2019

Yes

@tqchen
Copy link
Member Author

tqchen commented Jul 11, 2019

#3533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants