Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Fix for sequence of mutations in blocks #51577

Merged
merged 34 commits into from
Feb 8, 2021

Commits on Jan 28, 2021

  1. Fix for feedback

    neginraoof committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    dc81f3d View commit details
    Browse the repository at this point in the history
  2. clang

    neginraoof committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    e368129 View commit details
    Browse the repository at this point in the history
  3. Fix for clang

    neginraoof committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    c2370ed View commit details
    Browse the repository at this point in the history
  4. [ONNX] Update constant-folding of Gather op (pytorch#50554)

    Update constant-folding of Gather operator so it also includes cases where rank of indices input is 0.
    Currently it only support cases where rank of indices is 1.
    KsenijaS committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    4d0a47e View commit details
    Browse the repository at this point in the history
  5. Fix for feedback

    neginraoof committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    def794f View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2021

  1. [ONNX] Fix bug in unfold symbolic (pytorch#50504)

    Fix bug in unfold symbolic
    KsenijaS committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    3766f32 View commit details
    Browse the repository at this point in the history
  2. [ONNX] Improve error message for parse_arg in symbolic functions (pyt…

    …orch#50512)
    
    previous error message looks like this 
    ```
    RuntimeError: Unexpected node type: onnx::Gather
    ```
    now
    ```
    RuntimeError: Expected node type 'onnx::Constant' for argument 'groups' of node 'conv1d', got 'onnx::Gather'.
    ```
    
    Repro example:
    ```python
        @torch.jit.script
        def conv(x, w):
            return F.conv1d(x, w, groups=x.shape[0])
    
        class Net(nn.Module):
            def forward(self, x, w):
                return conv(x, w)
    
        model = Net()
    
        x = torch.randn(8, 8, 512)
        w = torch.randn(8, 1, 3)
        torch.onnx.export(model,
                            (x, w),
                            "file.onnx",
                            opset_version=12)
    ```
    BowenBao committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    35b8f35 View commit details
    Browse the repository at this point in the history
  3. Update test.sh

    neginraoof committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    f67519e View commit details
    Browse the repository at this point in the history
  4. Fixed tests

    neginraoof committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    651db7e View commit details
    Browse the repository at this point in the history
  5. Merge branch 'neraoof/fixSetAttribute' of github.com:neginraoof/pytor…

    …ch into neraoof/fixSetAttribute
    neginraoof committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    bd35e20 View commit details
    Browse the repository at this point in the history
  6. Fix mypy

    neginraoof committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    2a4a1f4 View commit details
    Browse the repository at this point in the history
  7. [ONNX] Export get/set attribute nodes (pytorch#50768)

    Fix get/set attributes when getting/setting a model parameter.
    This PR also fixes inplace ops in If blocks.
    neginraoof committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    4fab460 View commit details
    Browse the repository at this point in the history
  8. [ONNX] Enable remaining failed tests in opset13 (pytorch#50806)

    * enable remaining test in opset13
    
    * add comments for error version test info
    
    * fix comments:opset12 unbind problem
    
    * add ignore[no-redef]
    
    * fix format
    
    Co-authored-by: hwangdeyu <deyhuang@qq.com>
    hwangdeyu and hwangdeyu committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    36eabc8 View commit details
    Browse the repository at this point in the history
  9. [ONNX] Add silu operator support for onnx (pytorch#51193)

    Support for yolov5 compound-scaled object detection models export.
    hwangdeyu committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    5bbb160 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2021

  1. [ONNX] Fix graph position to insert clone node for inplace op removal (

    …pytorch#50123)
    
    Previous insertBefore approach might end-up inserting clone node in inner sub-blocks, while then the node being used later at other outside call sites.
    BowenBao committed Jan 31, 2021
    Configuration menu
    Copy the full SHA
    6a00ffe View commit details
    Browse the repository at this point in the history
  2. [ONNX] Fix graph sequence output from loop node (pytorch#51305)

    * Add loop & if node to the list of nodes that could produce sequence type output.
    * Switch from `[]` to `at()` to avoid segfault of out of range access.
    BowenBao committed Jan 31, 2021
    Configuration menu
    Copy the full SHA
    c6c6535 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. Update error message that displays when encountering an op unsupporte…

    …d for ONNX export. (pytorch#51387)
    Spandan Tiwari committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    687a9a2 View commit details
    Browse the repository at this point in the history
  2. [ONNX] Enable Constant Folding for ONNX Opset 13 (pytorch#51096)

    * Enable Constant Folding for ONNX Opset 13
    
    * fix CI clang-diagnostic
    
    * fix integers type
    
    * fix comments:sort axes and support negative number
    
    * update squeeze op constant folding
    
    * fix format warning
    
    * fix clang-format issue
    
    Co-authored-by: hwangdeyu <deyhuang@qq.com>
    hwangdeyu and hwangdeyu committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    8ba250c View commit details
    Browse the repository at this point in the history
  3. [ONNX] Update unsafe_chunk() method to support new version 13 of Spli…

    …t operator. (pytorch#51415)
    
    * def unsafe_chunk() support and test in ops13.
    
    * Use _unsqueeze_helper insteadof Unsqueeze operator
    
    * Cast the splits into long.
    
    * Change the test to a fixed dimension.
    
    * Update test_pytorch_onnx_onnxruntime.py
    
    * Disable test_loop_with_list for opset 13.
    
    Co-authored-by: Negin Raoof <neginmr@utexas.edu>
    fatcat-z and neginraoof committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    0015b95 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. Configuration menu
    Copy the full SHA
    f15d3f4 View commit details
    Browse the repository at this point in the history
  2. [ONNX] Support list remove for onnx export (pytorch#51373)

    * Support aten::Delete
    * Refactor prepare_inplace_ops_for_onnx into one pass.
    BowenBao committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    8221155 View commit details
    Browse the repository at this point in the history
  3. fix bug (pytorch#51222)

    Fix bug in scatter_add symbolic
    KsenijaS committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    1b2190d View commit details
    Browse the repository at this point in the history
  4. [ONNX] Modifications in remove inplace ops passes to better handle bi…

    …nary inplace ops (pytorch#51318)
    
    Modifications in remove_inplace_ops_for_onnx pass and remove_inplace_ops pass to better handle binary inplace ops
    
    * Handles special case of binary inplace ops, where the first input node has a lower type precedence than the second input node. 
    * When the inplace node is converted to a regular op, this information is lost and the resulting type is based on type precedence, just like regular ops. To avoid this loss of information, we add a cast node before the input node with the higher data type precedence, so that both the input types are the same.
    shubhambhokare1 committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    ef4e3b7 View commit details
    Browse the repository at this point in the history
  5. Fix multiple mutations

    neginraoof committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    a7d103e View commit details
    Browse the repository at this point in the history
  6. Merge branch 'onnx_ms_1' of https://github.com/pytorch/pytorch into n…

    …eraoof/fixSetAttribute2
    
    # Conflicts:
    #	scripts/onnx/test.sh
    #	test/onnx/test_pytorch_onnx_onnxruntime.py
    #	torch/csrc/jit/passes/onnx/remove_inplace_ops_for_onnx.cpp
    neginraoof committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    104bbd0 View commit details
    Browse the repository at this point in the history
  7. merge

    neginraoof committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    e5a91c3 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Clear up the code

    neginraoof committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    8007894 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

  1. Fix for feedback

    neginraoof committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    ee28dd1 View commit details
    Browse the repository at this point in the history
  2. Adding test for opset 13

    neginraoof committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    58004e2 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. Configuration menu
    Copy the full SHA
    4750169 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b12a05 View commit details
    Browse the repository at this point in the history
  3. merge

    neginraoof committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    305c96b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f808f8a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    76e562e View commit details
    Browse the repository at this point in the history