How can we use array of 10000 rows and 10000 cols (instead of rows =10 and rows =5) with AleaGpu ?
private void button3_Click(object sender, EventArgs e)
{
var worker = Worker.Default;
const int rows = 10;
const int cols = 5;
var rng = new Random();
var inputs = new double[rows, cols];
for (var row = 0; row < rows; ++row)
{
for (var col = 0; col < cols; ++col)
{
inputs[row, col] = rng.Next(1, 100);
}
}
var dInputs = worker.Malloc(inputs);
var dOutputs = worker.Malloc<double>(rows, cols);
var lp = new LaunchParam(1, 1);
worker.Launch(Kernel, lp, dOutputs.Ptr, dInputs.Ptr, rows, cols);
var outputs = new double[rows, cols];
dOutputs.Gather(outputs);
Assert.AreEqual(inputs, outputs);
}
if I use rows = 10000 and cols = 10000 (instead of rows =10 and rows =5) :
I get an error "An unhandled exception of type 'Alea.CUDA.CUDAInterop.CUDAException' occurred in Alea.CUDA.dll" in the function : public static void Gather(this DeviceMemory dmem, T[,] array2D) :
dmem.Worker.EvalAction(() =>
{
CUDAInterop.cuSafeCall(CUDAInterop.cuMemcpyDtoH(hostPtr, devicePtr,
new IntPtr(Intrinsic.__sizeof<T>() * rows * cols)));
});
How Can I remove this error ?