[all-commits] [llvm/llvm-project] 76d72c: [MLIR][Shape] Lower `shape.get_extent` to `std.dim...

frgossen via All-commits all-commits at lists.llvm.org
Mon Jun 29 01:39:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 76d72c941df19779a7abfdfda66d3f452cef1db8
      https://github.com/llvm/llvm-project/commit/76d72c941df19779a7abfdfda66d3f452cef1db8
  Author: Frederik Gossen <frgossen at google.com>
  Date:   2020-06-29 (Mon, 29 Jun 2020)

  Changed paths:
    M mlir/lib/Conversion/ShapeToStandard/ShapeToStandardPatterns.td
    M mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir

  Log Message:
  -----------
  [MLIR][Shape] Lower `shape.get_extent` to `std.dim` when possible

When the shape is derived from a tensor argument the shape extent can be derived
directly from that tensor with `std.dim`.
This lowering pattern circumvents the necessity to materialize the shape in
memory.

Differential Revision: https://reviews.llvm.org/D82644




More information about the All-commits mailing list