<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 18, 2016 at 10:55 AM, Gurunath Kadam via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am not sure if there is any CUDA/PTX instrumenting feature in LLVM.</div><div><br></div><div>I want to generated a simple memory trace and I know GPGPU Ocelot does that. But I was thinking why not LLVM.</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>So I am looking at two optimizations implemented in LLVM for CUDA for some inspiration.</div><div><br></div><div>1. Address inference: Does this use PTX IR or LLVM IR? I would say LLVM IR based on some code keywords like PHI nodes etc.</div><div><br></div><div>2. Bypass slow div: This is a generic optimization done adopted for CUDA. I think it uses LLVM IR.</div></div></blockquote><div><br></div><div>Both optimizations are IR-level. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>So my question is, to instrument PTX code, shall I focus on LLVM IR or PTX?</div></div></blockquote><div><br></div><div>Depending on what you want to trace. For memory tracing, instrumenting IR is probably enough, because there's an almost one-to-one mapping between a load/store in optimized IR and a load/store in PTX. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Some definite guidance on these lines will be very helpful. Thank you.</div><div><br></div><div>Sincerely,</div><div>Gurunath</div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>