The issue is not being reproduced on Windows (as tested by @TimmyLiu) or Linux. It is also not reproducible on OSX machines with just the one GPU. The problem only occurs when the context is created to handle both gpus (both nvidia and intel).
Looks like this is perhaps an OSX specific problem. We are trying to implement a work around in ArrayFire to use only one device per context.
This is related to: https://github.com/arrayfire/arrayfire/issues/338
The stand alone code can be found here: https://github.com/arrayfire/arrayfire/issues/338#issuecomment-71779619
The issue is not being reproduced on Windows (as tested by @TimmyLiu) or Linux. It is also not reproducible on OSX machines with just the one GPU. The problem only occurs when the context is created to handle both gpus (both nvidia and intel).
Looks like this is perhaps an OSX specific problem. We are trying to implement a work around in ArrayFire to use only one device per context.