Skip to content

Move BroadcastOp folding to a seperate TTIR pass. #1978

Move BroadcastOp folding to a seperate TTIR pass.

Move BroadcastOp folding to a seperate TTIR pass. #1978

GitHub Actions / MLIR Tests failed Nov 22, 2024 in 0s

318 tests run, 303 passed, 13 skipped, 2 failed.

Annotations

Check failure on line 8 in ttmlir/Dialect/TTNN/arange

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Dialect/TTNN/arange.arange_tests_positive.mlir

Exit Code: 2
Raw output
Exit Code: 2

Command Output (stderr):
--
RUN: at line 1: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir | /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir
+ /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir
/__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir:8:10: error: Redundant ttnn::ToLayoutOp - no ttnn layout ops needed, this may be due to the forcing of tile/row major layouts.
    %2 = "ttir.multiply"(%arg0, %1, %dps) <{operandSegmentSizes = array<i32: 2, 1>, operand_constraints = [#any_device, #any_device, #any_device]}> : (tensor<1x32x128x128xf32>, tensor<1x32x128x128xf32>, tensor<1x32x128x128xf32>) -> tensor<1x32x128x128xf32>
         ^
/__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir:8:10: note: see current operation: %9 = "ttnn.to_layout"(%6, %0) <{dtype = #tt.supportedDataTypes<f32>, layout = #ttnn.layout<tile>, memory_config = #ttnn.memory_config<<interleaved>, <dram>, <<1x1>>>}> : (tensor<1x32x1x1xf32, #ttnn.ttnn_layout<(d0, d1, d2, d3) -> (d0 * 32 + d1 + d2, d3), <1x1>, memref<1x1x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, interleaved>>, !tt.device<<workerGrid = #tt.grid<8x8, (d0, d1) -> (0, d0, d1)>, l1Map = (d0, d1)[s0, s1] -> (0, d0 floordiv s0, d1 floordiv s1, (d0 mod s0) * s1 + d1 mod s1), dramMap = (d0, d1)[s0, s1] -> (0, 0, ((((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) floordiv 8192) mod 12, (((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) floordiv 98304 + (((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) mod 8192), meshShape = , chipIds = [0]>>) -> tensor<1x32x1x1xf32, #ttnn.ttnn_layout<(d0, d1, d2, d3) -> (d0 * 32 + d1 + d2, d3), <1x1>, memref<1x1x!tt.tile<32x32, f32>, #ttnn.buffer_type<dram>>, interleaved>>
ttmlir-opt: /__w/tt-mlir/tt-mlir/lib/Dialect/TTNN/Transforms/Passes.cpp:874: void mlir::tt::ttnn::TTNNDecomposeLayouts::createLayoutConversionOps(ttnn::ToLayoutOp, IRRewriter &) const: Assertion `isCreationValid(op, input, output, opsToCreate) && "Invalid layout conversion"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir
 #0 0x00007f1863e6095c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/ttmlir-toolchain/lib/libLLVM.so.20.0git+0xe5495c)
 #1 0x00007f1863e60d86 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f1862ae9520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f1862b3d9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007f1862ae9476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007f1862acf7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00007f1862acf71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #7 0x00007f1862ae0e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #8 0x0000562f4b6d7874 mlir::tt::ttnn::TTNNDecomposeLayouts::createLayoutConversionOps(mlir::tt::ttnn::ToLayoutOp, mlir::IRRewriter&) const (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x128a874)
 #9 0x0000562f4b6d7351 mlir::tt::ttnn::TTNNDecomposeLayouts::runOnOperation() (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x128a351)
#10 0x0000562f4c1939a4 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) Pass.cpp:0:0
#11 0x0000562f4c18ffa6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d42fa6)
#12 0x0000562f4c1903ab mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d433ab)
#13 0x0000562f4c191cbc mlir::PassManager::run(mlir::Operation*) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d44cbc)
#14 0x0000562f4b37d3f0 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#15 0x0000562f4b37d0be llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#16 0x0000562f4c2a21f5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1e551f5)
#17 0x0000562f4b3797c9 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2c7c9)
#18 0x0000562f4b3799fe mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2c9fe)
#19 0x0000562f4b379ba4 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2cba4)
#20 0x0000562f4a6af2ff main (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x2622ff)
#21 0x00007f1862ad0d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#22 0x00007f1862ad0e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#23 0x0000562f4a6af1e5 _start (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x2621e5)
FileCheck error: '<stdin>' is empty.
FileCheck command line:  /opt/ttmlir-toolchain/bin/FileCheck /__w/tt-mlir/tt-mlir/test/ttmlir/Dialect/TTNN/arange/arange_tests_positive.mlir

--

Check failure on line 10 in ttmlir/Silicon/TTNN/arange

See this annotation in the file changed.

@github-actions github-actions / MLIR Tests

ttmlir/Silicon/TTNN/arange.simple_device_arange_dim2.mlir

Exit Code: 134
Raw output
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=" /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir > /__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/arange/Output/simple_device_arange_dim2.mlir.tmp.mlir
+ /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline=system-desc-path= /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir
/__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir:10:10: error: Redundant ttnn::ToLayoutOp - no ttnn layout ops needed, this may be due to the forcing of tile/row major layouts.
    %2 = "ttir.multiply"(%arg0, %0, %1) <{operandSegmentSizes = array<i32: 2, 1>, operand_constraints = [#any_device, #any_device, #any_device]}> : (tensor<1x1x32x128xbf16>, tensor<1x1x32x128xbf16>, tensor<1x1x32x128xbf16>) -> tensor<1x1x32x128xbf16>
         ^
/__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir:10:10: note: see current operation: %7 = "ttnn.to_layout"(%4, %0) <{dtype = #tt.supportedDataTypes<bf16>, layout = #ttnn.layout<tile>, memory_config = #ttnn.memory_config<<interleaved>, <dram>, <<1x1>>>}> : (tensor<1x1x32x1xbf16, #ttnn.ttnn_layout<(d0, d1, d2, d3) -> (d0 * 32 + d1 * 32 + d2, d3), <1x1>, memref<1x1x!tt.tile<32x32, bf16>, #ttnn.buffer_type<dram>>, interleaved>>, !tt.device<<workerGrid = #tt.grid<8x8, (d0, d1) -> (0, d0, d1)>, l1Map = (d0, d1)[s0, s1] -> (0, d0 floordiv s0, d1 floordiv s1, (d0 mod s0) * s1 + d1 mod s1), dramMap = (d0, d1)[s0, s1] -> (0, 0, ((((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) floordiv 8192) mod 12, (((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) floordiv 98304 + (((d0 floordiv s0) * 8 + d1 floordiv s1) * (s1 * s0) + (d0 mod s0) * s1 + d1 mod s1) mod 8192), meshShape = , chipIds = [0]>>) -> tensor<1x1x32x1xbf16, #ttnn.ttnn_layout<(d0, d1, d2, d3) -> (d0 * 32 + d1 * 32 + d2, d3), <1x1>, memref<1x1x!tt.tile<32x32, bf16>, #ttnn.buffer_type<dram>>, interleaved>>
ttmlir-opt: /__w/tt-mlir/tt-mlir/lib/Dialect/TTNN/Transforms/Passes.cpp:874: void mlir::tt::ttnn::TTNNDecomposeLayouts::createLayoutConversionOps(ttnn::ToLayoutOp, IRRewriter &) const: Assertion `isCreationValid(op, input, output, opsToCreate) && "Invalid layout conversion"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline=system-desc-path= /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir
 #0 0x00007f2d7f9b295c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/ttmlir-toolchain/lib/libLLVM.so.20.0git+0xe5495c)
 #1 0x00007f2d7f9b2d86 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f2d7e63b520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f2d7e68f9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007f2d7e63b476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007f2d7e6217f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x00007f2d7e62171b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #7 0x00007f2d7e632e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #8 0x000055a9d594f874 mlir::tt::ttnn::TTNNDecomposeLayouts::createLayoutConversionOps(mlir::tt::ttnn::ToLayoutOp, mlir::IRRewriter&) const (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x128a874)
 #9 0x000055a9d594f351 mlir::tt::ttnn::TTNNDecomposeLayouts::runOnOperation() (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x128a351)
#10 0x000055a9d640b9a4 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_1>(long) Pass.cpp:0:0
#11 0x000055a9d6407fa6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d42fa6)
#12 0x000055a9d64083ab mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d433ab)
#13 0x000055a9d6409cbc mlir::PassManager::run(mlir::Operation*) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1d44cbc)
#14 0x000055a9d55f53f0 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#15 0x000055a9d55f50be llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#16 0x000055a9d651a1f5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x1e551f5)
#17 0x000055a9d55f17c9 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2c7c9)
#18 0x000055a9d55f19fe mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2c9fe)
#19 0x000055a9d55f1ba4 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0xf2cba4)
#20 0x000055a9d49272ff main (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x2622ff)
#21 0x00007f2d7e622d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#22 0x00007f2d7e622e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#23 0x000055a9d49271e5 _start (/__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt+0x2621e5)
/__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/arange/Output/simple_device_arange_dim2.mlir.script: line 3:  8547 Aborted                 (core dumped) /__w/tt-mlir/tt-mlir/build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline="system-desc-path=" /__w/tt-mlir/tt-mlir/test/ttmlir/Silicon/TTNN/arange/simple_device_arange_dim2.mlir > /__w/tt-mlir/tt-mlir/build/test/ttmlir/Silicon/TTNN/arange/Output/simple_device_arange_dim2.mlir.tmp.mlir

--