-
-
Save bjacob/22dacb2681010578a024aa67c7e48846 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auto getProcAddress = [=](const char* sym_name) mutable { | |
| for (auto funcOp : moduleOp.getOps<mlir::FuncOp>()) { | |
| if (funcOp.sym_name() == sym_name) { | |
| return funcOp; | |
| } | |
| } | |
| llvm::errs() << "No function named `" << sym_name << "` in module.\n"; | |
| signalPassFailure(); | |
| return mlir::FuncOp(); | |
| }; | |
| FuncOps funcOps; | |
| funcOps.actual = getProcAddress("actual_matmul"); | |
| funcOps.expected = getProcAddress("expected_matmul"); | |
| funcOps.zeroMatrix = getProcAddress("zero_matrix"); | |
| funcOps.pseudorandomMatrix = getProcAddress("pseudorandom_matrix"); | |
| funcOps.identityMatrix = getProcAddress("identity_matrix"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment