1. 23 Apr, 2020 1 commit
  2. 19 Apr, 2020 1 commit
    • [TIR][REFACTOR] Remove te::Tensor dependencies from TIR passes. (#5372) · c3511c5e
      * [TIR][REFACTOR] Remove te::Tensor dependencies from TIR passes.
      
      te::Tensor is an useful object for tensor expression, but brings
      un-necessary reverse dependency in TIR nodes such as Provide and Realize.
      
      This PR is a first step to remove this dependency. We will use Buffer in all the places
      where the te::Tensor was used. The rough correspondence are:
      
      - Provide -> BufferStore
      - Realize -> BufferRealize
      - HalideCall -> BufferLoad.
      
      After this change, we can not use IRModule of PrimFuncs cleanly to represent TIR
      at any point of the optimizations. Buffer will serve as the abstraction for the TIR data
      models to represent the intermediate storages and their constraints.
      
      We still keep Realize/HalideCall and Provide as TIR nodes for now to make the change minimum.
      Right after ScheduleOps, we call SchedulePostProcToPrimFunc to canonicalize the temporary IR
      generated by TE(which contains these nodes) to the TIR.
      
      The TIR optimizations are now mostly migrated to to the pass manager.
      Followup PRs are needed to migrate the remaining few passes.
      
      * Fix dev tutorial
      Tianqi Chen committed
  3. 20 Mar, 2020 1 commit
    • [TIR][TARGET] Refactor Target codegen to use IRModule and PrimFunc. (#5107) · 841725cc
      As part of the unified IR refactor.
      This PR refactors the target codegen to use IRModule containing tir::PrimFuncs.
      
      In order to break the refactor into several steps without breaking the codebase,
      we built an conversion pass to convert Array<LoweredFunc> into IRModule.
      
      The follow-up refactors will gradually move the passes covered by IRModule up
      until we cover all the passes. Then we can remove the additional redundant
      concepts such as LoweredFunc.
      Tianqi Chen committed
  4. 19 Feb, 2020 1 commit
  5. 21 Jan, 2020 1 commit
  6. 19 Jan, 2020 1 commit
    • [REFACTOR] Establish tir (#4740) · cf59b206
      TIR is the new namespace for low-level IR
      for tensor-level optimizations and loop transformations.
      
      This PR establishes the namespace and files.
      
      - lowered_func.h,buffer.h,data_layout.h -> tir/buffer.h,tir/data_layout.h,tir/lowered_func.h
      - ir.h -> tir/expr.h, tir/stmt.h
      - ir_functor_ext.h -> tir/expr_functor.h, tir/stmt_functor.h
      Tianqi Chen committed
  7. 17 Jan, 2020 1 commit
  8. 16 Jan, 2020 2 commits
  9. 09 Jan, 2020 1 commit
    • [REFACTOR][IR] tvm::Expr -> PrimExpr(Primitive Expr) (#4669) · d6a23cf5
      * [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
      Tianqi Chen committed
  10. 08 Jan, 2020 1 commit
    • [REFACTOR][IR] Add Node suffix to low-level IR nodes (#4649) · f4c5f93b
      * [REFACTOR][IR] Variable -> VarNode
      
      * [REFACTOR][IR] Add/Sub/Mul/Div -> AddNode/SubNode etc.
      
      * [REFACTOR][IR] Min/Max/FloorDiv/FloorMod -> MinNode/MaxNode etc.
      
      * [REFACTOR][IR] EQ/NE/LT/LE/GT/GE/Select -> EQNode/NENode etc.
      
      * [REFACTOR][IR] Add Node suffix to Select/Call/Load/Ramp/Shuffle/Let
      
      * [REFACTOR][IR] Add node suffix to IntImm/UIntImm/FloatImm/StringImm
      
      * [REFACTOR][IR] Add Node suffix to Any, AttrStmt, AssertStmt
      
      * [REFACTOR][IR] Add Node suffix to Store/Provide/Allocate/Free
      
      * [REFACTOR][IR] Add Node suffix to ProducerConsumer
      
      * Fix lint
      
      * style updates, test fixes
      Tianqi Chen committed
  11. 04 Jan, 2020 1 commit
    • [REFACTOR] TVM_REGISTER_API -> TVM_REGISTER_GLOBAL (#4621) · 81523604
      TVM_REGSISTER_API is an alias of TVM_REGISTER_GLOBAL.
      In the spirit of simplify redirections, this PR removes
      the original TVM_REGISTER_API macro and directly use TVM_REGISTER_GLOBAL.
      
      This type of refactor will also simplify the IDE navigation tools
      such as FFI navigator to provide better code reading experiences.
      
      Move EnvFunc's definition to node.
      Tianqi Chen committed
  12. 03 Jan, 2020 1 commit
    • [REFACTOR] Migrate Low-level IR Passes into the New Stmt/Expr Mutator (#4607) · 203ca7a0
      * CombineContextCall
      
      * Migrate BoundChecker
      
      * Migrate CoprocSync
      
      * Migrate detect_device
      
      * Migrate loop_partition
      
      * Migrate infer_fragement
      
      * Migrate inject_copy_intrin
      
      * Migrate inject double buffer
      
      * Migrate lower_intrin and simplify
      
      * Migrate storage flatten
      
      * Migrate inject prefetch
      
      * Migrate inject_virtual_thread
      
      * migrate inline
      
      * Migrate lift attr scope
      
      * Migrate custom datatypes
      
      * migrate lower_thread_all_reduce
      
      * Migrate lower_tvm_builtin
      
      * migrate lower_warp memory
      
      * Migrate make_api.cc
      
      * Migrate remap_thread_axis
      
      * Migrate remove_no_op
      
      * migrate rewrite_unsafe_select
      
      * Migrate skip_assert simple_passes
      
      * Migrate split_host_device
      
      * Migrate ssa
      
      * Migrate storage_access
      
      * Migrate storage_rewrite
      
      * Migrate tensor_core
      
      * Migrate unroll_loop
      
      * Migrate vectorize
      
      * Migrate verify compact_buffer gpu_code
      
      * Migrate verify_memory
      
      * Migrate storage_sync
      
      * Remove unused refs to mutator
      
      * Migrate hybrid_op
      
      * Migrate tensorize
      
      * Migrate schedule ops
      
      * Migrate schedule_dataflow_rewrite
      
      * Migrate auto_inline_elemwise
      
      * Remove unecessary ref to visitor
      
      * remove unecessary ref
      
      * Migrate bound_deducer
      
      * Migrate domain_touched
      
      * Migrate autotvm feature touch extractor
      
      * Add annotations
      Tianqi Chen committed
  13. 22 Dec, 2019 1 commit
    • [REFACTOR][DTYPE] Isolate dtype to runtime (#4560) · 7fa8aab5
      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)
      Tianqi Chen committed
  14. 24 Nov, 2019 1 commit
  15. 08 Apr, 2019 1 commit
    • [HEADER] Add Header to Comply with ASF Release Policy (#2982) · cffb4fba
      * [HEADER] ASF header dir=include
      
      * [HEADER] ASF Header dir=src
      
      * [HEADER] ASF Header -dir=python
      
      * [HEADER] ASF header dir=topi
      
      * [HEADER] ASF Header dir=nnvm
      
      * [HEADER] ASF Header -dir=tutorials
      
      * [HEADER] ASF Header dir=tests
      
      * [HEADER] ASF Header -dir=docker
      
      * fix whitespace
      
      * [HEADER] ASF Header -dir=jvm
      
      * [HEADER] ASF Header -dir=web
      
      * [HEADER] ASF Header --dir=apps
      
      * [HEADER] ASF Header --dir=vta
      
      * [HEADER] ASF Header -dir=go
      
      * temp
      
      * [HEADER] ASF Header --dir=rust
      
      * [HEADER] Add ASF Header --dir=cmake
      
      * [HEADER] ASF Header --dir=docs
      
      * [HEADER] Header for Jenkinsfile
      
      * [HEADER] ASF Header to toml and md
      
      * [HEADER] ASF Header to gradle
      
      * Finalize rat cleanup
      
      * Fix permission
      
      * Fix java test
      
      * temporary remove nnvm onnx test
      Tianqi Chen committed
  16. 18 Jul, 2017 1 commit
    • [API] Prefetch schedule supported (#258) · 01cbc61a
      * prefetch interface added
      
      * prefetch python comments modified. prefetch info data structure maintained.
      
      * start injecting prefetches. first step (domain touch) implemented.
      
      * domain touch tested.
      
      * Prefetch ir_mutator and ir_visitor dispatch registered.
      
      * modify domain touched from passing a func_ref to passing a tensor
      
      * modify domain touched from passing a func_ref to passing a tensor
      
      * modify Tensor copy to Tensor ref
      
      * temp commit for rebase
      
      * debug info removed, typo fixed, ready to rebase
      
      * prefetch flatten test add!
      
      * roll back builtin functions to side effect functions
      
      * lint error fixed!
      
      * add cache line size to storage flatten argument
      
      * forgot modifications add
      
      * change code style to dmlc-like; get rid of can_prove, use manually compute instead
      
      * python lint error fixed
      
      * modify instrinsic name to pass tests
      
      * [TEST] get rid of str(), replace them by accessing attributes
      
      * change map to list comprehension
      
      * redundant numpy import removed
      Jian Weng committed