- 19 Jan, 2020 1 commit
-
-
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
-
- 16 Jan, 2020 1 commit
-
-
Spread the arithmetic.h into several components and move into arith subfolder. The arith namespace will be used for arithmetic expression pattern detections and simplifications.
Tianqi Chen committed
-
- 15 Jan, 2020 1 commit
-
-
* [REFACTOR] Move support related code to include/tvm/support - tvm/logging.h -> tvm/support/logging.h - remove tvm/base.h, move with into tvm/support/with.h * src/common -> src/support
Tianqi Chen committed
-
- 09 Jan, 2020 1 commit
-
-
* [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
-
- 08 Jan, 2020 1 commit
-
-
* [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
-
- 31 Dec, 2019 1 commit
-
-
* [REFACTOR][OBJECT] Consoldiate NodePtr/Ref/Hash/Equal and macros to Object. Historically, we have classes like NodePtr/Ref/HashEqual. After unified object protocol, these names are just alias of the object counterpart. Moreover, there are helper macros defined over the places for defining these object. This PR consoldiate the terminologies into the corresponding ones in the Object system so we have a clean and consistent API moving forward. * Update include/tvm/attrs.h Co-Authored-By: Wei Chen <ipondering.weic@gmail.com> * fix compilation Co-authored-by: Wei Chen <ipondering.weic@gmail.com>
Tianqi Chen committed
-
- 24 Oct, 2019 1 commit
-
-
* [NODE][REFACTOR] Refactor reflection system in node. - Removed the old Node, Node is now just an alias of runtime::Object - Introduce ReflectionVTable, a new columnar dispatcher to support reflection - This allows us to remove vtable from most node objects - The VisitAttrs are registered via TVM_RESGITER_NODE_TYPE, they are no longer virtual. - Consolidated serialization and reflection features into node. * Explicit type qualification when calling destructor. * Fix SPIRV, more comments
Tianqi Chen committed
-
- 21 Oct, 2019 1 commit
-
-
* [REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. This PR removes the original node system, and make node as a subclass of Object. This is a major refactor towards a better unified runtime object system. List of changes in the refactor: - We now hide data_ field, use Downcast explicitly to get a sub-class object. - Removed the node system FFI in python. - Removed the node C API, instead use PackedFunc for list and get attrs. - Change relay::Op::set_attr_type_key(attr_key_name) to relay::Op::set_attr_type<AttrType>(). - This change was necessary because of the new Object registration mechanism. - Subsequent changes to the op registrations - The change revealed a few previous problems that is now fixed. - Patched up a few missing node type registration. - Now we will raise an error if we register object that is not registered. - The original node.h and container.h are kept in the same location. - Calling convention: kObjectHandle now equals the old kNodeHandle, kNodeHandle is removed. - IRFunctor now dispatches on ObjectRef. - Update to the new type checking API: is_type, derived_from are replaced by IsInstance. - Removed .hash member function, instead use C++ convention hasher functors. * Address review comments
Tianqi Chen committed
-
- 09 Oct, 2019 1 commit
-
-
The current bounds checking infrastructure inserts checks like: ``` for (i, 0, bounds[n]) { if (likely(i < bounds[n]) { ... } } ``` into the TVM IR which is currently not removed by simplification infrastructure. This is a little unclean, as these are trivially true since for a loop var `i` with a given min and extent, we are guaranteed that `i >= min` and `i < min + extent`. Thus, we can insert these checks into the IR and use them to eliminate trivial bounds checks early on.
Andrew Tulloch committed
-
- 25 Sep, 2019 1 commit
-
-
* Changes to make tensorize work. These changes also fix the previously broken test. Summary: Tensorize was breaking for a few reasons. 1) Assert at: src/op/tensorize.cc:234 CHECK(is_one(e.region[j]->extent)) In some cases this cannot be proven, e.g.: expected shape=[16, 4], given region=[range(min=((ax1.outer*16)/16), ext=(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer)), range(min=((k.outer*4)/4), ext=(((((k.outer*4) + 3)/4) + 1) - k.outer)), range(min=0, ext=16), range(min=0, ext=4)] The unprovable one is: ext=(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer)). This can be simplified but it is not because to simplify divide, it must prove ax1.outer > 0 and since it is var it cannot. The fix for this to just find all the vars in expr in relace them with some const value. 2) Equivalence between tensorized expr and one being asked to tensorize. For example, the error would be. TVMError: Check failed: Equal(lhs, rhs): Failed to match the compute with TensorIntrin tensor_intrin's declaration provided= reduce(combiner=comm_reducer(result=[(x + y)], lhs=[x], rhs=[y], identity_element=[(int16)0]), source=[(int16(data(k))*int16(kernel(((((((((k.outer.outer*64) + (k.outer.inner*2)) + k)/2)*128) + i) - (k.outer.inner*128)) - (k.outer.outer*4096)), ((((k.outer.outer*64) + (k.outer.inner*2)) + k) % 2))))], axis=[iter_var(k, range(min=0, ext=2))], where=(bool)1, value_index=0), intrin= reduce(combiner=comm_reducer(result=[(x + y)], lhs=[x], rhs=[y], identity_element=[(int16)0]), source=[(int16(data(k))*int16(kernel(i, k)))], axis=[iter_var(k, range(min=0, ext=2))], where=(bool)1, value_index=0) Difference is mainly in the source part: source=[(int16(data(k))*int16(kernel(((((((((k.outer.outer*64) + (k.outer.inner*2)) + k)/2)*128) + i) - (k.outer.inner*128)) - (k.outer.outer*4096)), ((((k.outer.outer*64) + (k.outer.inner*2)) + k) % 2))))] source=[(int16(data(k))*int16(kernel(i, k)))], axis=[iter_var(k, range(min=0, ext=2))] This was not being simpifiled due to compute_intrin_iter_space (map for iter var to range) not containing leaf iter vars. 3) Here it fails with: Check failed: is_one(Simplify(value->shape[i])): Argument b_buffer shape mismatch[16, 4] vs [(((((ax1.outer*16) + 15)/16) + 1) - ax1.outer), (((((k.outer*4) + 3)/4) + 1) - k.outer), 16, 4] This is in buffer binding where it thinks expected and buffer bound shape is different. Although if we could simplify expr, this would not be the case. Test Plan: On skylake avx512 machine: python tests/python/contrib/test_gemm_acc16.py Reviewers: Subscribers: Tasks: Tags: * Implemented bounded analyzer which traverses tree and for reduce/for statements binds the bound of the analyzer. Later this is used to simplify expressions. Inspired from ir_mutator_with_analyzer Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Addressed comments. Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Added ASF header + define macro for the header file: TVM_ARITHMETIC_IR_VISITOR_WITH_ANALYZER_H_ Some lint fixes as well. * Relax the assumption that dom_map must always contain all leaf itervars. Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * Disable copy constructor and move to raw ptr. Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Kimish Patel committed
-
- 11 Jul, 2019 1 commit
-
-
* [INFA][IR] Build and Evolve Low-level IR. Remove dep from HalideIR. * Update include/tvm/node/ir_functor.h Co-Authored-By: Jared Roesch <roeschinc@gmail.com> * Update include/tvm/node/ir_functor.h Co-Authored-By: Jared Roesch <roeschinc@gmail.com>
Tianqi Chen committed
-
- 01 Jul, 2019 2 commits
-
-
Tianqi Chen committed
-
Tianqi Chen committed
-
- 13 Jun, 2019 1 commit
-
-
Tianqi Chen committed
-
- 24 May, 2019 1 commit
-
-
Tianqi Chen committed
-
- 23 May, 2019 1 commit
-
-
Tianqi Chen committed
-
- 22 Apr, 2019 1 commit
-
-
Liang-Chi Hsieh committed
-
- 08 Apr, 2019 1 commit
-
-
* [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
-
- 31 Mar, 2019 1 commit
-
-
Tianqi Chen committed
-
- 10 Mar, 2019 1 commit
-
-
Tianqi Chen committed
-
- 02 Mar, 2019 1 commit
-
-
Tianqi Chen committed
-
- 04 Jan, 2019 1 commit
-
-
* Enhanced simplification rules for Div by a positive constant * Fixed my last commit to correctly interpret TVM's division as truncated division * Fixed implemenation of IntSet::can_prove_non_positive() * addressed comments by @yzhliu * addressed comments by @sgrechanik-h * addressed more comments by @yzhliu
Salem Derisavi committed
-
- 20 Sep, 2018 1 commit
-
-
Tianqi Chen committed
-
- 23 Aug, 2018 1 commit
-
-
MORITA Kazutaka committed
-
- 29 May, 2018 1 commit
-
-
tqchen committed
-
- 11 Oct, 2017 1 commit
-
-
* [PASS] copy intrin * update comment thanks to derisavi
Tianqi Chen committed
-
- 10 Oct, 2017 1 commit
-
-
* [ARITH] Improve detect linear equation * fix doc
Tianqi Chen committed
-
- 03 Aug, 2017 2 commits
-
-
* [PASS] Refactor thread storage sync to a common visitor * Fix the sync scope check behavior
Tianqi Chen committed -
Tianqi Chen committed
-
- 18 Jul, 2017 1 commit
-
-
* 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
-
- 06 Jul, 2017 2 commits
-
-
Tianqi Chen committed
-
* [IR] Add body to AssertStmt * fix lint
Tianqi Chen committed
-
- 26 Mar, 2017 1 commit
-
-
* [CODEGEN] Refactor common codegen, Verilog Codegen * fix make * fix mk * update enable signal * change function name to at neg edge * Move test to correct place
Tianqi Chen committed
-
- 05 Mar, 2017 1 commit
-
-
* [IterVar/REFACTOR] Add types to IterVar * [ARITH/REFACTOR] Move IntSet to include * [REFACTOR/OP] Move Op detail to seperate folder. * fix test
Tianqi Chen committed
-
- 04 Mar, 2017 1 commit
-
-
* loop_partition draft * divide loop variable into constant domain and variable domain & consider multiple partitions * process doubt interval * fix and refactor, add relax_map arg in BoundDeduce * fix testcase and comment * rebase to zero, convert to SSA * change the logic of generating loop code & fix issues * add a testcase for relax map in deducebound && fix issues * clean code * const auto& * add test_multi_if
Ziheng Jiang committed
-
- 22 Feb, 2017 1 commit
-
-
* [LLVM] Initial support for codegen LLVM. * Fix the naming issue of codegen
Tianqi Chen committed
-
- 17 Feb, 2017 1 commit
-
-
* [PYTHON/API] Add compare and logic build-in op for Expr * remove 'and', 'or' * add deducer * [WIP] bound_deducer.cc * move IntervalSet and StrideSet into int_set_internal.h * add multiple failure for VariablePathFinder, add EvalSign * consider round in deduce, add success flag * remove Visit_(Div) * add comment, update HalideIR * expose intset to python * check the sign of every expr * set return type as ExprSignType * fine tune * add min & max python api for interval set * support for conditional expr * refactor test * add checker for BoundDeducer * add python check test * fix * fix * change range to interval; remove converter * remove converter declaration * remove int_set_internal.h
Ziheng Jiang committed
-
- 12 Feb, 2017 1 commit
-
-
Tianqi Chen committed
-
- 07 Feb, 2017 1 commit
-
-
Tianqi Chen committed
-
- 05 Feb, 2017 1 commit
-
-
Tianqi Chen committed
-