tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.74k stars 259 forks source link

affine expression print bug - parenthesis ellision #201

Closed bondhugula closed 5 years ago

bondhugula commented 5 years ago
$ cat /tmp/bug.mlir 
#map = (d0)[s0] -> ((-s0 floordiv 4) + 1024)
func @foo(memref<10xf32, #map>)

The above is printed with an extra left parenthesis.

$ mlir-opt /tmp/bug.mlir
#map0 = (d0)[s0] -> ((-s0 floordiv 4 + 1024)
module {
  func @foo(memref<10xf32, #map0>)
}
$ mlir-opt /tmp/bug.mlir  | mlir-opt
<stdin>:4:1: error: expected ',' or ')'
module {
^