[REFACTOR][DTYPE] Isolate dtype to runtime (#4560)
authorTianqi Chen <tqchen@users.noreply.github.com>
Sun, 22 Dec 2019 02:26:21 +0000 (18:26 -0800)
committerGitHub <noreply@github.com>
Sun, 22 Dec 2019 02:26:21 +0000 (18:26 -0800)
commit7fa8aab563cca45797f4a694c1dfc06186549630
treedaa9a79d733e19e049ff5ce60a04789dbeaca5b6
parentad81796210e34aba8c614518c380a5d4a76a683b
[REFACTOR][DTYPE] Isolate dtype to runtime (#4560)

dtype.h -> runtime/data_type.h

Changes:
- Rename all old reference of tvm::Type to DataType
- ExprNode.type -> ExprNode.dtype
- Expr.type() -> Expr.dtype()
- Change Expr related functions to expr_operator.
  - DataType::min() -> min_value(DataType)
  - DataType::max() -> max_value(DataType)
- Move type constructor Int, UInt, Float, Handle, Bool into DataType.
  - Int(bits) -> DataType::Int(bits)
  - UInt(bits) -> DataType::UInt(bits)
203 files changed:
include/tvm/attrs.h
include/tvm/buffer.h
include/tvm/channel.h
include/tvm/expr.h
include/tvm/expr_operator.h
include/tvm/ir.h
include/tvm/node/reflection.h
include/tvm/operation.h
include/tvm/packed_func_ext.h
include/tvm/relay/attrs/memory.h
include/tvm/relay/base.h
include/tvm/runtime/data_type.h [moved from include/tvm/dtype.h with 57% similarity]
include/tvm/runtime/packed_func.h
include/tvm/tensor.h
nnvm/include/nnvm/compiler/util.h
nnvm/src/compiler/alter_op_layout.cc
nnvm/src/compiler/compile_engine.cc
nnvm/src/compiler/compile_engine.h
nnvm/src/compiler/graph_fuse.cc
nnvm/src/compiler/graph_fuse.h
nnvm/src/top/nn/nn.cc
nnvm/src/top/tensor/elemwise.cc
nnvm/src/top/tensor/transform.cc
src/api/api_ir.cc
src/api/api_lang.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/ir_mutator_with_analyzer.cc
src/arithmetic/pattern_match.h
src/arithmetic/rewrite_simplify.cc
src/autotvm/touch_extractor.cc
src/autotvm/touch_extractor.h
src/codegen/build_common.h
src/codegen/build_module.cc
src/codegen/codegen_c.cc
src/codegen/codegen_c.h
src/codegen/codegen_c_host.cc
src/codegen/codegen_c_host.h
src/codegen/codegen_cuda.cc
src/codegen/codegen_cuda.h
src/codegen/codegen_metal.cc
src/codegen/codegen_metal.h
src/codegen/codegen_opencl.cc
src/codegen/codegen_opencl.h
src/codegen/codegen_opengl.cc
src/codegen/codegen_opengl.h
src/codegen/codegen_source_base.cc
src/codegen/codegen_source_base.h
src/codegen/codegen_vhls.cc
src/codegen/codegen_vhls.h
src/codegen/intrin_rule.cc
src/codegen/intrin_rule.h
src/codegen/intrin_rule_cuda.cc
src/codegen/intrin_rule_opencl.cc
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/codegen_nvptx.cc
src/codegen/llvm/codegen_x86_64.cc
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/spirv/ir_builder.cc
src/codegen/spirv/ir_builder.h
src/codegen/stackvm/codegen_stackvm.cc
src/codegen/stackvm/codegen_stackvm.h
src/contrib/hybrid/codegen_hybrid.cc
src/contrib/hybrid/codegen_hybrid.h
src/lang/attrs.cc
src/lang/buffer.cc
src/lang/channel.cc
src/lang/expr.cc
src/lang/expr_operator.cc
src/lang/ir.cc
src/lang/tensor.cc
src/node/reflection.cc
src/node/serialization.cc
src/op/compute_op.cc
src/op/cross_thread_reduction.cc
src/op/extern_op.cc
src/op/hybrid_op.cc
src/op/op_util.cc
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/bound_checker.cc
src/pass/combine_context_call.cc
src/pass/coproc_sync.cc
src/pass/detect_device.cc
src/pass/inject_copy_intrin.cc
src/pass/inject_double_buffer.cc
src/pass/inject_virtual_thread.cc
src/pass/ir_deep_compare.cc
src/pass/ir_mutator.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/narrow_channel_access.cc
src/pass/rewrite_unsafe_select.cc
src/pass/split_host_device.cc
src/pass/split_pipeline.cc
src/pass/ssa.cc
src/pass/storage_access.cc
src/pass/storage_access.h
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/relay/backend/build_module.cc
src/relay/backend/compile_engine.cc
src/relay/backend/interpreter.cc
src/relay/backend/utils.h
src/relay/backend/vm/compiler.cc
src/relay/ir/doc.cc
src/relay/ir/doc.h
src/relay/ir/expr.cc
src/relay/ir/pretty_printer.cc
src/relay/ir/type.cc
src/relay/op/memory/memory.cc
src/relay/op/nn/nn.cc
src/relay/op/nn/pad.cc
src/relay/op/nn/upsampling.cc
src/relay/op/tensor/reduce.cc
src/relay/op/tensor/transform.cc
src/relay/op/type_relations.cc
src/relay/op/vision/multibox_op.cc
src/relay/op/vision/nms.cc
src/relay/pass/combine_parallel_conv2d.cc
src/relay/pass/fold_constant.cc
src/relay/pass/fuse_ops.cc
src/relay/pass/partial_eval.cc
src/relay/pass/pattern_util.h
src/relay/pass/quantize/calibrate.cc
src/relay/pass/quantize/quantize.cc
src/relay/pass/quantize/quantize.h
src/relay/pass/quantize/realize.cc
src/relay/pass/simplify_inference.cc
src/relay/pass/type_infer.cc
src/relay/qnn/op/add.cc
src/relay/qnn/op/convolution.cc
src/relay/qnn/op/dense.cc
src/relay/qnn/op/dequantize.cc
src/relay/qnn/op/mul.cc
src/relay/qnn/op/quantize.cc
src/relay/qnn/op/requantize.cc
src/relay/qnn/util.cc
src/relay/qnn/util.h
src/runtime/contrib/tflite/tflite_runtime.cc
src/schedule/graph.cc
src/schedule/message_passing.cc
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/ir_mutator_test.cc
tests/cpp/packed_func_test.cc
tests/cpp/pattern_match_test.cc
tests/cpp/relay_build_module_test.cc
tests/cpp/relay_pass_type_infer_test.cc
tests/cpp/relay_transform_sequential.cc
tests/cpp/simple_passes_test.cc
tests/cpp/tensor_test.cc
tests/cpp/topi_ewise_test.cc
topi/include/topi/broadcast.h
topi/include/topi/cuda/dense.h
topi/include/topi/detail/broadcast.h
topi/include/topi/detail/extern.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/dense.h
topi/include/topi/nn/dilate.h
topi/include/topi/nn/pooling.h
topi/include/topi/reduction.h
topi/include/topi/rocm/dense.h
topi/include/topi/transform.h
topi/src/topi.cc