<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi Valentin,</div><div><br></div><div>I haven't been able consistently to get line information of device code with `-g -O0`, sometimes `cuda-memcheck` can tell which line triggers the error but not always. `cuda-gdb` can only trace back to the kernel launch. Is `--cuda-noopt-device-debug` the option you mentioned to turn off ptxas optimisation? What's the difference between that and simply `-O0`?</div><div><br></div><div>Thanks for helping me out!</div><div><br></div>At 2018-12-15 06:48:23, "Valentin Churavy" <v.churavy@gmail.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="auto">If you only need line-information that information is already present and should be useful. As long as you set `-g` you should get some and there is a flag to turn ptxas optimisation off to preserve as much debuginformation as possible.<div dir="auto"><br></div><div dir="auto">You then can also run your code under cuda-memcheck</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018, 16:55 treinz <<a href="mailto:treinz@163.com">treinz@163.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Are you planning to release this as soon as it's ready or you want to make it into a major release? Is it possible to let me know (maybe by replying to this thread) once the code is ready? I know sometimes it takes a while to get things in the major release. I greatly appreciate your work on this!</div><div><br></div><div>Thanks,</div><div>Char<br></div><div style="zoom:1"></div><div id="m_-1530158221337457522divNeteaseMailCard"></div><br>ÔÚ 2018-12-15 05:19:50£¬"Alexey Bataev" <<a href="mailto:a.bataev@outlook.com" target="_blank" rel="noreferrer">a.bataev@outlook.com</a>> Ð´µÀ£º<br> <blockquote id="m_-1530158221337457522isReplyContent" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
  
    
  
  
    <div>Hi Char, sorry, you need to wait a little bit. It is almost
      ready, but not yet. For now, use nvcc if you need debug info for
      Cuda.<br>
      <br>
    </div>
    <pre class="m_-1530158221337457522moz-signature" cols="72">-------------
Best regards,
Alexey Bataev</pre>
    <div class="m_-1530158221337457522moz-cite-prefix">14.12.2018 14:33, treinz §á§Ú§ê§Ö§ä:<br>
    </div>
    <blockquote type="cite">
      
      <div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
        <div>Hi Alex, Eric and Valentin, <br>
        </div>
        <div><br>
        </div>
        <div>Thanks for the information. I don't mean to push this but
          I'm in desperate need of debugging some cuda code. I'm not
          familiar with the llvm internal but it sounds like there's at
          least line info now, right? If so, can you point me to a
          branch of llvm that can help tracing the bug down to certain
          line of code. I believe my bug is simply a write/read out of
          array boundary.<br>
        </div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Char<br>
        </div>
        <div><br>
        </div>
        ÔÚ 2018-12-05 07:15:28£¬"Alexey Bataev"
        <a class="m_-1530158221337457522moz-txt-link-rfc2396E" href="mailto:a.bataev@hotmail.com" target="_blank" rel="noreferrer"><a.bataev@hotmail.com></a> Ð´µÀ£º<br>
        <blockquote id="m_-1530158221337457522isReplyContent" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
          Hi, yes, these patches are required to have tne basic debug
          info support. At least 2 more patches are required to be able
          to get values of the variables without additional manual data
          type casting in cuda-gdb. <br>
          <br>
          <div id="m_-1530158221337457522AppleMailSignature" dir="ltr">Best regards,
            <div>Alexey Bataev</div>
          </div>
          <div dir="ltr"><br>
            4 §Õ§Ö§Ü. 2018 §Ô., §Ó 18:06, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank" rel="noreferrer">echristo@gmail.com</a>>
            §ß§Ñ§á§Ú§ã§Ñ§Ý(§Ñ):<br>
            <br>
          </div>
          <blockquote type="cite">
            <div dir="ltr">
              <div dir="ltr">
                <div>Adding Alexey here who has been driving this effort
                  in llvm.</div>
                <div><br>
                </div>
                There are about 5 patches waiting on my review:
                <div><br>
                </div>
                <div>
                  <div>   -: <a href="https://reviews.llvm.org/D54320" target="_blank" rel="noreferrer">https://reviews.llvm.org/D54320</a></div>
                  <div>   -: <a href="https://reviews.llvm.org/D46189" target="_blank" rel="noreferrer">https://reviews.llvm.org/D46189</a></div>
                  <div>   -: <a href="https://reviews.llvm.org/D51554" target="_blank" rel="noreferrer">https://reviews.llvm.org/D51554</a></div>
                  <div>   -: <a href="https://reviews.llvm.org/D46061" target="_blank" rel="noreferrer">https://reviews.llvm.org/D46061</a></div>
                  <div>   -: <a href="https://reviews.llvm.org/D45784" target="_blank" rel="noreferrer">https://reviews.llvm.org/D45784</a></div>
                  <div><br>
                  </div>
                  <div>After which I think we're good.</div>
                  <div><br>
                  </div>
                  <div>-eric</div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr">On Mon, Dec 3, 2018 at 6:29 PM
                      Valentin Churavy via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="auto">AFAIK there is work under way from
                        IBM (couple of PRs open), but yes Clang 7.0
                        doesn't produce the necessary information.</div>
                      <div dir="auto">
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">-V</div>
                      </div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr">On Fri, Nov 30, 2018, 14:58
                          treinz via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
                            <div>Hi all,</div>
                            <div>I found this <a href="http://lists.llvm.org/pipermail/llvm-dev/2017-November/118871.html" rel="noreferrer noreferrer" target="_blank">
http://lists.llvm.org/pipermail/llvm-dev/2017-November/118871.html</a>
                              when googling about compiling CUDA code
                              using llvm. Is it still the case that one
                              can't step into CUDA kernel code compiled
                              by llvm in cuda-gdb? I'm using clang 7.0.</div>
                            <div><br>
                            </div>
                            <div>Thanks,</div>
                            <div>Char<br>
                            </div>
                          </div>
                          <br>
                          <br>
                          <span title="neteasefooter">
                            <p> </p>
                          </span>_______________________________________________<br>
                          LLVM Developers mailing list<br>
                          <a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
                          <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
                        </blockquote>
                      </div>
                      _______________________________________________<br>
                      LLVM Developers mailing list<br>
                      <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
                      <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
                    </blockquote>
                  </div>
                </div>
              </div>
            </div>
          </blockquote>
        </blockquote>
      </div>
      <br>
      <br>
      <span title="neteasefooter">
        <p> </p>
      </span>
    </blockquote>
  

</blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div>
</blockquote></div><br><br><span title="neteasefooter"><p> </p></span>