0
votes

In a numba cuda kernel, I know that we can define local and shared arrays. Also the all the variable assignments in a kernel go to the registers for a particular thread. Is it possible to declare a register array using numba cuda? Something similar to the following which would be used in CUDA C kernel?

register float accumulators[32];
1
That wouldn't do what you suggest in CUDA C and there isn't a way to do it in Numba either - talonmies

1 Answers

1
votes

It is not possible.

The register keyword is only a hint to the compiler, and it has essentially no effect in CUDA C/C++. The device code compiler will make decisions about what to put in registers based on its heuristics to generate fast code, not this instruction from the programmer.