<div dir="ltr"><div>Please stay on the mailing list! I don't answer emails if they are not on the mailing list.<br></div><div>Let me correct my two mistakes:</div><div>- wrong calculation. Your projections are 360*3008*2048 with type uint16 (2B) is 4.2 GB. with type float (what is sent to the GPU), it's 8.4 GB</div><div>- projections.GetCudaDataManager().GetGPUBufferPointer() should work, wrong copy pasting. Doing this transfers the data to the GPU (and you should see this 8.5 GB increase in GPU memory used)</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 12, 2024 at 11:05 AM ...... <<a href="mailto:1533168486@qq.com" target="_blank">1533168486@qq.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div>Hi,</div><div>Thank you for your reply. My projections data size is about 5.03GB not 16.5GB, and the capcity of my data like below:</div><div><div><div>  PixelContainer: </div><div>  Â  ImportImageContainer (0000023CBC7899E0)</div><div>  Â  Â  RTTI typeinfo:  Â class itk::ImportImageContainer<unsigned __int64,unsigned short></div><div>  Â  Â  Reference Count: 1</div><div>  Â  Â  Modified Time: 4091</div><div>  Â  Â  Debug: Off</div><div>  Â  Â  Object Name: </div><div>  Â  Â  Observers: </div><div>  Â  Â  Â  none</div><div>  Â  Â  Pointer: 0000023CBDC95040</div><div>  Â  Â  Container manages memory: true</div><div>  Â  Â  Size: 2702868480</div><div>  Â  Â  Capacity: 2702868480</div></div></div><div>When I run the code <font color="#ff0000">print(projections.GetOutput().GetCudaDataManager().GetGPUBufferPointer())</font> there apear the error: <font color="#ff0000">AttributeError: 'itkCudaImageF3' object has no attribute 'GetOutput'</font></div><div>I annotated this line of code to observe the usage of GPU, it seems seems that the GPU is not being used very much.</div><div><img src="cid:ii_18ed222de2f612f57832" id="m_6170684542274491693m_-6632141973489190221m_-5539715144848625470img_insert_171291231708702076665899686425"><br><img src="cid:ii_18ed222de2f7a44c7eb3" id="m_6170684542274491693m_-6632141973489190221m_-5539715144848625470img_insert_171291231884509028783548662482"><br><br></div><div><br></div><div><hr align="left" style="margin:0px 0px 10px;border-width:0px 0px 1px;border-style:none none solid;border-color:currentcolor currentcolor rgb(228,229,230);height:0px;line-height:0;font-size:0px;padding:20px 0px 0px;width:50px"><div style="font-size:14px;font-family:Verdana;color:rgb(0,0,0)"><a id="m_6170684542274491693m_-6632141973489190221m_-5539715144848625470in_alias" style="white-space:normal;display:inline-block;text-decoration:none;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei" href="https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=......&icon=http%3A%2F%2Fthirdqq.qlogo.cn%2Fg%3Fb%3Doidb%26k%3DaU2UicjBCZHhOuTg0I8eaAQ%26kti%3DZNG2GAAAAAI%26s%3D640%26t%3D1557079014&mail=1533168486%40qq.com&code=MxmxlJaC2QgJPGkeK0WWGn27E_Hxxdg4z_yHE18lRA4Xk7gMOGcWVLQlSeT63-65rHTBwEDtE8Q5X12n2MGehA" target="_blank"><table style="white-space:normal;table-layout:fixed;padding-right:20px" cellpadding="0" cellspacing="0"><tbody><tr valign="top"><td style="width:40px;min-width:40px;padding-top:10px"><div style="width:38px;height:38px;border:1px solid rgb(255,255,255);border-radius:50%;margin:0px;vertical-align:top"><img src="http://thirdqq.qlogo.cn/g?b=oidb&k=aU2UicjBCZHhOuTg0I8eaAQ&kti=ZNG2GAAAAAI&s=640&t=1557079014" style="width: 100%; height: 100%; border-radius: 50%;"></div></td><td style="padding:10px 0px 8px 10px"><div style="font-size:14px;color:rgb(51,49,46);line-height:20px;padding-bottom:2px;margin:0px;font-weight:500">......</div><div style="font-size:12px;color:rgb(153,152,150);line-height:18px;margin:0px">1533168486@qq.com</div></td></tr></tbody></table></a></div></div><div> </div><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0px">------------------ 原始邮件 ------------------</div><div style="font-size:12px;background:rgb(239,239,239);padding:8px"><div><b>发件人:</b>                                                                                                                        "Simon Rit"                                                                                    <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>;</div><div><b>发送时间:</b> 2024å¹´4月12æ—¥(星期五) ä¸‹åˆ3:26</div><div><b>收件人:</b> "......"<<a href="mailto:1533168486@qq.com" target="_blank">1533168486@qq.com</a>>;</div><div><b>抄送:</b> "rtk-users"<<a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a>>;</div><div><b>主题:</b> Re: [Rtk-users] reconstruction by cuda occur problem: ITK ERROR: CUDA ERROR: out of memory</div></div><div><br></div><div dir="ltr"><div>Hi,</div><div>Your projections alone are 16.5 GB on the GPU and the volume 2.6 GB before doing any calculation. Since your GPU has 24 GB memory, you're flirting with the limit, hence the issue I guess. I would suggest to add these lines before "# Field-of-view masking":</div><div>  os.system('nvidia-smi')</div><div>  print(projections.GetOutput().GetCudaDataManager().GetGPUBufferPointer())</div><div><div>  os.system('nvidia-smi')</div>  feldkamp.Update()</div><div><div>  os.system('nvidia-smi')</div><div>You'll most likely not reach the third nvidia-smi but you'll have a better understanding of the issue.</div><div>Simon<br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 12, 2024 at 8:59 AM ...... <<a href="mailto:1533168486@qq.com" target="_blank">1533168486@qq.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hello all,</div><div>I tried reconstruction my projection data by cudaFDK, and my data is 360*3008*2048 with type uint16. I set my output volumn size as 752*752*624. When I run my code with GPU(<span style="color:rgb(31,35,40)">GeForce RTX 4090</span>), <span style="color:rgb(31,35,40)">there appear the error:</span></div><div><span style="color:rgb(31,35,40)"> </span></div><img src="cid:ii_18ed222de2f1164db7f1" id="m_6170684542274491693m_-6632141973489190221m_-5539715144848625470m_3091037615717628198img_insert_1712884201023009094240546454713"><br><div><span style="color:rgb(31,35,40)">I checked the code execution process and during this period, the GPU's memory was still very sufficient. I reduce the size of my data to 360*1504*1024 and other items remain unchanged</span><font color="#1f2328" face="-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji">. This  code can run without error.</font></div><div><font color="#1f2328" face="-apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji">The attachment is my code. Any help will be appreciated.</font></div><div><span style="color:rgb(25,27,31)">Sincerely,</span></div><div><hr align="left" style="margin:0px 0px 10px;border-width:0px 0px 1px;border-style:none none solid;border-color:currentcolor currentcolor rgb(228,229,230);height:0px;line-height:0;font-size:0px;padding:20px 0px 0px;width:50px"><div style="font-size:14px;font-family:Verdana;color:rgb(0,0,0)"><a id="m_6170684542274491693m_-6632141973489190221m_-5539715144848625470m_3091037615717628198in_alias" style="white-space:normal;display:inline-block;text-decoration:none;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei" href="https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=......&icon=http%3A%2F%2Fthirdqq.qlogo.cn%2Fg%3Fb%3Doidb%26k%3DaU2UicjBCZHhOuTg0I8eaAQ%26kti%3DZNG2GAAAAAI%26s%3D640%26t%3D1557079014&mail=1533168486%40qq.com&code=MxmxlJaC2QgJPGkeK0WWGn27E_Hxxdg4z_yHE18lRA4Xk7gMOGcWVLQlSeT63-65rHTBwEDtE8Q5X12n2MGehA" target="_blank"><table style="white-space:normal;table-layout:fixed;padding-right:20px" cellpadding="0" cellspacing="0"><tbody><tr valign="top"><td style="width:40px;min-width:40px;padding-top:10px"><div style="width:38px;height:38px;border:1px solid rgb(255,255,255);border-radius:50%;margin:0px;vertical-align:top"><img src="http://thirdqq.qlogo.cn/g?b=oidb&k=aU2UicjBCZHhOuTg0I8eaAQ&kti=ZNG2GAAAAAI&s=640&t=1557079014" style="width: 100%; border-radius: 50%;"></div></td><td style="padding:10px 0px 8px 10px"><div style="font-size:14px;color:rgb(51,49,46);line-height:20px;padding-bottom:2px;margin:0px;font-weight:500">......</div><div style="font-size:12px;color:rgb(153,152,150);line-height:18px;margin:0px">1533168486@qq.com</div></td></tr></tbody></table></a></div></div><div> </div>_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a><br>
<a href="https://www.creatis.insa-lyon.fr/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://www.creatis.insa-lyon.fr/mailman/listinfo/rtk-users</a><br>
</blockquote></div></div></blockquote></div>