Skip to content

Commit a1096c1

Browse files
authored
Mark our PTX kernels as kernels, to stop them from being stripped (#8571)
* Mark our PTX kernels as kernels, to stop them from being stripped
1 parent 0227580 commit a1096c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CodeGen_PTX_Dev.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ void CodeGen_PTX_Dev::add_kernel(Stmt stmt,
156156
}
157157
}
158158

159+
function->setCallingConv(llvm::CallingConv::PTX_Kernel);
160+
159161
// Make the initial basic block
160162
entry_block = BasicBlock::Create(*context, "entry", function);
161163
builder->SetInsertPoint(entry_block);

0 commit comments

Comments
 (0)