1. 02 Apr, 2020 9 commits
  2. 01 Apr, 2020 6 commits
  3. 31 Mar, 2020 5 commits
    • [RELAY] Re-wrote the Graph Partitioner to support multiple outputs (#5143) · 14ae3a6e
      * [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
      
      Input : A Relay module that have functions with disjoint annotated regions
              using compiler_begin and compiler_end. There could be multiple outputs.
      
      Output : A Relay module with global functions for such disjoint annotated regions
               with calls inserted at the respective location
      
      Dependencies : AnnotatedRegionSet Utility class.
      
      Methodology :
            1) The AnnotatedRegionSet utility class is able to construct a collection of
               nodes that are bound by a give annotation -- here we use compiler_begin
               and compiler_end
            2) Initially, for each function in the module AnnotatedRegionSets are populated.
            3) Then, Vistor pass is traversed until a compiler_end node is encountered
               that belongs to a "region".
            4) When the first compiler_end of a given annotated region is found, a function is
               formed and inserted.
               a) if the region has multiple outputs, a Tuple node (capturing all outputs)
                  is returned.
            5) Thereafter, if we encounter an another output of the same annotated region,
               it is important to note that the function is already formed. Therefore, it will
               lookup the function and add a TupleGetItemNode is inserted.
                a) We will use the location index of "rets" of each "Region" of AnnotatedRegionSet
                   as TupleGetItemNode index.
            6) Therefore, functions will be created for all annotated regions. The name for each
               global function is created using "Region" id and the compiler name.
      
      Change-Id: I1372f02a845b6d3da03b561763e03a378dca263c
      
      * [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
      
          *removed the expected use-case as we are taking broken-down PR approach
          *code style fixes
          *some trivial one liners
      
      * [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
      
          *fixed an implicit copy to a move
      
      * [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
      
          *code style changes for comments
          *renamed test case multiple outputs --> mixed single multiple outputs
              Since the existing test case checks for both single and multiple
              output scenarios
          *added a new test case with conv2d + batch_norm
          *some var name changes in the test
      
      * [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
      
      	*rebased
      manupa-arm committed
    • [Torch] Add support for split (#5174) · 430cb899
      * [Torch] Add support for split
      
      * fix
      
      * fix test class
      Wang Yucheng committed
    • [FRONTEND][KERAS]Max_pool3d and Averagepool3d operator support (#5085) · c97e41b0
      * [KERAS]Pool3d support added
      
      * Keras pool3d testcase added
      Samuel committed
    • [VTA] HW sources refactor (#5188) · 4683c3f5
      * refactor
      
      * path udpate
      Thierry Moreau committed
    • [TE] reverse-mode autodiff without any optimization (#5121) · e4a5441d
      * [TE] reverse-mode autodiff without any optimization
      
      Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
      
      * address review comments
      
      * add comments and retrigger CI
      
      * move unittest to debug ci
      
      * move test back and add seed
      
      Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
      Yizhi Liu committed
  4. 30 Mar, 2020 10 commits
  5. 29 Mar, 2020 4 commits
  6. 28 Mar, 2020 4 commits
    • [NODE][IR] Introduce StructuralHash for the Unified IR. (#5160) · 497d01d3
      * [NODE][IR] Introduce StructuralHash for the Unified IR.
      
      This PR introduces a new way to handle structural hash for the unified IR.
      
      - Each object can now register an optional SEqualHash function, which
        describes how to reduce its structural equality to sequence of hash values.
      - Optionally, the object can choose to allow labeling of vars(e.g. function parameters)
        by calling DefHash
      - We implemented a non-recursive structural hasher that maintains its own stack
        to traverse te IR.
      
      This PR also improves the hash value property from the previous relay's hash utility.
      In particular, the graph node mode hashs a DAG differently from a tree
      by attaching an unique occurence index to each graph node.
      
      In all of the test cases so far, structural_hash is consistent with structural_equal.
      - if structrual(x, y) then structural_hash(x) == structural_hash(y)
      - if structural_hash(x) == structural_hash(y) then highly likely structural_equal(x, y)
        - hash no collison is found in our testcases.
      
      Ideally we should work on automatically generating these functions in the future.
      
      * Fix cases for EnvFunc and Array dims
      
      * fix testcase
      
      * Update src/node/structural_hash.cc
      
      Co-Authored-By: 雾雨魔理沙 <lolisa@marisa.moe>
      
      Co-authored-by: 雾雨魔理沙 <lolisa@marisa.moe>
      Tianqi Chen committed
    • [NODE][IR] Introduce StructuralEqual Infra for the unified IR. (#5154) · 997a14ed
      * [NODE][IR] Introduce StructuralEqual Infra for the Unified IR.
      
      This PR introduces a new way to handle structural equality
      for both TIR and relay nodes in an extensive way.
      
      - Each object can now register an optional SEqualReduce function, which
        describes how to reduce its structural equality to another instance
        into equality of the children.
      - Optionally, the object can choose to allow remapping of vars(e.g. function parameters)
        by calling DefEqual
      - We implemented a non-recursive structural equality checker that
        recursively traverses the objects and does the structural equality checking.
      
      This PR also fixes a few potential problems in previous relay's AlphaEqual.
      
      - In particular, the new structural equality relation will be communicative.
      - It is can be dangerous to use same_as relation to quickly check equality,
        demonstrated by the following case. (%x, %y) are shared vars between two functions.
      
      - function0: fn (%x, %y) { %x + %y }
      - function1: fn (%y, %x) { %x + %y }
      
      The new structural equal is intented to supersede AlphaEqual and AttrsEqual.
      
      Follow-up PRs should be performed to redirect the existing usages, and removes
      the corresponding implementation.
      
      * Update the rule to distinguish between graph node and non-graph nodes.
      
      * Refactor the test cases to use structural equal.
      
      * address comments
      
      * Mark more relay::Expr as graph node, fix a testcase issue(was bug that was not caught by previous alpha equal)
      
      * Remove unrelated comment
      
      * Fix file comment
      
      * Address review comment
      
      * Relax condition to fit flaky case
      Tianqi Chen committed
    • [Relay][Frontend][Pytorch] Fixed ConvTranspose2D parsing (#5157) · 9c806621
      * Fixed conv transpose parsing.
      
      * small format change.
      
      * Chage test module names.
      
      * Simplified test syntax.
      Josh Fromm committed
    • Adding support for QNN subtract op (#5153) · dada6761
      * Adding support for QNN subtract op
      
      * Fixing typo.
      
      * Fixing typo.
      
      * Fixing lint.
      
      * Addressing review comments.
      
      * Renaming variables as per convention and renamed QnnBinaryOpTypes -> QnnBinaryOpType
      
      * Renaming QnnBinaryOpType to QnnBinaryOpTensorType which now takes the index you want to extract to make the code more readable.
      
      * Fixing lint.
      
      * Moving common code to macro.
      
      * Fixing alignment.
      
      * Fixing typo.
      
      * Fixing lint.
      
      * Renaming method to pass CI.
      shoubhik committed
  7. 27 Mar, 2020 1 commit
  8. 26 Mar, 2020 1 commit