# CUDA version Problem

**URL:** <https://discourse.itk.org/t/cuda-version-problem/6498>\
**Category:** Engineering\
**Created:** [March 7, 2024, 8:02am UTC](https://discourse.itk.org/t/cuda-version-problem/6498 "2024-03-07T08:02:47Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 14, 2024, 7:33am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/21 "2024-03-14T07:33:33Z")

</div>

> [@simon.rit](#):
>
> There is also a number of hard coded constants in RTK (tBlock\_x, tBlock\_y, tBlock\_z) which would benefit from being tuned for each architecture

thank you very much! i will try to set `RTK_CUDA_PROJECTIONS_SLAB_SIZE=32` and rebuild again.

---

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 14, 2024, 7:55am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/22 "2024-03-14T07:55:07Z")

</div>

4090

 ![企业微信截图_17104026581391](https://discourse.itk.org/uploads/default/original/2X/5/5cb4a5b64af4e3bb4f8df09bba5166a80afd6406.png)

A4000

 ![image](https://discourse.itk.org/uploads/default/original/2X/d/dd493ba074de6d807c9fa1e71442955e6b520cb7.png)  
it seems that there is no change,  
here is my cmake setting:  
 ![image](https://discourse.itk.org/uploads/default/original/2X/a/a15ce2e83aae642bc35aed148722e44448c175c5.png)

---

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 14, 2024, 8:34am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/23 "2024-03-14T08:34:55Z")

</div>

i have tried set RTK\_CUDA\_PROJECTIONS\_SLAB\_SIZE=64,but it doesn’t work,the timing information changes just a little bit .

 ![image](https://discourse.itk.org/uploads/default/original/2X/3/3c9312cff91377a056f5eeed32a4a53450ffe605.jpeg)

---

<div class="post-metadata">

**Author:** ![simon.rit](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@simon.rit](https://discourse.itk.org/u/simon.rit)\
**Post date:** [March 14, 2024, 12:34pm UTC](https://discourse.itk.org/t/cuda-version-problem/6498/24 "2024-03-14T12:34:41Z")

</div>

Something is not as expected, you still have 23 calls to the ramp filter and the backprojection. Have you recompiled RTK and your software?

---

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 15, 2024, 12:31am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/25 "2024-03-15T00:31:08Z")

</div>

> [@simon.rit](#):
>
> 23 calls to the ramp filter and the backprojecti

yes,i am sure i have recompiled RTK and software,and replace the new dlls to the software,you mean if change the setting and recompile RTK,ramp filter doesn’t have 23 calls?

---

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 15, 2024, 10:28am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/26 "2024-03-15T10:28:41Z")

</div>

![image](https://discourse.itk.org/uploads/default/original/2X/b/b44e0a436d4f4f7f84442d3a4115cb6e29fc7f6b.png)  
i have tried to recompile ITK and RTK,in ITK compiling,i notice this setting,it means use NVidia cuda fft with it’s fftw interface for fft computation,but when i choose it,compiling will show error,and there is no ITKFFT-5.4.dll,according to timing information,the problem may lies here.but how can i fix the compiling error?

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [March 15, 2024, 1:17pm UTC](https://discourse.itk.org/t/cuda-version-problem/6498/27 "2024-03-15T13:17:04Z")

</div>

To use RTK, you might not even need FFTW, much less its CUDA backend. I suggest to keep that option OFF, unless you are trying to improve it.

---

<div class="post-metadata">

**Author:** ![simon.rit](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@simon.rit](https://discourse.itk.org/u/simon.rit)\
**Post date:** [March 15, 2024, 4:12pm UTC](https://discourse.itk.org/t/cuda-version-problem/6498/28 "2024-03-15T16:12:28Z")

</div>

> [@skb](#):
>
> yes,i am sure i have recompiled RTK and software,and replace the new dlls to the software,you mean if change the setting and recompile RTK,ramp filter doesn’t have 23 calls?

Each call treats RTK\_CUDA\_PROJECTIONS\_SLAB\_SIZE projections at a time so modifying it should modify the number of calls. I don’t know what could be wrong here.

> [@dzenanz](#):
>
> To use RTK, you might not even need FFTW, much less its CUDA backend. I suggest to keep that option OFF, unless you are trying to improve it.

Correct, ITK\_USE\_CUFFTW should be useless here. This option has been added after I had implemented the Cuda version of the ramp filter.

---

<div class="post-metadata">

**Author:** ![skb](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@skb](https://discourse.itk.org/u/skb)\
**Post date:** [March 18, 2024, 12:37am UTC](https://discourse.itk.org/t/cuda-version-problem/6498/29 "2024-03-18T00:37:38Z")

</div>

ok.i got it,thank you!

[Previous page](https://discourse.itk.org/t/cuda-version-problem/6498.md?page=1)
