[all-commits] [llvm/llvm-project] af22e2: TosaToTensor: Support reshape on tensors of unsign...

Matthias Gehre via All-commits all-commits at lists.llvm.org
Tue May 28 08:59:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af22e274e9c5643780f25066442e05b5bd453328
      https://github.com/llvm/llvm-project/commit/af22e274e9c5643780f25066442e05b5bd453328
  Author: Matthias Gehre <matthias.gehre at amd.com>
  Date:   2024-05-28 (Tue, 28 May 2024)

  Changed paths:
    M mlir/include/mlir/Conversion/TosaToTensor/TosaToTensor.h
    M mlir/include/mlir/Dialect/Tosa/Transforms/Passes.h
    M mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
    M mlir/lib/Conversion/TosaToTensor/TosaToTensorPass.cpp
    M mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Tosa/Transforms/TosaTypeConverters.cpp
    M mlir/test/Conversion/TosaToTensor/tosa-to-tensor.mlir

  Log Message:
  -----------
  TosaToTensor: Support reshape on tensors of unsigned integer (#91734)

This adds 
- `mlir::tosa::populateTosaToLinalgTypeConversion` which converts
tensors of unsigned integers into tensors of signless integers
- modifies the `tosa.reshape` lowering in TosaToTensor to use the type
converter correctly

I choose to implement the type converter in
`mlir/Conversion/TosaToLinalg/TosaToLinalg.h` instead of
`mlir/Conversion/TosaToTensor/TosaToTensor.h` because I need the same
type converter in the TosaToLinalg lowerings (future PR).
Alternatively, I could duplicate the type converter so it exists both in
TosaToLinalg and TosaToTensor. Let me know if you prefer that.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list