1. 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
  2. 11 Feb, 2020 8 commits
  3. 10 Feb, 2020 4 commits
    • [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
    • Fixed bug in ExprOp that caused bitwise operators to fail when a basic python… · d55e21ff
      Fixed bug in ExprOp that caused bitwise operators to fail when a basic python type was on the left hand side of the expression. Added regression test for crashing cases. (#4852)
      
      pankratz committed
  4. 09 Feb, 2020 3 commits
  5. 08 Feb, 2020 2 commits
  6. 07 Feb, 2020 10 commits
  7. 06 Feb, 2020 5 commits
  8. 05 Feb, 2020 7 commits
    • [Relay] Conv2D padding representation (#4787) · 5ea4f0d5
      * enforce 4-way padding
      
      * add util with get_pad_tuple
      
      * delete unnecessary arguments
      
      * fix lint
      
      * add container.Array case
      
      * fix cudnn conv2d asymmetric padding logic
      
      * rename get_pad_tuple to get_pad_tuple2d
      
      * revert change for topi/python/topi/nn/conv2d.py
      
      * add get_pad_tuple2d for several contrib conv2d ops
      
      * add get_pad_tuple2d for all conv2d ops
      Xingyu Zhou committed
    • [Relay][Frontend][TFLite] Add parser support for logical operators (#4642) · 79ce87f8
      * [Relay][Frontend][TFLite] Add parser support for logical operators
      
      * Add parser support for logical_and, logical_or
      * Add boolean dtype as a valid tensor type
      * BOOLEAN dtype is supported only from tf 1.15
        so logical ops work only in that and newer versions
      * Logical_not is ommited since tflite can't convert it -->
        throws errors for addv2
      
      * Add TFLite vesion check in tests for logical ops
      
      * Check is added because of boolean dtype lack of support
      Ina Dobreva committed
    • [QNN] Optimize lowering for requantize and FixedPointMultiply. (#4798) · 23f3988b
      * [QNN] Optimize lowering for requantize and FixedPointMultiply.
      
      * Add check for requantize scale gt 1.
      
      * Added test case.
      Animesh Jain committed
    • [Frontend][TFLite] Dynamically calculate input_stats of any fake_quant range (#4789) · 2989d725
      * [TFLite] Dynamically calculate input_stats of any fake_quant range
      
      * pass the input range to the convertor and caclulate (mean, scale) there
      * change the range of the second tensor in elemwise operations
        so that we test inputs with different quant params
      * change the possible output range for elemwise ops wrt the updated ranges
      * update the comments for (m, s) calculations
      * add input range dict to reduce_mean op
      
      * Apply requested changes
      
      * add exception handling for zero division in input_stats
      * fix range of the input tensor in elemwsie
      Ina Dobreva committed
    • Fixed subprocess creation under windows (#4820) · 019356f8
      * fixed subprocess creation under windows 
      
      this addresses  the issue #4819
      
      * Update server.py
      Seyyed Hossein Hasanpour committed
    • [REFACTOR][PY] Establish tvm.runtime (#4818) · fc7dd6d7
      * [REFACTOR][PY] Establish tvm.runtime
      
      This PR establishes the tvm.runtime namespace that contains the core runtime data structures.
      The top-level API are kept inact for now via re-exporting.
      
      We will followup later to cleanup some of the top-level APIs.
      
      * Fix ndarray name
      Tianqi Chen committed
    • Mxnet parser for Qnn dialect (#4714) · 7d263c31
      * - Additional util methods needed for mxnet frontend for qnn dialect.
      
      * - Fixing call to quantize.
      
      * [QNN] MxNet-MKLDNN parser support for QNN
      
      * [QNN] Relax conv check.
      
      * - Merge from origin
      
      * [QNN] Channel wise changes
      
      * [QNN] Dense changes
      
      * Dense fix for QNN ops.
      
      * - Removed non-mkl code from utils.
      
      - Small refactoring
      
      - Remove "with_sum" from conv
      
      - Simplified code
      
      * - Fixing ring buffer name.
      
      * - Fixing pylint issues.
      
      * - Fixing lint
      - Removing redundant commented code.
      
      * - Adding test cases
      - Removing unused methods.
      
      * [WIP] end to end test case for mxnet qnn parser
      
      * Changes to parse large CV models.
      
      * Pylint issues.
      
      * Fix Conv2D with sum and quantized pooling.
      
      * Reverting the changes made for mxnet-mkldnn test cases. Because of #4753, mxnet could not be updated to mxnet-mkldnn.
      
      Co-authored-by: Animesh Jain <anijain@umich.edu>
      shoubhik committed