[Mlir-commits] [mlir] a297340 - [mlir] Fix stack-use-after-scope in cuda/vulkan cpu runners
Eugene Zhulenev
llvmlistbot at llvm.org
Tue Oct 27 17:26:20 PDT 2020
Author: Eugene Zhulenev
Date: 2020-10-27T17:26:08-07:00
New Revision: a297340d9ef868662f6ac096001963c34862e367
URL: https://github.com/llvm/llvm-project/commit/a297340d9ef868662f6ac096001963c34862e367
DIFF: https://github.com/llvm/llvm-project/commit/a297340d9ef868662f6ac096001963c34862e367.diff
LOG: [mlir] Fix stack-use-after-scope in cuda/vulkan cpu runners
+fix rocm runner
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D90274
Added:
Modified:
mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
index cfffaaa13126..cdadf3d145a3 100644
--- a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
+++ b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
@@ -138,7 +138,7 @@ int main(int argc, char **argv) {
mlir::initializeLLVMPasses();
mlir::JitRunnerConfig jitRunnerConfig;
- jitRunnerConfig.mlirTransformer = &runMLIRPasses;
+ jitRunnerConfig.mlirTransformer = runMLIRPasses;
return mlir::JitRunnerMain(argc, argv, jitRunnerConfig);
}
diff --git a/mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp b/mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
index 8cd391a0be46..2277ecca34d2 100644
--- a/mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
+++ b/mlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
@@ -334,5 +334,9 @@ int main(int argc, char **argv) {
LLVMInitializeAMDGPUAsmPrinter();
mlir::initializeLLVMPasses();
- return mlir::JitRunnerMain(argc, argv, &runMLIRPasses);
+
+ mlir::JitRunnerConfig jitRunnerConfig;
+ jitRunnerConfig.mlirTransformer = runMLIRPasses;
+
+ return mlir::JitRunnerMain(argc, argv, jitRunnerConfig);
}
diff --git a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
index cc0f503f9a50..5deb52c763a6 100644
--- a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
+++ b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
@@ -87,8 +87,8 @@ int main(int argc, char **argv) {
mlir::initializeLLVMPasses();
mlir::JitRunnerConfig jitRunnerConfig;
- jitRunnerConfig.mlirTransformer = &runMLIRPasses;
- jitRunnerConfig.llvmModuleBuilder = &convertMLIRModule;
+ jitRunnerConfig.mlirTransformer = runMLIRPasses;
+ jitRunnerConfig.llvmModuleBuilder = convertMLIRModule;
return mlir::JitRunnerMain(argc, argv, jitRunnerConfig);
}
diff --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
index 322f9491bb42..8b00bae2c8a5 100644
--- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
+++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
mlir::initializeLLVMPasses();
mlir::JitRunnerConfig jitRunnerConfig;
- jitRunnerConfig.mlirTransformer = &runMLIRPasses;
+ jitRunnerConfig.mlirTransformer = runMLIRPasses;
return mlir::JitRunnerMain(argc, argv, jitRunnerConfig);
}
More information about the Mlir-commits
mailing list