IntelLabs / ParallelAccelerator.jl

The ParallelAccelerator package, part of the High Performance Scripting project at Intel Labs
BSD 2-Clause "Simplified" License
294 stars 32 forks source link

Fuzz-test ParallelAccelerator against Julia tests #84

Open lkuper opened 8 years ago

lkuper commented 8 years ago

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.

ninegua commented 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.

lkuper commented 8 years ago

@ninegua Would the threading backend serve that purpose when the number of threads is set to 1?

DrTodd13 commented 8 years ago

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.

lkuper commented 8 years ago

@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?

tkelman commented 8 years ago

Does it need to be on function definitions, or can it be at call sites?

lkuper commented 8 years ago

@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?

tkelman commented 8 years ago

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.

tkelman commented 8 years ago

In that case you might be able to make a smaller modification to the @test macro and get somewhere.