[Mlir-commits] [mlir] [MLIR][NVVM] Add binaryCallback (PR #170853)

Guray Ozen llvmlistbot at llvm.org
Wed Dec 10 11:39:15 PST 2025


================
@@ -521,6 +524,15 @@ NVPTXSerializer::compileToBinary(const std::string &ptxCode) {
                                                 /*ErrMsg=*/&message))
     return emitLogError("`fatbinary`");
 
+  if (binaryCallback) {
+    llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> logBuffer =
+        llvm::MemoryBuffer::getFile(logFile->first);
+    if (logBuffer && !(*logBuffer)->getBuffer().empty()) {
+      StringRef logRef = (*logBuffer)->getBuffer();
+      binaryCallback(logRef);
----------------
grypp wrote:

For completeness, I think we should at least have a callback like in this PR from the binary compiler.

https://github.com/llvm/llvm-project/pull/170853


More information about the Mlir-commits mailing list