[REFACTOR][IR] tvm::Expr -> PrimExpr(Primitive Expr) (#4669)
authorTianqi Chen <tqchen@users.noreply.github.com>
Thu, 9 Jan 2020 23:30:23 +0000 (15:30 -0800)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2020 23:30:23 +0000 (15:30 -0800)
commitd6a23cf50fc5b9ddccfac679927f04b3baa1fe97
treef51a8d20ffa4ff4a874d825b19b061503b980999
parent619c63cbaf6971956df6264a45b9d6dac68ec58d
[REFACTOR][IR] tvm::Expr -> PrimExpr(Primitive Expr) (#4669)

* [REFACTOR][IR] tvm::Expr -> PrimExpr(Primitive Expr)

As part of unified IR, we will need to unify relay::Expr
and the current tvm::Expr under the same base type.

From the techinical point of view. tvm::Expr is a "primitive"
expression that only contains POD types and handles and does
not do life-cycle management.

This PR renames Expr->PrimExpr to clarify that.
We will send a subsequent PR to introduce the base expr class.

* Remove legacy VarExpr and ExprHash/Equal
207 files changed:
include/tvm/arithmetic.h
include/tvm/attrs.h
include/tvm/buffer.h
include/tvm/build_module.h
include/tvm/data_layout.h
include/tvm/expr.h
include/tvm/expr_operator.h
include/tvm/ir.h
include/tvm/ir_functor_ext.h
include/tvm/ir_pass.h
include/tvm/lowered_func.h
include/tvm/operation.h
include/tvm/packed_func_ext.h
include/tvm/relay/attrs/transform.h
include/tvm/relay/base.h
include/tvm/relay/transform.h
include/tvm/runtime/packed_func.h
include/tvm/schedule.h
include/tvm/target_info.h
include/tvm/tensor.h
include/tvm/tensor_intrin.h
python/tvm/api.py
python/tvm/contrib/sparse.py
python/tvm/expr.py
python/tvm/hybrid/calls.py
python/tvm/hybrid/parser.py
python/tvm/schedule.py
python/tvm/tensor.py
python/tvm/tensor_intrin.py
src/api/api_arith.cc
src/api/api_ir.cc
src/api/api_lang.cc
src/api/api_pass.cc
src/api/api_test.cc
src/arithmetic/analyzer.cc
src/arithmetic/bound_deducer.cc
src/arithmetic/canonical_simplify.cc
src/arithmetic/compute_expr.h
src/arithmetic/const_fold.h
src/arithmetic/const_int_bound.cc
src/arithmetic/detect_linear_equation.cc
src/arithmetic/domain_touched.cc
src/arithmetic/int_set.cc
src/arithmetic/int_set.h
src/arithmetic/ir_mutator_with_analyzer.cc
src/arithmetic/ir_mutator_with_analyzer.h
src/arithmetic/ir_visitor_with_analyzer.h
src/arithmetic/modular_set.cc
src/arithmetic/pattern_match.h
src/arithmetic/rewrite_simplify.cc
src/arithmetic/rewrite_simplify.h
src/arithmetic/stmt_simplify.cc
src/autotvm/feature_visitor.cc
src/autotvm/feature_visitor.h
src/autotvm/touch_extractor.cc
src/autotvm/touch_extractor.h
src/codegen/build_module.cc
src/codegen/codegen_c.cc
src/codegen/codegen_c.h
src/codegen/codegen_cuda.cc
src/codegen/codegen_cuda.h
src/codegen/codegen_opencl.cc
src/codegen/codegen_opencl.h
src/codegen/codegen_opengl.cc
src/codegen/codegen_opengl.h
src/codegen/codegen_vhls.cc
src/codegen/intrin_rule.cc
src/codegen/intrin_rule.h
src/codegen/llvm/codegen_amdgpu.cc
src/codegen/llvm/codegen_arm.cc
src/codegen/llvm/codegen_cpu.cc
src/codegen/llvm/codegen_cpu.h
src/codegen/llvm/codegen_llvm.cc
src/codegen/llvm/codegen_llvm.h
src/codegen/llvm/intrin_rule_llvm.cc
src/codegen/llvm/intrin_rule_llvm.h
src/codegen/llvm/intrin_rule_nvptx.cc
src/codegen/llvm/intrin_rule_rocm.cc
src/codegen/spirv/codegen_spirv.cc
src/codegen/spirv/codegen_spirv.h
src/codegen/spirv/intrin_rule_spirv.cc
src/codegen/stackvm/codegen_stackvm.cc
src/codegen/stackvm/codegen_stackvm.h
src/contrib/hybrid/codegen_hybrid.h
src/lang/attrs.cc
src/lang/buffer.cc
src/lang/data_layout.cc
src/lang/expr.cc
src/lang/expr_operator.cc
src/lang/ir.cc
src/lang/tensor.cc
src/op/compute_op.cc
src/op/compute_op.h
src/op/cross_thread_reduction.cc
src/op/extern_op.cc
src/op/hybrid_op.cc
src/op/op_util.cc
src/op/op_util.h
src/op/placeholder_op.cc
src/op/scan_op.cc
src/op/tensor_compute_op.cc
src/op/tensorize.cc
src/pass/arg_binder.cc
src/pass/arg_binder.h
src/pass/bound_checker.cc
src/pass/combine_context_call.cc
src/pass/coproc_sync.cc
src/pass/hoist_if_then_else.cc
src/pass/infer_fragment.cc
src/pass/inject_copy_intrin.cc
src/pass/inject_double_buffer.cc
src/pass/inject_prefetch.cc
src/pass/inject_virtual_thread.cc
src/pass/inline.cc
src/pass/ir_deep_compare.cc
src/pass/ir_functor.cc
src/pass/ir_util.h
src/pass/lift_attr_scope.cc
src/pass/loop_partition.cc
src/pass/lower_custom_datatypes.cc
src/pass/lower_intrin.cc
src/pass/lower_thread_allreduce.cc
src/pass/lower_tvm_builtin.cc
src/pass/lower_warp_memory.cc
src/pass/make_api.cc
src/pass/remap_thread_axis.cc
src/pass/remove_no_op.cc
src/pass/rewrite_unsafe_select.cc
src/pass/simple_passes.cc
src/pass/split_host_device.cc
src/pass/ssa.cc
src/pass/storage_access.cc
src/pass/storage_flatten.cc
src/pass/storage_rewrite.cc
src/pass/storage_sync.cc
src/pass/tensor_core.cc
src/pass/unroll_loop.cc
src/pass/vectorize_loop.cc
src/pass/verify_gpu_code.cc
src/pass/verify_memory.cc
src/relay/backend/build_module.cc
src/relay/backend/compile_engine.cc
src/relay/backend/graph_runtime_codegen.cc
src/relay/backend/vm/compiler.cc
src/relay/backend/vm/removed_unused_funcs.cc
src/relay/ir/expr.cc
src/relay/ir/hash.cc
src/relay/ir/op.cc
src/relay/op/nn/bitserial.cc
src/relay/op/nn/nn.cc
src/relay/op/nn/nn.h
src/relay/op/nn/pad.cc
src/relay/op/tensor/transform.cc
src/relay/pass/infer_layout_util.h
src/relay/pass/pass_manager.cc
src/relay/pass/type_solver.cc
src/relay/qnn/op/dequantize.cc
src/relay/qnn/op/quantize.cc
src/relay/qnn/op/requantize.cc
src/relay/qnn/util.h
src/schedule/auto_inline_elem_wise.cc
src/schedule/graph.cc
src/schedule/graph.h
src/schedule/message_passing.cc
src/schedule/message_passing.h
src/schedule/schedule_dataflow_rewrite.cc
src/schedule/schedule_lang.cc
src/schedule/schedule_ops.cc
tests/cpp/attrs_test.cc
tests/cpp/build_module_test.cc
tests/cpp/container_test.cc
tests/cpp/expr_test.cc
tests/cpp/ir_functor_test.cc
tests/cpp/ir_ssa_test.cc
tests/cpp/packed_func_test.cc
tests/cpp/pattern_match_test.cc
tests/cpp/simple_passes_test.cc
tests/python/unittest/test_lang_tensor_overload_op.py
tests/python/unittest/test_pass_lower_intrin.py
topi/include/topi/broadcast.h
topi/include/topi/contrib/cublas.h
topi/include/topi/contrib/rocblas.h
topi/include/topi/cuda/dense.h
topi/include/topi/cuda/reduction.h
topi/include/topi/detail/broadcast.h
topi/include/topi/detail/constant_utils.h
topi/include/topi/detail/extern.h
topi/include/topi/detail/pad_utils.h
topi/include/topi/detail/ravel_unravel.h
topi/include/topi/detail/tensor_utils.h
topi/include/topi/elemwise.h
topi/include/topi/image/resize.h
topi/include/topi/nn.h
topi/include/topi/nn/bnn.h
topi/include/topi/nn/dilate.h
topi/include/topi/nn/flatten.h
topi/include/topi/nn/local_response_norm.h
topi/include/topi/nn/pooling.h
topi/include/topi/nn/softmax.h
topi/include/topi/nn/upsampling.h
topi/include/topi/reduction.h
topi/include/topi/transform.h
topi/include/topi/vision/reorg.h
topi/python/topi/nn/pad.py
topi/python/topi/util.py
topi/src/topi.cc
topi/tests/python/test_topi_broadcast.py