<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000'><br><hr id="zwchr"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Sean Silva via llvm-dev" <llvm-dev@lists.llvm.org><br><b>To: </b>"Mehdi Amini" <mehdi.amini@apple.com><br><b>Cc: </b>"llvm-dev" <llvm-dev@lists.llvm.org><br><b>Sent: </b>Thursday, February 18, 2016 12:13:06 AM<br><b>Subject: </b>Re: [llvm-dev] RFC: Add bitcode tests to test-suite<br><br><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 17, 2016 at 9:55 PM, Mehdi Amini 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: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><br><div><span class=""><blockquote><div>On Feb 17, 2016, at 9:27 PM, Alina Sbirlea via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr"><div>>I think the real question is: Is this the best way to have a kind of 'halide buildbot' that can inform the LLVM developer community?<br><br></div><div>Halide already has a buildbot running every few hours which is being used to inform LLVM developer community when something breaks. It would be a lot more useful however to have the tests in an LLVM repository to inform LLVM devs which test broke right away. You're right that the underlying reason is the fact that Halide has test coverage of areas currently not covered.</div></div></div></blockquote><div><br></div></span><div>It is not clear to me why your "Halide buildbot" is not enough?</div><span class=""><br><blockquote><div><div dir="ltr">> As far as I can tell, Halide is < 100K LOC and has no external dependencies other than LLVM itself. I think we should just add it to the test suite. </div></div></blockquote><div><br></div></span><div><div>Which suite are we talking about? Is it <a href="https://llvm.org/svn/llvm-project/test-suite/trunk/" target="_blank">https://llvm.org/svn/llvm-project/test-suite/trunk/</a> ?</div><div><br></div></div><span class=""><blockquote><div><div dir="ltr">I realize that means the community updating it for API changes, </div></div></blockquote><div><br></div></span><div>The only project we are maintaining on top of LLVM is clang. </div><div>There is nothing in the test-suite repository that link to LLVM (AFAIK), changing this means to add a requirement to build the the test-suite when changing some API in LLVM (even for "NFC" changes).</div></div></div></blockquote><div><br></div><div id="DWT4648">Yeah, it is out of the question for us to wholesale import Halide and for us to take on any kind of maintenance burden for updating it.</div></div></div></div></blockquote>I disagree. Under the circumstances, the benefits of the added testing coverage might easily out weight the maintenance burden of updating it (especially, as I said, if the project developers are active in assisting). It might not, but I raised the point because it is certainly worth considering.<br><br> -Hal<br><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div><span class=""><div><br></div><blockquote><div><div dir="ltr">but if the additional test coverage is as significant as I suspect, and the project authors will help and are responsive, that seems worthwhile. It is a JIT and a heavy generator of vector code, two areas in which our story on regular upstream testing coverage is not great.<br></div></div></blockquote><div><br></div></span><div>Keeping Halide, and the Halide test-suite in a totally separate repository, with a continuous integration with LLVM trunk, provides the same coverage in practice.</div><div><br></div><div>Also the test-suite has a mechanism for "External" suites, which could be used here.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div></font></span><div><div class="h5"><div><br></div><br><blockquote><div><div dir="ltr">Halide can do both JIT and AOT compilation. Would the community be happy to have non-execution tests for the JITted tests and execution tests for the AOT ones? This would in theory use a small set of Halide and not need the entire library, which is what we are trying to avoid here.<div>The approach is meant to not clutter test-suite with a sizable amount of code but still get the test coverage offered by Halide.<br><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 17, 2016 at 8:53 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><hr id="zwchr"><br>
> From: "Chandler Carruth" <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>><br>
> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>>, "Alina Sbirlea" <<a href="mailto:alina.sbirlea@gmail.com" target="_blank">alina.sbirlea@gmail.com</a>><br>
> Cc: "llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
> Sent: Wednesday, February 17, 2016 9:34:24 PM<br>
> Subject: Re: [llvm-dev] RFC: Add bitcode tests to test-suite<br>
><br>
><br>
> Some perhaps relevant aspects that make testing users of LLVM like<br>
> Halide challenging:<br>
><br>
><br>
> Halide uses the LLVM C++ APIs, but there isn't a good way to<br>
> lock-step update it. So if we were to directly test Halide, it<br>
> wouldn't link against the new LLVM.<br>
><br>
><br>
> Practically speaking though, the LLVM IR generated by Halide should<br>
> continue to work with newer LLVM optimizations and code generation.<br>
> So the idea would be to snapshot the IR in bitcode (which is at<br>
> least reasonably stable) so that we could replay the tests as LLVM<br>
> changes. We can freshen the bitcode by re-generating it periodically<br>
> so it doesn't drift too far from what Halide actually uses.<br>
><br>
><br>
> The interesting questions IMO are:<br>
><br>
><br>
> 1) Are folks happy using bitcode as the format here? I agree with Hal<br>
> that it should be easy since Clang will actually Do The Right Thing<br>
> if given a bitcode input.<br>
><br>
><br>
> 2) Are folks happy with non-execution tests in some cases? I think<br>
> Alina is looking at whether we can get a runtime library that will<br>
> allow some of these to actually execute, but at least some of the<br>
> tests are just snap-shots of a JIT, and would need the full Halide<br>
> libraries (and introspection) to execute usefully.<br>
><br>
<br>
</div></div>As far as I can tell, Halide is < 100K LOC and has no external dependencies other than LLVM itself. I think we should just add it to the test suite. I realize that means the community updating it for API changes, but if the additional test coverage is as significant as I suspect, and the project authors will help and are responsive, that seems worthwhile. It is a JIT and a heavy generator of vector code, two areas in which our story on regular upstream testing coverage is not great.<br>
<span><font color="#888888"><br>
-Hal<br>
</font></span><span><br>
><br>
> -Chandler<br>
><br>
><br>
> On Wed, Feb 17, 2016 at 7:25 PM Hal Finkel via llvm-dev <<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> > wrote:<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</span><div><div>> From: "Alina Sbirlea via llvm-dev" < <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> ><br>
> To: "llvm-dev" < <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> ><br>
> Sent: Wednesday, February 17, 2016 7:25:17 PM<br>
> Subject: [llvm-dev] RFC: Add bitcode tests to test-suite<br>
><br>
><br>
><br>
><br>
><br>
><br>
> Hi all,<br>
><br>
><br>
> TL;DR: Add *.bc to test-suite; llc *.bc; run some.<br>
><br>
><br>
><br>
> We would like to propose adding bitcode tests to the llvm test-suite.<br>
><br>
><br>
> Recent LLVM bugs [2-4] prompted us to look into upstreaming a subset<br>
> of the tests the Halide library [1] is running and we'd like the<br>
> community's feedback on moving forward with this.<br>
><br>
><br>
><br>
> Halide uses LLVM and can generate bitcode, but we cannot add C++<br>
> tests to test-suite without including the library itself.<br>
> This proposal is also potentially useful for other cases where there<br>
> is no C++ front-end.<br>
><br>
><br>
> As a first step we are interested in adding a set of correctness<br>
> tests, for testing the IR without running the tests. Since these<br>
> tests are generated, they are not instrumented like the .ll files in<br>
> trunk, however we believe checking that llc runs without errors is<br>
> still useful.<br>
> The bitcode files for Halide may also be large, so including them as<br>
> regression tests is not an option. If the smaller tests are found to<br>
> be valuable or covering cases no other tests cover, we can<br>
> instrument them and move them into the llvm trunk further along, but<br>
> that is not the goal of this proposal.<br>
> In addition, we're not sure whether the format for the tests should<br>
> be .ll or .bc, we're open to either.<br>
><br>
><br>
> After this first step, we're interested in upstreaming bitcode tests<br>
> and also running them.<br>
> We are very interested in tests for multiple architectures, aarch64<br>
> in particular, since this is where we have seen things break. This<br>
> may motivate adding .ll files rather than .bc in order to include<br>
> the "RUN:" target.<br>
> Where would these tests reside and with what directory structure?<br>
> (similar to test/CodeGen?)<br>
><br>
><br>
> Suggestion on what's the best approach for extending the test-suite<br>
> framework for this proposal are more than welcome.<br>
><br>
><br>
><br>
> We already have architecture-specific tests in the test suite (e.g.<br>
> SingleSource/UnitTests/Vector/{SSE,Altivec,etc.}, and Clang can deal<br>
> with IR inputs. I suppose you need to compile some corresponding<br>
> runtime library, but this does not seem like a big deal either.<br>
> Mechanically, I don't see this as particularly complicated. I think<br>
> the real question is: Is this the best way to have a kind of 'halide<br>
> buildbot' that can inform the LLVM developer community?<br>
><br>
> -Hal<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> This is just the high-level overview to start off the discussion, I'm<br>
> sure there are many more aspects to touch on. Looking forward to<br>
> your feedback!<br>
><br>
><br>
><br>
> Thanks,<br>
> Alina<br>
><br>
><br>
> [1] http:// halide -<a href="http://lang.org/" rel="noreferrer" target="_blank">lang.org/</a><br>
> [2] Broken: r259800 => Fixed: r260131<br>
> [3] Broken: r260569 => Fixed: r260701<br>
><br>
> [4] <a href="https://llvm.org/bugs/show_bug.cgi?id=26642" rel="noreferrer" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=26642</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
><br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-dev</a><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</div></div></blockquote></div><br></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div></div></div><br></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br></blockquote><br><br><br>-- <br><div><span name="x"></span>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<span name="x"></span><br></div></div></body></html>