Repository navigation
Closed
Description
With patch #11980
iree-compile --output-format=vm-bytecode \
--iree-hal-target-backends=llvm-cpu \
--iree-input-type=tosa \
--iree-llvm-target-triple=aarch64-none-linux-android29 \
--iree-flow-enable-data-tiling \
--iree-flow-enable-fuse-padding-into-linalg-consumer-ops \
--iree-llvmcpu-enable-pad-consumer-fusion \
iree_58855e40-eba9-4a71-b878-6b35e3460244_MobileNetV3Small_fp32.mlir Error message:
iree-compile: /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/include/llvm/ADT/SmallBitVector.h:460: bool llvm::SmallBitVector::operator[](unsigned int) co
nst: Assertion `Idx < size() && "Out-of-bounds Bit access."' failed.
Please report issues to https://github.com/iree-org/iree/issues and include the crash backtrace.
Stack dump:
0. Program arguments: ./tools/iree-compile --output-format=vm-bytecode --iree-hal-target-backends=llvm-cpu --iree-input-type=tosa --iree-llvm-target-triple=aarch64-none-lin
ux-android29 --iree-flow-enable-data-tiling --iree-flow-enable-fuse-padding-into-linalg-consumer-ops --iree-llvmcpu-enable-pad-consumer-fusion e2e_test_artifacts/iree_58855e40-e
ba9-4a71-b878-6b35e3460244_MobileNetV3Small_fp32.mlir
#0 0x00007f40df614457 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/lib/Support/Unix/Signals.inc:567
:13
#1 0x00007f40df6126c0 llvm::sys::RunSignalHandlers() /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/lib/Support/Signals.cpp:105:18
#2 0x00007f40df614ada SignalHandler(int) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/lib/Support/Unix/Signals.inc:412:1
#3 0x00007f40d6a5af90 (/lib/x86_64-linux-gnu/libc.so.6+0x3bf90)
#4 0x00007f40d6aa9ccc __pthread_kill_implementation ./nptl/./nptl/pthread_kill.c:44:76
#5 0x00007f40d6a5aef2 raise ./signal/../sysdeps/posix/raise.c:27:6
#6 0x00007f40d6a45472 abort ./stdlib/./stdlib/abort.c:81:7
#7 0x00007f40d6a45395 _nl_load_domain ./intl/./intl/loadmsgcat.c:1177:9
#8 0x00007f40d6a53df2 (/lib/x86_64-linux-gnu/libc.so.6+0x34df2)
#9 0x00007f40df447a82 llvm::SmallVectorTemplateCommon<unsigned long, void>::operator[](unsigned long) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/incl
ude/llvm/ADT/SmallVector.h:294:5
#10 0x00007f40df447a82 llvm::BitVector::reference::reference(llvm::BitVector&, unsigned int) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/include/llvm/A
DT/BitVector.h:99:18
#11 0x00007f40df447a82 llvm::BitVector::operator[](unsigned int) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/include/llvm/ADT/BitVector.h:439:12
#12 0x00007f40df447a82 llvm::SmallBitVector::operator[](unsigned int) const /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/include/llvm/ADT/SmallBitVector
.h:463:26
#13 0x00007f40df447a82 llvm::SmallBitVector::test(unsigned int) const /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/llvm/include/llvm/ADT/SmallBitVector.h:473
:12
#14 0x00007f40df447a82 mlir::compressDims(mlir::AffineMap, llvm::SmallBitVector const&) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/mlir/lib/IR/AffineMap.cp
p:579:20
#15 0x00007f40df4492b6 mlir::getProjectedMap(mlir::AffineMap, llvm::SmallBitVector const&) /usr/local/google/home/cheyuw/iree/iree/third_party/llvm-project/mlir/lib/IR/AffineMap
.cpp:746:10
#16 0x00007f40dc061dc3 mlir::iree_compiler::IREE::Flow::hasCompatibleOuterParallelLoops(mlir::OpOperand&, llvm::SmallBitVector const&) /usr/local/google/home/cheyuw/iree/iree/co
mpiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp:368:7
#17 0x00007f40dc061dc3 mlir::iree_compiler::IREE::Flow::areOpsAggresiveFusable(mlir::Operation*, mlir::Operation*, llvm::SmallBitVector const&, bool)::$_11::operator()(mlir::OpO
perand*) const /usr/local/google/home/cheyuw/iree/iree/compiler/src/iree/compiler/Dialect/Flow/Transforms/FormDispatchRegions.cpp:411:16
Metadata
Metadata
Assignees
Labels
No labels
Activity
pzread commentedon Feb 20, 2023
The
iree_linalg_ext.unset_encodingis marked as root op, and the assertion failed when checking if the consumer%89 = linalg.genericis fusable, because we don't handle the root parallel loop forunset_encodingingetOuterParallelLoopsMaheshRavishankar commentedon Feb 21, 2023
@pzread . Thanks for looking into it. Btw, do you know why the %88 and %89 arent fused?
pzread commentedon Feb 21, 2023
Good point. I think it's because the consumer
%89uses the producer%88twice in its inputs (generated during the process of elementwise fusion) and we have this check:iree/compiler/src/iree/compiler/Dialect/Flow/Transforms/FusionOfTensorOps.cpp
Line 49 in 78940a2
Didn't recall the exact reason for that check but I can dig a little more.
allieculp commentedon Apr 19, 2023
@pzread Any update on this one?
Populate outer parallel loops for UnsetEncodingOp (#12289)
pzread commentedon Jul 13, 2023
I'll file another issue to see if we can relax this restriction.
pzread commentedon Jul 14, 2023
Tracked in #14407
Populate outer parallel loops for UnsetEncodingOp (iree-org#12289)