[all-commits] [llvm/llvm-project] 998003: [mlir] Fix for MSVC bool splat issue encountered.

Kevin Gleason via All-commits all-commits at lists.llvm.org
Mon Jul 24 21:04:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 998003eaf7b91b5620eeb0b77c81654b9f36efb7
      https://github.com/llvm/llvm-project/commit/998003eaf7b91b5620eeb0b77c81654b9f36efb7
  Author: Kevin Gleason <gleasonk at google.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M mlir/lib/IR/AttributeDetail.h
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/unittests/IR/AttributeTest.cpp

  Log Message:
  -----------
  [mlir] Fix for MSVC bool splat issue encountered.

When building MLIR using bazel on windows with MSVC2019, bool splats
were being created incorrectly:

```
dense<[true,true,true,true]> : tensor<4xi1>
-(parse with mlir-opt)-> dense<[true, false, false, false]> : tensor<4xi1>
```

Appears that a Windows bazel build produces a corrupt DenseIntOrFPElementsAttr.
Unable to repro using MSVC and cmake.

Issue first discovered here:
https://github.com/google/jax/issues/16394

Added test point for reproduction:

```
$ bazel test @llvm-project//mlir/unittests:ir_tests --test_arg=--gtest_filter=DenseSplatTest.BoolSplatSmall
```

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




More information about the All-commits mailing list