1. 01 Mar, 2020 1 commit
  2. 29 Feb, 2020 1 commit
    • Added CopyFromBytes and CopyToBytes convenience methods to NDArray. Fixed typos. (#4970) · 474c70d7
      * Added CopyFromBytes and CopyToBytes convenience methods.  Fixed typos.
      
      * Removed unneed argument check
      
      * Use TVMArrayCopyFrom/ToBytes methods
      
      * Moved CopyFrom/ToBytes to ndarray.cc
      
      * CopyToBytes impl was using CopyFromBytes.  Fixed
      
      * changed inline to TVM_DLL
      
      * Used impl from TVMArrayCopyTo/FromBytes into NDArray CopyTo/FromBytes
      
      * Move implementation of all CopyFrom/ToBytes into a common impls
      
      * make arg const
      
      * simplify method impl
      jmorrill committed
  3. 27 Feb, 2020 1 commit
  4. 26 Feb, 2020 1 commit
  5. 24 Feb, 2020 1 commit
    • [Relay][AutoTVM] Relay op strategy (#4644) · 623dd208
      * relay op strategy
      
      fix lint
      
      bitpack strategy
      
      bitserial_dense (#6)
      
      * update strategy
      
      * address comments
      
      fix a few topi test
      
      Dense strategy (#5)
      
      * dense
      
      * add biforst; remove comments
      
      * address comment
      
      Refactor x86 conv2d_NCHWc (#4)
      
      * Refactor x86 conv2d
      
      * Add x86 depthwise_conv2d_NCHWc
      
      * Add back topi x86 conv2d_nchw
      
      * Merge x86 conv2d_nchw and conv2d_NCHWc
      
      * Minor fix for x86 conv2d
      
      fix more strategy
      
      Add x86 conv2d_NCHWc_int8 strategy (#8)
      
      * Add x86 conv2d_NCHWc_int8 strategy
      
      * Remove contrib_conv2d_nchwc_int8
      
      * Fix generic conv2d_NCHWc for int8
      
      * Fix topi arm_cpu conv2d_NCHWc_int8
      
      update x86 conv2d
      
      enable specify relay ops to be tuned for autotvm
      
      add cuda conv2d strategy
      
      add conv2d strategy for rocm
      
      add conv2d strategy for hls
      
      add conv2d strategy for arm cpu
      
      add conv2d strategy for mali
      
      add conv2d strategy for bifrost
      
      add conv2d strategy for intel graphics
      
      clean up and fix lint
      
      remove template keys from autotvm
      
      remove 2 in the func name
      
      address comments
      
      fix
      
      * fix bugs
      
      * lint
      
      * address comments
      
      * add name to op implement
      
      * Modify topi tests (#9)
      
      * Add pooling, reorg, softmax and vision
      
      * Add lrn
      
      * fix topi test
      
      * fix more topi test
      
      * lint
      
      * address comments
      
      * x
      
      * fix more tests & bugs
      
      * Modify more tests (#10)
      
      * Modify tests for bitserial_conv2d, bitserial_dense, bitserial_conv2d_rasp and bnn
      
      * Minor fix
      
      * More minor fix
      
      * fix more test
      
      * try to update vta using strategy
      
      * fix cpptest
      
      * x
      
      * fix rebase err
      
      * Fix two tests (#11)
      
      * change autotvm log format
      
      * lint
      
      * minor fix
      
      * try fix vta test
      
      * fix rebase err
      
      * tweak
      
      * tmp hack for vta pass
      
      * fix tutorial
      
      * fix
      
      * fix more tutorials
      
      * fix vta tutorial
      
      * minor
      
      * address comments
      
      * fix
      
      * address comments
      
      * fix cpptest
      
      * fix docs
      
      * change data structure name and api
      
      * address comments
      
      * lint
      
      * fix rebase err
      
      * updates
      
      * fix winograd test
      
      * fix doc
      
      * rebase
      
      * upgrade tophub version number
      
      * fix bug
      
      * re-enable vta tsim test after tophub is upgraded
      
      * fix vta test to use the correct args so the config can be found in tophub
      
      Co-authored-by: Yao Wang <kevinthesunwy@gmail.com>
      Haichen Shen committed
  6. 21 Feb, 2020 1 commit
    • [CODEGEN] Support cuda tensorcore subbyte int data type in auto tensorcore (#4546) · f23ac969
      * support cuda tensorcore subbyte int data type in auto tensorcore
      
      * add lisence
      
      * pass cpplint
      
      * fix code review comments
      
      * merge the int4/int1 codegen tutorial into the existing auto tensorcore tutorial
      
      * using master's new API
      
      * disable tuning when cuda is not enabled
      
      * address cr comment
      
      * do not run the tuning
      
      * fix test failure
      
      * fix cpplint error
      
      * fix bool type reduction bug
      
      * 1. fix a index bug 2. fix returned bytes value of int1/int4/uint4
      
      * fix typo
      Orion34C committed
  7. 12 Feb, 2020 1 commit
    • [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding files (#4862) · a5661611
      * [REFACTOR][PY][API-CHANGE] establish tvm.ir, migrate corresponding relay files.
      
      This PR establishes tvm.ir and migrates the corresponding relay
      files into the new folder.
      
      API Change:
      - relay.Module -> tvm.IRModule
      
      * Update with ADT
      
      * Migrate transform
      
      * address comments
      
      * Migrate module
      
      * Migrate json_compact
      
      * Migrate attrs
      
      * Move LoweredFunc to stmt temporarily
      
      * temp migrate container
      
      * Finish migrate container
      Tianqi Chen committed
  8. 11 Feb, 2020 1 commit
  9. 10 Feb, 2020 1 commit
    • [Relay] Added Merge Composite pass (#4771) · 0dbe70c1
      * [Relay] Added MergeComposite pass
      
      This pass allows for patterns to be wrapped
      in a function marked with 'Composite' and a
      composite function name. This is intended to be
      used with the external codegen for the cases where
      an external operator maps to multiple Relay
      operators. In that case, the mapping can be expressed
      as a pattern and assigned a name.
      
      For more information on this pass and its motivation,
      see the RFC:
      https://discuss.tvm.ai/t/rfc-external-codegen-defining-composite-relay-operators/5470
      
      Change-Id: Icb1b803a9f0ac57c529143200228f3bb5793afc0
      
      * [Relay] Merge composite tests
      
      Added tests for the merge_composite pass.
      
      Change-Id: I1728b4a05b0c1c36140a40f1afe028fde62185dd
      
      * Merge composite additional test
      
      Change-Id: I9bc7d6053c575e9468ac5abc31214c6ad8507e46
      
      * Support priority order in merge_composite
      
      The order in which the patterns are matched
      was currently random as an unordered_map was
      used to store the pattern table. This uses
      arrays instead so that a distinct priority
      order of matching can be defined. Additional
      tests have also been added to verify this
      behaviour.
      
      Change-Id: Ief347df4262639138d5d9d7c8cee7ef233af7b56
      
      * Improved merge composite docs
      
      Change-Id: Ie3a72045ecc3f13ad3c302fbdf192b7296a306a8
      
      * Removed unused variable
      
      Change-Id: I7814d5fde368ffaf1b3d6d806060c774c7720364
      
      * Remove unnecessary op check
      
      Change-Id: I38e78d2acd5b86cb8e837be72ff9d72cd10bcf33
      
      * Improve styling on composite function creation
      
      Change-Id: I37add1c3134e0b5d5085fe1eb9daf8e06890fa8c
      
      * Comment reword
      
      Change-Id: Ie05872dcbbe0c3e1190b0597083b9a64e6b66c66
      
      * Stylistic changes to avoid std::move
      
      Change-Id: I43a93995bbf10530399900c992aa99dd4ae4575f
      
      * Relax a check in ExtractPattern
      
      Change-Id: I0faef77a66c55f83f09e6e47c561ffaea63dedfa
      
      * Remove new line
      
      Change-Id: Ifdd02c12087a7e1a0a9b54825669bc0de8f13c3d
      
      * Removed MatchPattern from MergeComposite
      
      This is not necessary now that ExtractPattern
      can fulfill the same purpose.
      
      Change-Id: I14dc020afa8e50f2df4c0a2efb88a011987f8196
      
      * Removed a new line
      
      Change-Id: I8b50f0c9069aa1bcaccbe68eb421031f01a64842
      
      * Improved docs for merge composite
      
      Change-Id: Ib1959a35c856e7ea5639de2e4ef314a54f44caf5
      
      * Fixed free vars in test
      
      Change-Id: I2b7f273db275964ec0e9820560663f0808adee79
      
      * Handle case where root arg might not be a call
      
      Change-Id: I4eeea3ce723d3ba337d110dcc690377daebe8626
      
      * Removed blank line
      
      Change-Id: I07f5392c0e95cfe3cfa5c333703cc6f82d6034fb
      
      * Change to CHECK_EQ
      
      Change-Id: I5c5d62d3cd57f72508b30b926f72091ae6f0d1cc
      
      * Revised a conditional
      
      Change-Id: I23a7897ca15a7cd076db5039dc653a4b8c27e803
      
      * Improved doc styling
      
      Change-Id: I377f0a1c1ac70f3b8d7584b0c49bddc8c6c134ef
      
      * Fail extraction if vars conflict
      
      Change-Id: I78e36d805e8ed6b55e61d490212a967c857554a4
      
      * Added further merge composite tests
      
      Change-Id: Ib1d800409fca4c1834c7fe0cab5a26ab99a26820
      
      Co-authored-by: lhutton1 <35535092+lhutton1@users.noreply.github.com>
      mbarrett97 committed
  10. 07 Feb, 2020 1 commit
    • [REFACTOR][PY][API-Change] Polish tvm.runtime, tvm.runtime.module API update (#4837) · e0122c0e
      * [REFACTOR][PY-API] Polish tvm.runtime, tvm.runtime.module API update
      
      This PR updates the tvm.runtime to use the new FFI style.
      
      - Remove top-level tvm.module to avoid confusion between runtime.Module and IRModule
      - API changes wrt to runtime.Module
        - tvm.module.load -> tvm.runtime.load_module
        - tvm.module.enabled -> tvm.runtime.enabled
        - tvm.module.system_lib -> tvm.runtime.system_lib
      - Remove dep on api_internal from runtime.
      
      * Update module.load in the latest API
      Tianqi Chen committed
  11. 04 Feb, 2020 1 commit
  12. 03 Feb, 2020 1 commit
    • [TIR] Create a StringImm reference type (#4806) · c39ab93d
      This is motivated by the want to send an
      array of strings across the python/C++
      boundary. Arrays only support ObjectRef types
      and so can't carry StringImmNodes. This creates
      a string reference type, StringImm, which can
      be used with tvm::Arrays.
      
      Change-Id: I598a44536c156b97dbfe3e9518e0a1f705da850c
      mbarrett97 committed
  13. 28 Jan, 2020 1 commit
  14. 22 Jan, 2020 1 commit
  15. 21 Jan, 2020 2 commits
    • [REFACTOR] top->te (#4759) · 55d81925
      Bring up namespace te -- Tensor expression language DSL.
      Tianqi Chen committed
    • [REFACTOR] Establish printer in the source folder (#4752) · e4d817d4
      * [REFACTOR] Establish printer in the source folder.
      
      As we move towards the unified IR, we will eventually want to build a unified
      printers for both relay and TIR.
      
      This PR isolate the printer component into a separate folder in src as a first step.
      
      - Refactored the Doc DSL using Object, clean up APIs.
      - Isolate out the meta data into a header.
      - move printer into relay_text_printer, add comments about further TODos.
      
      * Rename NodePrinter -> ReprPrinter to distinguish it from other printers
      Tianqi Chen committed
  16. 20 Jan, 2020 1 commit
  17. 19 Jan, 2020 2 commits
    • [REFACTOR][CODEGEN] codegen->target, build_module->driver (#4742) · 33b0831c
      This PR moves the codegen related code into the target folder,
      as they are target specific functionalities.
      
      We also adopt the term "compiler driver" in common compiler infra
      such as rust, GHC and clang.
      As a result, build_module is moved into the driver folder.
      Tianqi Chen committed
    • [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
  18. 18 Jan, 2020 2 commits
    • [runtime][refactor] Unify vm and interpreter objects (#4693) · acbf8851
      * unify vm and interpreter objects
      
      * move closure back vm
      
      * adt/closure back to vm.adt/vm.closure
      
      * closure base
      Zhi committed
    • [CodeGen][CUDA] Improve CUDA vectorizer (#4736) · 2630ffcb
      - Fixes issues to enable fp16 vectorizer. Now correct packing and
        unpacking CUDA code will be emitted. Enabled more unit tests.
      
      - Do not emit code to read the first lane from an undef variable
      
        int _3;
        _3 = _3 & ~(0x000000ff << 0) | ...
      
        and emit the following code instead:
      
        _3 = (((0x000000ff & (_1 >> 0))+(0x000000ff & (_2 >> 0))) << 0);
      
        Note that nvcc 10.2 is forgiving and emits the same code for both cases.
        A warning appears in test_codegen_cuda.py.
      
      Signed-off-by: Wei Pan <weip@nvidia.com>
      wpan11nv committed
  19. 17 Jan, 2020 2 commits
  20. 16 Jan, 2020 6 commits
  21. 15 Jan, 2020 3 commits
  22. 14 Jan, 2020 5 commits
  23. 11 Jan, 2020 3 commits
    • [Relay/Topi][Op] Conv1D (#4639) · 35099e6a
      * added conv1d operators to topi.
      
      * Started to add python testing.
      
      * Added python conv1d implementation for testing.
      
      * Wrote test but need to add cuda schedule :(
      
      * Cuda schedules working for both conv1d layouts.
      
      * All topi tests passing.
      
      * Formatting topi.
      
      * Removed pad_method option as its probably overkill.
      
      * Added relay op definition of conv1d.
      
      * End2end conv1d working with onnx.
      
      * Lint fixes.
      
      * Formatting fixes.
      
      * Rebase fix.
      
      * Switched to array based attributes for consistency across convs.
      
      * Improved onnx parsing and testing for convolutions.
      
      * lint fix
      
      * Tiny tweak.
      
      * Bug fix
      
      * Rebase fix.
      
      * Add group ignore to onnx conv1d frontend.
      
      * Unified MakeConv and fixed documentation.
      
      * improved autopadding
      
      * Addressed feedback and simplified onnx frontend.
      
      * Format fix.
      
      * Basic X86 NCW schedule working.
      
      * Added nwc schedule.
      
      * fixed name
      
      * Added more tests and basic x86 schedules.
      
      * Format fix.
      
      * Added non power of two shape tests.
      Josh Fromm committed
    • [REFACTOR][IR] Unified IR Primitive Op and Registry (#4687) · d8f06020
      This PR migrates relay's Op into the ir folder.
      Op and its registry provides an useful mechanism to
      store any attribute meta-data of an operator include
      function signatures, lowering rules, side effect etc.
      
      These features are not only useful for Relay, but also needed in the low-level IR.
      At the current moment, intrinsic functions in the low-level IR are simply
      represented by a string. This means we cannot type-check the low-level IR
      when the type does not meet the constraint, nor can we obtain further
      information such as side-effect and read write relation of these intrinsics
      wrt to arguments.
      
      Op will be used as the way to handle primitive ops(in DL terminology)
      (builtin intrinsics or in compiler terminology).
      We will perform follow-up refactors to make low-level CallNode
      take Op as the function argument.
      Tianqi Chen committed
    • [REFACTOR][IR] Allow Module to store BaseFunc. (#4678) · 3d52a99c
      Under the unified IR. We will allow a single IRModule
      to store different function variants, such as relay::Function,
      ExternFunc, and low-level function.
      
      This PR changes relay::Function -> BaseFunc in the module file
      to support multiple function variants.
      Tianqi Chen committed