[TIR] Introduce tir::PrimFunc (#5070)
authorTianqi Chen <tqchen@users.noreply.github.com>
Sat, 14 Mar 2020 21:26:23 +0000 (14:26 -0700)
committerGitHub <noreply@github.com>
Sat, 14 Mar 2020 21:26:23 +0000 (14:26 -0700)
commite03164159ce08f2739a26c10531b26713e72153e
tree20bc990fb8a99799f3eb2131097ecddf00f6ee01
parentbe4e9db436a60e90f7c846edc6bec72bc6d84d4f
[TIR] Introduce tir::PrimFunc (#5070)

This PR introduces tir::PrimFunc which will be used as the TIR function
container in the unified IR.

Also streamlined the function attributes a bit further.
- All common attributes are under tvm::attr
- TIR specific attributes are under tvm::tir::attr and comes with a tir prefix
- Use stl_style for attributes for now
17 files changed:
include/tvm/ir/function.h
include/tvm/ir/type.h
include/tvm/relay/function.h
include/tvm/tir/function.h [new file with mode: 0644]
include/tvm/tir/op.h
python/tvm/ir/__init__.py
python/tvm/ir/expr.py
python/tvm/ir/function.py [new file with mode: 0644]
python/tvm/relay/expr.py
python/tvm/tir/__init__.py
python/tvm/tir/function.py [new file with mode: 0644]
src/ir/function.cc
src/printer/relay_text_printer.cc
src/relay/ir/function.cc
src/tir/ir/function.cc [new file with mode: 0644]
src/tir/ir/op.cc
tests/python/unittest/test_tir_nodes.py [moved from tests/python/unittest/test_lang_basic.py with 92% similarity]