NVIDIA/numbast

Error when using functions with unnamed arguments

Open

#168 aberto em 13 de ago. de 2025

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)C (22 forks)github user discovery
good first issue

Métricas do repositório

Stars
 (62 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

I have this code

struct Foo {
  int x;
  __device__ Foo(int y) : x(y) {}
};

__device__ bool useFoo(Foo) { // note that the parameter is not named
  return true;
}
@cuda.jit
def kernel():
  useFoo(Foo(1))

kernel[1,1]()

This generates the following error:

E   cuda.core.experimental._utils.cuda_utils.NVRTCError: 6: NVRTC_ERROR_COMPILATION, compilation log:
E
E   <unnamed-cu>(11): error: expected an expression
E             retval = useFoo(*);
E                              ^
E
E   1 error detected in the compilation of "<unnamed-cu>".
E

Guia do colaborador