Error out when kernel function is not found while translating GPU calls.
PiperOrigin-RevId: 269327909
This commit is contained in:
parent
6755dfdec9
commit
1da0290c4b
|
@ -310,6 +310,10 @@ void GpuLaunchFuncToCudaCallsPass::translateGpuLaunchCalls(
|
|||
// represents the cubin at runtime.
|
||||
// TODO(herhut): This should rather be a static global once supported.
|
||||
auto kernelFunction = getModule().lookupSymbol<FuncOp>(launchOp.kernel());
|
||||
if (!kernelFunction) {
|
||||
launchOp.emitError("missing kernel function ") << launchOp.kernel();
|
||||
return signalPassFailure();
|
||||
}
|
||||
auto cubinGetter =
|
||||
kernelFunction.getAttrOfType<SymbolRefAttr>(kCubinGetterAnnotation);
|
||||
if (!cubinGetter) {
|
||||
|
|
Loading…
Reference in a new issue