Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Clean up build trip count analysis method - avoid mutating IR - #133

Closed
bondhugula wants to merge 1 commit into
tensorflow:masterfrom
bondhugula:trip-count-build
Closed

bondhugula wants to merge 1 commit into
tensorflow:masterfrom
bondhugula:trip-count-build

Conversation

@bondhugula

Copy link
Copy Markdown
Contributor
  • NFC - on any pass/utility logic/output.

  • Resolve TODO; the method building loop trip count maps was
    creating and deleting affine.apply ops (transforming IR from under
    analysis!, strictly speaking). Introduce AffineValueMap::difference to
    do this correctly (without the need to create any IR).

  • Move AffineApplyNormalizer out so that its methods are reusable from
    AffineStructures.cpp; add a helper method 'normalize' to it. Fix
    AffineApplyNormalize::renumberOneDim (Issue AffineApplyNormalizer::renumber returns invalid map #89).

  • Trim includes on files touched.

  • add test case on a scenario previously not covered

Signed-off-by: Uday Bondhugula [email protected]

- NFC - on any pass/utility logic/output.

- Resolve TODO; the method building loop trip count maps was
  creating and deleting affine.apply ops (transforming IR from under
  analysis!, strictly speaking). Introduce AffineValueMap::difference to
  do this correctly (without the need to create any IR).

- Move AffineApplyNormalizer out so that its methods are reusable from
  AffineStructures.cpp; add a helper method 'normalize' to it. Fix
  AffineApplyNormalize::renumberOneDim (Issue tensorflow#89).

- Trim includes on files touched.

- add test case on a scenario previously not covered

Signed-off-by: Uday Bondhugula <[email protected]>
tensorflow-copybara pushed a commit to tensorflow/tensorflow that referenced this pull request Sep 14, 2019
- NFC - on any pass/utility logic/output.

- Resolve TODO; the method building loop trip count maps was
  creating and deleting affine.apply ops (transforming IR from under
  analysis!, strictly speaking). Introduce AffineValueMap::difference to
  do this correctly (without the need to create any IR).

- Move AffineApplyNormalizer out so that its methods are reusable from
  AffineStructures.cpp; add a helper method 'normalize' to it. Fix
  AffineApplyNormalize::renumberOneDim (Issue #89).

- Trim includes on files touched.

- add test case on a scenario previously not covered

Signed-off-by: Uday Bondhugula <[email protected]>

Closes #133

COPYBARA_INTEGRATE_REVIEW=tensorflow/mlir#133 from bondhugula:trip-count-build 7fc34d857f7788f98b641792cafad6f5bd50e47b
PiperOrigin-RevId: 269101118
@bondhugula
bondhugula deleted the trip-count-build branch September 28, 2019 05:19
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Dec 24, 2019
- NFC - on any pass/utility logic/output.

- Resolve TODO; the method building loop trip count maps was
  creating and deleting affine.apply ops (transforming IR from under
  analysis!, strictly speaking). Introduce AffineValueMap::difference to
  do this correctly (without the need to create any IR).

- Move AffineApplyNormalizer out so that its methods are reusable from
  AffineStructures.cpp; add a helper method 'normalize' to it. Fix
  AffineApplyNormalize::renumberOneDim (Issue tensorflow/mlir#89).

- Trim includes on files touched.

- add test case on a scenario previously not covered

Signed-off-by: Uday Bondhugula <[email protected]>

Closes tensorflow/mlir#133

COPYBARA_INTEGRATE_REVIEW=tensorflow/mlir#133 from bondhugula:trip-count-build 7fc34d857f7788f98b641792cafad6f5bd50e47b
PiperOrigin-RevId: 269101118
chelini pushed a commit to LoopTactics/mlir that referenced this pull request Apr 16, 2020
This reverts commit 997f33c. Breaks check-mlir

******************** TEST 'MLIR :: IR/attribute.mlir' FAILED ********************
Script:
--
: 'RUN: at line 1';   mlir-opt llvm-project/mlir/test/IR/attribute.mlir -split-input-file -verify-diagnostics | /FileCheck llvm-project/mlir/test/IR/attribute.mlir
--
Exit Code: 1

Command Output (stderr):
--
llvm-project/mlir/test/IR/attribute.mlir split at line #1:19:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr'
  "test.int_attrs"() {
  ^
llvm-project/mlir/test/IR/attribute.mlir split at line tensorflow#120:6:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr'
  "test.int_attrs"() {
  ^
llvm-project/mlir/test/IR/attribute.mlir split at line tensorflow#120:5:6: error: expected error "'si32_attr' failed to satisfy constraint: 32-bit signed integer attribute" was not produced
  // expected-error @+1 {{'si32_attr' failed to satisfy constraint: 32-bit signed integer attribute}}
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvm-project/mlir/test/IR/attribute.mlir split at line tensorflow#133:5:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr'
  "test.int_attrs"() {
  ^
llvm-project/mlir/test/IR/attribute.mlir split at line tensorflow#133:4:6: error: expected error "'ui32_attr' failed to satisfy constraint: 32-bit unsigned integer attribute" was not produced
  // expected-error @+1 {{'ui32_attr' failed to satisfy constraint: 32-bit unsigned integer attribute}}
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvm-project/mlir/test/IR/attribute.mlir:9:12: error: CHECK: expected string not found in input
 // CHECK: any_i32_attr = 5 : ui32
           ^
<stdin>:3:1: note: scanning from here
module {
^
<stdin>:21:28: note: possible intended match here
 "test.non_negative_int_attr"() {i32attr = 5 : i32, i64attr = 10 : i64} : () -> ()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants