Open lkuper opened 8 years ago
Would it be useful to have an alternative backend that lowers parallel IR into sequential for loop? This way we won't be limited by CGen, and can focus on testing the functionality of the compiler itself.
@ninegua Would the threading backend serve that purpose when the number of threads is set to 1?
There is already testing code in there that converts parfors into explicitly called function. All we'd need to do is to elevate that code to its own "mode" controlled by some option.
@tkelman As someone who knows a lot about the Julia testing infrastructure, do you know if there's an easy way to hook into the Julia test suite and instrument it with @acc
wrappers around the tests being run?
Does it need to be on function definitions, or can it be at call sites?
@tkelman Hmm, good question. The recommended way of using it is on function definitions. You can use it at call sites, but we were actually talking about deprecating allowing that. How hard would it be to put it on definitions?
You'd need to put the annotation on all the standard library functions that get called in the tests, I think. Making ParallelAccelerator work during bootstrap could be tricky.
In that case you might be able to make a smaller modification to the @test
macro and get somewhere.
To figure out how robust ParallelAccelerator is, one useful thing to do would be to "fuzz" ParallelAccelerator against the Julia test suite. The idea would be to wrap each test call in an
@acc
block and see whether ParallelAccelerator can handle the code. We'd expect not to be able to handle a lot of these.