Does CUDA support recursion?

前端 未结 12 2490
广开言路
广开言路 2020-12-08 06:31

Does CUDA support recursion?

相关标签:
12条回答
  • 2020-12-08 06:56

    Even though it only supports recursion for specific chips, you can sometimes get away with "emulated" recursion: see how I used compile-time recursion for my CUDA raytracer.

    0 讨论(0)
  • 2020-12-08 06:57

    Yes, see the NVIDIA CUDA Programming Guide:

    device functions only support recursion in device code compiled for devices of compute capability 2.0.

    You need a Fermi card to use them.

    0 讨论(0)
  • 2020-12-08 06:58

    Yes, it does support recursion. However, it is not a good idea to do recursion on GPU. Because each thread is going to do it.

    0 讨论(0)
  • 2020-12-08 06:59

    In CUDA 4.1 release CUDA supports recursion only for __device__ function but not for __global__ function.

    0 讨论(0)
  • 2020-12-08 07:02

    If your algorithm invovles alot of recursions, then support or not, it is not designed for GPUs, either redesign your algorthims or get a better CPU, either way it will be better (I bet in many cases, maginitudes better) then do recurisons on GPUs.

    0 讨论(0)
  • 2020-12-08 07:03

    Tried just now on my pc with a NVIDIA GPU with 1.1 Compute capability. It says recursion not yet supported. So its not got anything to do with the runtime but the hardware itself

    0 讨论(0)
提交回复
热议问题