Skip to content

Commit

Permalink
Adding context option to print mlir stactrace on error
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjordjevicTT committed Aug 16, 2024
1 parent 0afb0f4 commit 3bcfe05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pybuda/csrc/passes/mlir_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ namespace tt::passes

// Create a context with all registered dialects.
mlir::MLIRContext context(registry);

#ifdef DEBUG
// Context setting to have mlir print out stacktrace whenever errors occur
context.printStackTraceOnDiagnostic(true);
#endif

// Load all available dialects
context.loadAllAvailableDialects();

Expand Down

0 comments on commit 3bcfe05

Please sign in to comment.