For boolean tensors, this currently uses addi, which is inconsistent with numpy. Numpy uses saturating arithmetic.
np.array([True]) + np.array([True])
array([ True])
Paths
| Differential D129313
Fix linalg.dot over boolean tensors. AbandonedPublic Authored by jreiffers on Jul 7 2022, 11:39 AM.
Details
Summary For boolean tensors, this currently uses addi, which is inconsistent with numpy. Numpy uses saturating arithmetic.
array([ True])
Diff Detail
Revision Contents
Diff 443004 mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/test/Dialect/Linalg/loops.mlir
|