Skip to content

Commit 03dc2a4

Browse files
authored
[MLIR] Update MLIR tutorial to use LDBG() macro (#150763)
1 parent 865dd27 commit 03dc2a4

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

mlir/docs/Tutorials/Toy/Ch-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ When processing an operation like described, we query if it registered the
445445

446446
```c++
447447
// Ask the operation to infer its output shapes.
448-
LLVM_DEBUG(llvm::dbgs() << "Inferring shape for: " << *op << "\n");
448+
LDBG() << "Inferring shape for: " << *op;
449449

450450
/// We check if an operation has a particular interface by casting.
451451
if (ShapeInference shapeOp = dyn_cast<ShapeInference>(op)) {

mlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "llvm/ADT/STLExtras.h"
2424
#include "llvm/ADT/SmallPtrSet.h"
2525
#include "llvm/Support/Casting.h"
26-
#include "llvm/Support/Debug.h"
26+
#include "llvm/Support/DebugLog.h"
2727
#include "llvm/Support/raw_ostream.h"
2828
#include <memory>
2929

@@ -81,7 +81,7 @@ struct ShapeInferencePass
8181
opWorklist.erase(op);
8282

8383
// Ask the operation to infer its output shapes.
84-
LLVM_DEBUG(llvm::dbgs() << "Inferring shape for: " << *op << "\n");
84+
LDBG() << "Inferring shape for: " << *op;
8585
if (auto shapeOp = dyn_cast<ShapeInference>(op)) {
8686
shapeOp.inferShapes();
8787
} else {

mlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "llvm/ADT/STLExtras.h"
2424
#include "llvm/ADT/SmallPtrSet.h"
2525
#include "llvm/Support/Casting.h"
26-
#include "llvm/Support/Debug.h"
26+
#include "llvm/Support/DebugLog.h"
2727
#include "llvm/Support/raw_ostream.h"
2828
#include <memory>
2929

@@ -81,7 +81,7 @@ struct ShapeInferencePass
8181
opWorklist.erase(op);
8282

8383
// Ask the operation to infer its output shapes.
84-
LLVM_DEBUG(llvm::dbgs() << "Inferring shape for: " << *op << "\n");
84+
LDBG() << "Inferring shape for: " << *op;
8585
if (auto shapeOp = dyn_cast<ShapeInference>(op)) {
8686
shapeOp.inferShapes();
8787
} else {

mlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "llvm/ADT/STLExtras.h"
2424
#include "llvm/ADT/SmallPtrSet.h"
2525
#include "llvm/Support/Casting.h"
26-
#include "llvm/Support/Debug.h"
26+
#include "llvm/Support/DebugLog.h"
2727
#include "llvm/Support/raw_ostream.h"
2828
#include <memory>
2929

@@ -81,7 +81,7 @@ struct ShapeInferencePass
8181
opWorklist.erase(op);
8282

8383
// Ask the operation to infer its output shapes.
84-
LLVM_DEBUG(llvm::dbgs() << "Inferring shape for: " << *op << "\n");
84+
LDBG() << "Inferring shape for: " << *op;
8585
if (auto shapeOp = dyn_cast<ShapeInference>(op)) {
8686
shapeOp.inferShapes();
8787
} else {

mlir/examples/toy/Ch7/mlir/ShapeInferencePass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "llvm/ADT/STLExtras.h"
2424
#include "llvm/ADT/SmallPtrSet.h"
2525
#include "llvm/Support/Casting.h"
26-
#include "llvm/Support/Debug.h"
26+
#include "llvm/Support/DebugLog.h"
2727
#include "llvm/Support/raw_ostream.h"
2828
#include <memory>
2929

@@ -81,7 +81,7 @@ struct ShapeInferencePass
8181
opWorklist.erase(op);
8282

8383
// Ask the operation to infer its output shapes.
84-
LLVM_DEBUG(llvm::dbgs() << "Inferring shape for: " << *op << "\n");
84+
LDBG() << "Inferring shape for: " << *op;
8585
if (auto shapeOp = dyn_cast<ShapeInference>(op)) {
8686
shapeOp.inferShapes();
8787
} else {

0 commit comments

Comments
 (0)