Skip to content
Snippets Groups Projects
Commit f76aa827 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix __global__ in gpu kernels

parent 937ed939
No related branches found
No related tags found
1 merge request!445Object-Oriented CPU JIT API and Prototype Implementation
Pipeline #72863 passed
......@@ -375,11 +375,16 @@ class BasePrinter(ABC):
)
def print_signature(self, func: Kernel) -> str:
prefix = self._func_prefix
params_str = ", ".join(
f"{self._type_str(p.dtype)} {p.name}" for p in func.parameters
)
sig_parts = ([prefix] if prefix is not None else []) + ["void", func.name, f"({params_str})"]
from ...codegen import GpuKernel
sig_parts = [self._func_prefix] if self._func_prefix is not None else []
if isinstance(func, GpuKernel):
sig_parts.append("__global__")
sig_parts += ["void", func.name, f"({params_str})"]
signature = " ".join(sig_parts)
return signature
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment