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

Cherry pick: Allow creation of TCP groups where an op has multiple uses #76

Commits on Oct 27, 2023

  1. Apply Cruise Internal Patches (cruise-automation#1)

    sjain-stanford authored and GitHub Enterprise committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    ccaa542 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. Conversion for aten.index.Tensor_hacked_twin -> tcp.custom_op (cr…

    …uise-automation#3)
    
    This is useful for ML ranker C7:
    ```
    ERROR: [RoboCompiler] - RoboCompiler step 'RoboCompiler Optimize' failed with the following error:
    cruise/mlp/robotorch/project/trajectory_ranking/model_architectures/per_npc_ranker.py:712:0: error: failed to legalize operation 'torch.aten.index.Tensor_hacked_twin' that was explicitly marked illegal
    ```
    TorchToTosa doesn't match the AtenIndexTensorHackedTwinOp due to [this](https://sourcegraph.robot.car/github.robot.car/cruise/mla-robocomp-torch-mlir/-/blob/lib/Conversion/TorchToTosa/TorchToTosa.cpp?L3788) constraint:
    ```
        // Right now only support multiple indexes with same shape
        // TODO for different shape multiple indexes, add broadcast_to for small
        // shape
        for (auto indexShapeOneDim : indexesShape) {
          if (!llvm::equal(indexesShape[0], indexShapeOneDim)) {
            return rewriter.notifyMatchFailure(
                op, "unimplemented: Only support multi indexes with same shape");
          }
        }
    ```
    where we see multiple index tensors of different shapes:
    ```
    %278 = torch.prim.ListConstruct %277, %273, %270, %205 : (!torch.vtensor<[1,1,1,1],si64>, !torch.vtensor<[24,1,1],si64>, !torch.vtensor<[2,1],si64>, !torch.vtensor<[40],si64>) -> !torch.list<vtensor> 
    %279 = torch.aten.index.Tensor_hacked_twin %arg9, %278 : !torch.vtensor<[1,24,2,40],f32>, !torch.list<vtensor> -> !torch.vtensor<[1,24,2,40],f32>
    ```
    We can dig into supporting this case in TorchToTosa eventually, however this is to unblock the immediate case for C7 where we plan to map this to a data movement kernel (like gather).
    sjain-stanford authored and GitHub Enterprise committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    7547c93 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. Configuration menu
    Copy the full SHA
    04b9d8c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2811d4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aba958a View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2023

  1. Configuration menu
    Copy the full SHA
    b0add85 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Configuration menu
    Copy the full SHA
    fc9d25c View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2023

  1. Configuration menu
    Copy the full SHA
    80bba2e View commit details
    Browse the repository at this point in the history
  2. Converting index_put op to a custom op (cruise-automation#5)

    Merge cruise-automation#21 from upstream.
    navahgar authored and GitHub Enterprise committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    052ba71 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2023

  1. Move bottom up fuser declaration to header file (cruise-automation#23)

    Move bottom up fuser declaration to header file
    
    No testing required since it's a minor restructuring
    
    ---------
    
    Co-authored-by: Muhammad Abubakar <muhammad.abubakar@getcruise.com>
    mabubakarpurdue and Muhammad Abubakar committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    eea9c34 View commit details
    Browse the repository at this point in the history
  2. [Cherry-Pick] Move bottom up fuser declaration to header file (cruise…

    …-automation#7)
    
    Move bottom up fuser declaration to header file
    
    No testing required since it's a minor restructuring
    
    Cherry-pick from
    cruise-automation@c4c94fb
    ---------
    
    Co-authored-by: Muhammad Abubakar <muhammad.abubakar@getcruise.com>
    Muhammad Abubakar authored and GitHub Enterprise committed Dec 7, 2023
    Configuration menu
    Copy the full SHA
    9c19ae3 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    fe8bacd View commit details
    Browse the repository at this point in the history
  2. TCP Upgrade (cruise-automation#8)

    Bumps TCP to `c4c94fb25f2c3470839796025f40f0487b3b69b6`.
    sjain-stanford authored and GitHub Enterprise committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    aec758d View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Lower torch transposed convolution to a custom TCP op (cruise-automat…

    …ion#25)
    
    As titled, lower torch transposed convolution to a custom TCP op to
    avoid a mis-compilation in `TorchToTosa`.
    
    ---------
    
    Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
    srinathava and Srinath Avadhanula committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    fdf0338 View commit details
    Browse the repository at this point in the history
  2. Cherry pick: Lower torch transposed convolution to a custom TCP op (c…

    …ruise-automation#25) (cruise-automation#10)
    
    As titled, lower torch transposed convolution to a custom TCP op to
    avoid a mis-compilation in `TorchToTosa`.
    
    Cherry-pick from upstream: cruise-automation#25
    
    ---------
    
    Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
    Srinath Avadhanula authored and GitHub Enterprise committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    bf6191f View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Merge branch 'main' into aaron.stgeorge/upgrade_01_24

    aaron-stgeorge committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    33846e9 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. Add TCP custom op builder helper (cruise-automation#33)

    Add a utility to aid in converting torch ops to `tcp.custom_op`
    
    ---------
    
    Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
    srinathava and Srinath Avadhanula committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    4e1d4c9 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Cherry-pick: Add TCP custom op builder helper (cruise-automation#33) (c…

    …ruise-automation#12)
    
    Add a utility to aid in converting torch ops to `tcp.custom_op`
    
    Cherry picking cruise-automation#33
    
    ---------
    
    Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
    Srinath Avadhanula authored and GitHub Enterprise committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    ef63c4d View commit details
    Browse the repository at this point in the history
  2. [TorchToTcp] lowering support for aten.size.int op (cruise-automation#35

    )
    
    Lowering `aten.size.int` op to `tensor::dim` op during torch-to-tcp.
    
    Test (in docker):
    
    `bazel test //test/...`
    
    ---------
    
    Co-authored-by: Ze Zhang <ze.zhang@getcruise.com>
    zezhang and Ze Zhang committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    827a780 View commit details
    Browse the repository at this point in the history
  3. [TorchToTcp] Constrain dynamic legality condition for 2d convolutions (

    …cruise-automation#34)
    
    Conv 1D fails legalization in TorchToTosa, which I believe [only
    supports](https://sourcegraph.com/github.com/llvm/torch-mlir@faa4517e83d82348259165412d0744ba776360b3/-/blob/lib/Conversion/TorchToTosa/TorchToTosa.cpp?L1871)
    converting aten.convolution for the 2D case:
    ```
      if (inputTy.getRank() != 4)
        return rewriter.notifyMatchFailure(
            op, "Unimplemented: only 2D convolutions supported");
    ```
    
    This makes it so we dynamically make just conv2d legal, so the remaining
    variants can convert to `tcp.custom_op`.
    sjain-stanford authored and Ze Zhang committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    2eff963 View commit details
    Browse the repository at this point in the history
  4. Cherry-pick: aten.size.int and conv2d constrain (cruise-automation#13)

    Ze Zhang authored and GitHub Enterprise committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    4eb3ce9 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. MLIR-tcp Upgrade (cruise-automation#11)

    Updates mlir-tcp to `90768ec2801ed9959144e8a1ca800e34ee2c7f54` resolves
    some minor merge conflicts around testing changes in [this
    PR](cruise-automation#28).
    Aaron StGeorge authored and GitHub Enterprise committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    6d38b86 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    dcd1338 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Cherry-pick from upstream for tensor.extract_slice (cruise-automation#15

    )
    
    Cherry-pick from upstream PR:
    cruise-automation#39
    Ze Zhang authored and GitHub Enterprise committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    bb21cd2 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2024

  1. Merge branch 'main' into zezhang/upgrade_3_5

    Ze Zhang committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ff2d017 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6945903 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Configuration menu
    Copy the full SHA
    4680380 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. Configuration menu
    Copy the full SHA
    a44b76b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc8b4ed View commit details
    Browse the repository at this point in the history
  3. Sync with upstream and add hermetic python patches for c/c (cruise-au…

    …tomation#17)
    
    As titled.
    sjain-stanford authored and GitHub Enterprise committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    ef24d46 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. Configuration menu
    Copy the full SHA
    3c78997 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. set generic name for executing tensor-rt engine (cruise-automation#19)

    Replace the tcp custom op for `torch.tensorrt.execute_engine_variadic`
    to `tensorrt.execute_engine` for generic usage purpose.
    
    To test, from c/c repo:
    
    `bazel test @mlir-tcp//test/...`
    Ze Zhang authored and GitHub Enterprise committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    1b94201 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. Merge branch 'cruise_main' into raghavanr/upgrade_4_16

    aaron-stgeorge committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    6292caa View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Configuration menu
    Copy the full SHA
    c78a73e View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. handle create_tensor_from_int

    Muhammad Abubakar committed May 1, 2024
    Configuration menu
    Copy the full SHA
    fa0a65f View commit details
    Browse the repository at this point in the history
  2. Add create_tensor_from_int (cruise-automation#20)

    Muhammad Abubakar authored and GitHub Enterprise committed May 1, 2024
    Configuration menu
    Copy the full SHA
    456bb9c View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. support index from tensor

    Muhammad Abubakar committed May 8, 2024
    Configuration menu
    Copy the full SHA
    22fc7d0 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. add test and incorporate feedback

    Muhammad Abubakar committed May 10, 2024
    Configuration menu
    Copy the full SHA
    51a9bdf View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. support index_from_tensor (cruise-automation#21)

    Support lowering of the index_from_tensor op
    Part of: https://github.robot.car/cruise/cruise/pull/240509
    Muhammad Abubakar authored and GitHub Enterprise committed May 13, 2024
    Configuration menu
    Copy the full SHA
    f3e6748 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Configuration menu
    Copy the full SHA
    cf71f96 View commit details
    Browse the repository at this point in the history
  2. Sync with upstream (cruise-automation#22)

    Picks the dynamic legality fixes to TorchToTcp amidst other changes.
    sjain-stanford authored and GitHub Enterprise committed May 14, 2024
    Configuration menu
    Copy the full SHA
    f28249a View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. add missing file

    Muhammad Abubakar committed May 15, 2024
    Configuration menu
    Copy the full SHA
    1677b79 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. update test

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    dd2d06a View commit details
    Browse the repository at this point in the history
  2. Add missing file from previous PR (cruise-automation#23)

    Add missing file from previous PR
    Muhammad Abubakar authored and GitHub Enterprise committed May 16, 2024
    Configuration menu
    Copy the full SHA
    aa8740f View commit details
    Browse the repository at this point in the history
  3. handle create_tensor_from_index_array

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    3eb5a4d View commit details
    Browse the repository at this point in the history
  4. handle create_index_from_tensor_array

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    be0f91d View commit details
    Browse the repository at this point in the history
  5. support create_index_from_tensor

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    ca86ee1 View commit details
    Browse the repository at this point in the history
  6. add test case

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    4741c39 View commit details
    Browse the repository at this point in the history
  7. Move Tcp::IndexArrayType to CruiseInternal

    Muhammad Abubakar committed May 16, 2024
    Configuration menu
    Copy the full SHA
    a7dde48 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Create tensor from index array (cruise-automation#24)

    Create tensor from index array handle
    Muhammad Abubakar authored and GitHub Enterprise committed May 21, 2024
    Configuration menu
    Copy the full SHA
    a5b2c20 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. LRDPrefilterPrediction Cleanup (cruise-automation#25)

    Remove `LRDPrefilterPrediction` related content
    
    Test from c/c:
    `bazel test @mlir-tcp//test/...`
    Ze Zhang authored and GitHub Enterprise committed May 29, 2024
    Configuration menu
    Copy the full SHA
    8da2258 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Allow creation of TCP groups where an op has multiple uses (cruise-au…

    …tomation#74)
    
    We previously only allowed an op to have a single use during the
    creation a group for it. This PR relaxes that to allow multiple uses as
    long as all the uses belong to the same region.
    
    ---------
    
    Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
    srinathava and Srinath Avadhanula committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    913ffbb View commit details
    Browse the repository at this point in the history