diff --git a/pybuda/csrc/passes/mlir_compiler.cpp b/pybuda/csrc/passes/mlir_compiler.cpp index bda168640..37e8b84e9 100644 --- a/pybuda/csrc/passes/mlir_compiler.cpp +++ b/pybuda/csrc/passes/mlir_compiler.cpp @@ -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();