Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#132: Added ability to load system desc file into mlir tests or defau… #289

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

tapspatel
Copy link
Contributor

…lt to original parameters

lib/Dialect/TT/IR/TTOpsTypes.cpp Outdated Show resolved Hide resolved
runtime/lib/ttmetal/runtime.cpp Outdated Show resolved Hide resolved
runtime/lib/ttnn/runtime.cpp Outdated Show resolved Hide resolved
@tapspatel tapspatel self-assigned this Aug 5, 2024
@tapspatel tapspatel force-pushed the tpatel/issue-132 branch 3 times, most recently from 44076d9 to cdba469 Compare August 5, 2024 16:08
@tapspatel tapspatel requested a review from nsmithtt August 5, 2024 16:09
Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more minor change, (add the static_asserts), but otherwise looks good and we can merge! Thanks

lib/Dialect/TT/IR/TTOpsTypes.cpp Show resolved Hide resolved
@tapspatel tapspatel merged commit 5dc6d82 into main Aug 5, 2024
6 checks passed
@kmabeeTT
Copy link
Contributor

kmabeeTT commented Aug 6, 2024

Hey @tapspatel , a bit new here, but a command I got from Jackson (to generate a flat buffer?) is no longer working for me after this change, does it make sense? Works at the commit before this merge.


./build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline test/ttmlir/Dialect/TTNN/simple_subtract.mlir | ./build/bin/ttmlir-translate --ttnn-to-flatbuffer -o out.ttnn
ttmlir-opt: /localdev/kmabee/mlir1/lib/Dialect/TTIR/Transforms/Passes.cpp:44: virtual void mlir::tt::ttir::TTIRImplicitDevice::runOnOperation(): Assertion `module->hasAttr(tt::SystemDescAttr::name)' failed.


PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: ./build/bin/ttmlir-opt --ttir-to-ttnn-backend-pipeline test/ttmlir/Dialect/TTNN/simple_subtract.mlir
 #0 0x00007f51de3f3a0b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/ttmlir-toolchain/lib/libLLVM.so.18.1rc+0xf41a0b)
 #1 0x00007f51de3f1b6e llvm::sys::RunSignalHandlers() (/opt/ttmlir-toolchain/lib/libLLVM.so.18.1rc+0xf3fb6e)
 #2 0x00007f51de3f2d39 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f51e93a4420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #4 0x00007f51dcfb500b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #5 0x00007f51dcf94859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #6 0x00007f51dcf94729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #7 0x00007f51dcfa5fd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #8 0x000055627d46ea72 mlir::tt::ttir::TTIRImplicitDevice::runOnOperation() (./build/bin/ttmlir-opt+0x27f3a72)
 #9 0x000055627d58b7c2 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::'lambda0'()>(long) Pass.cpp:0:0
#10 0x000055627d58a1c4 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./build/bin/ttmlir-opt+0x290f1c4)
#11 0x000055627d58a34a mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./build/bin/ttmlir-opt+0x290f34a)
#12 0x000055627d58a4a5 mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) (./build/bin/ttmlir-opt+0x290f4a5)
#13 0x000055627d58a78c mlir::PassManager::run(mlir::Operation*) (./build/bin/ttmlir-opt+0x290f78c)
#14 0x000055627cad6924 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#15 0x000055627cad6e00 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPool*) MlirOptMain.cpp:0:0
#16 0x000055627cad6ee0 mlir::LogicalResult llvm::function_ref<mlir::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&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#17 0x000055627d6bccfb mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) (./build/bin/ttmlir-opt+0x2a41cfb)
#18 0x000055627cad3e74 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./build/bin/ttmlir-opt+0x1e58e74)
#19 0x000055627cad70e7 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./build/bin/ttmlir-opt+0x1e5c0e7)
#20 0x000055627cad727b mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./build/bin/ttmlir-opt+0x1e5c27b)
#21 0x000055627bbea7e5 main (./build/bin/ttmlir-opt+0xf6f7e5)
#22 0x00007f51dcf96083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#23 0x000055627bbea6de _start (./build/bin/ttmlir-opt+0xf6f6de)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.


@tapspatel
Copy link
Contributor Author

@kmabeeTT hey sorry you need to add this pass: --ttir-load-system-desc. I'll add it into the pipeline

vladimirjovanovicTT added a commit that referenced this pull request Aug 13, 2024
Modified transpose tests to match PR #289.
vladimirjovanovicTT added a commit that referenced this pull request Aug 15, 2024
@tapspatel tapspatel deleted the tpatel/issue-132 branch August 30, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load system desc pass
4 participants