summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp')
-rw-r--r--mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp b/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
index 9d7aeeb6321..022d8c70cc6 100644
--- a/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
+++ b/mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
@@ -64,8 +64,8 @@ public:
LLVMInitializeNVPTXTargetMC();
LLVMInitializeNVPTXAsmPrinter();
- for (auto &function : getModule()) {
- if (!gpu::GPUDialect::isKernel(&function) || function.isExternal()) {
+ for (auto function : getModule()) {
+ if (!gpu::GPUDialect::isKernel(function) || function.isExternal()) {
continue;
}
if (failed(translateGpuKernelToCubinAnnotation(function)))
@@ -142,7 +142,7 @@ GpuKernelToCubinPass::translateGpuKernelToCubinAnnotation(Function &function) {
std::unique_ptr<Module> module(builder.createModule());
// TODO(herhut): Also handle called functions.
- module->getFunctions().push_back(function.clone());
+ module->push_back(function.clone());
auto llvmModule = translateModuleToNVVMIR(*module);
auto cubin = convertModuleToCubin(*llvmModule, function);
OpenPOWER on IntegriCloud