-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MLIR][NVVM] Print ptxas path in debug output for "serialize-to-binary" #132373
Conversation
@llvm/pr-subscribers-mlir-llvm @llvm/pr-subscribers-mlir-gpu Author: Guray Ozen (grypp) ChangesFull diff: https://github.com/llvm/llvm-project/pull/132373.diff 2 Files Affected:
diff --git a/mlir/lib/Target/LLVM/NVVM/Target.cpp b/mlir/lib/Target/LLVM/NVVM/Target.cpp
index fa8c597da58b1..69a247b06bf16 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -455,6 +455,7 @@ NVPTXSerializer::compileToBinary(const std::string &ptxCode) {
LLVM_DEBUG({
llvm::dbgs() << "Tool invocation for module: "
<< getOperation().getNameAttr() << "\n";
+ llvm::dbgs() << "ptxas executable:" << ptxasCompiler.value() << "\n";
llvm::interleave(ptxasArgs, llvm::dbgs(), " ");
llvm::dbgs() << "\n";
if (createFatbin) {
diff --git a/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir b/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
index 34dde6e03c80e..f65eda6a2a88d 100644
--- a/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
+++ b/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
@@ -16,6 +16,7 @@ func.func @host_function(%arg0 : f32, %arg1 : memref<?xf32>) {
return
}
+// CHECK: ptxas executable:
// CHECK: ptxas -arch sm_80
// CHECK-SAME: -v
// CHECK-SAME: --register-usage-level=8
|
@llvm/pr-subscribers-mlir Author: Guray Ozen (grypp) ChangesFull diff: https://github.com/llvm/llvm-project/pull/132373.diff 2 Files Affected:
diff --git a/mlir/lib/Target/LLVM/NVVM/Target.cpp b/mlir/lib/Target/LLVM/NVVM/Target.cpp
index fa8c597da58b1..69a247b06bf16 100644
--- a/mlir/lib/Target/LLVM/NVVM/Target.cpp
+++ b/mlir/lib/Target/LLVM/NVVM/Target.cpp
@@ -455,6 +455,7 @@ NVPTXSerializer::compileToBinary(const std::string &ptxCode) {
LLVM_DEBUG({
llvm::dbgs() << "Tool invocation for module: "
<< getOperation().getNameAttr() << "\n";
+ llvm::dbgs() << "ptxas executable:" << ptxasCompiler.value() << "\n";
llvm::interleave(ptxasArgs, llvm::dbgs(), " ");
llvm::dbgs() << "\n";
if (createFatbin) {
diff --git a/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir b/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
index 34dde6e03c80e..f65eda6a2a88d 100644
--- a/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
+++ b/mlir/test/Integration/GPU/CUDA/command-line-arg.mlir
@@ -16,6 +16,7 @@ func.func @host_function(%arg0 : f32, %arg1 : memref<?xf32>) {
return
}
+// CHECK: ptxas executable:
// CHECK: ptxas -arch sm_80
// CHECK-SAME: -v
// CHECK-SAME: --register-usage-level=8
|
@@ -16,6 +16,7 @@ func.func @host_function(%arg0 : f32, %arg1 : memref<?xf32>) { | |||
return | |||
} | |||
|
|||
// CHECK: ptxas executable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm puzzled that we have this test in-tree, in general we never test debug output, and I don't understand how is this test passing in release mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I add a test for every code I write, so I probably added these test automatically :)
This is a CUDA integration test. Perhaps we don't run CUDA integration tests in release mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible, can you remove it please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed from this PR.
I have written other tests as well for debug runs. let me put a new PR that removes them all.
No description provided.