Posted Friday, 25 December, 2009 - 14:29 by nythrix
In general, you should check your device capabilities before launching any large data processing. For this purposes ComputeDevice exposes 50+ properties.
Tip of the day: "constant" and "local" memory are usually much smaller than "global". You can run out of those in no time.
I'm keeping an eye on this because the OutOfHostMemoryComputeException is an all time favourite even in my box.
Posted Friday, 25 December, 2009 - 17:50 by viewon01
Thanks for your advice,
I understand this... but what can I do ?
I have to pass 500.000 triangles to OpenCL to search for the triangle intersection !
I have use "constant" in order to "upload" all the triangle information at the startup... and not upload it... also it is important to have fast access to the triangle information and to the BVH (bounding volume hierarchy) information.
Posted Saturday, 26 December, 2009 - 20:24 by nythrix
If the data don't fit into constant or (worse) global memory you'll have to split them into smaller chunks which you can process the good old way: one after another. Unfortunately, this is an algorithm specific task and as such lies way beyond the scope of Cloo.
It will simply ensure that the buffer is released when :
1 - we forgot to call Dispose and that we free the reference to the resource
2 - we debug and stop the application (the dispose is not yet called, but finalize should be ?)
Posted Wednesday, 30 December, 2009 - 12:28 by viewon01
Right,
I have'nt see it :-)
Are you still working on your raytracer ? (What I'm currently working on too...). Have you find a way to shoot a "set of ray"... for opencl and not one ray at a time ?
Posted Wednesday, 30 December, 2009 - 19:58 by nythrix
I've been forced to put my hobby coding aside. Exams are all over me right now so no progress really. Besides, Cloo still has me quite involved.
As for your question. Raytracing basics tell us that every ray is independent on its neighbors. I'm not aware of any "many rays" vs "many primitives" algorithms and I'm not sure if they even exist.
However, I expect to see a big leap forward in this area once raytraced graphics becomes the next common light bulb.
Comments
Re: Cloo.OutOfHostMemoryComputeException
In general, you should check your device capabilities before launching any large data processing. For this purposes
ComputeDeviceexposes 50+ properties.Tip of the day: "constant" and "local" memory are usually much smaller than "global". You can run out of those in no time.
I'm keeping an eye on this because the OutOfHostMemoryComputeException is an all time favourite even in my box.
Re: Cloo.OutOfHostMemoryComputeException
Thanks for your advice,
I understand this... but what can I do ?
I have to pass 500.000 triangles to OpenCL to search for the triangle intersection !
I have use "constant" in order to "upload" all the triangle information at the startup... and not upload it... also it is important to have fast access to the triangle information and to the BVH (bounding volume hierarchy) information.
what solution I have ?
Thx
Re: Cloo.OutOfHostMemoryComputeException
If the data don't fit into constant or (worse) global memory you'll have to split them into smaller chunks which you can process the good old way: one after another. Unfortunately, this is an algorithm specific task and as such lies way beyond the scope of Cloo.
Re: Cloo.OutOfHostMemoryComputeException
Hi,
I think you should implement a finalizer on the class ComputeResource, like this :
~ ComputeResource()
{
// Simply call Dispose(false).
Dispose (false);
}
It will simply ensure that the buffer is released when :
1 - we forgot to call Dispose and that we free the reference to the resource
2 - we debug and stop the application (the dispose is not yet called, but finalize should be ?)
Take a look at the article :
http://msdn.microsoft.com/en-us/library/b1yfkh5e(VS.71).aspx
Re: Cloo.OutOfHostMemoryComputeException
The finalizer is present in the
ComputeResource. See here.Re: Cloo.OutOfHostMemoryComputeException
Right,
I have'nt see it :-)
Are you still working on your raytracer ? (What I'm currently working on too...). Have you find a way to shoot a "set of ray"... for opencl and not one ray at a time ?
Thanks
Re: Cloo.OutOfHostMemoryComputeException
I've been forced to put my hobby coding aside. Exams are all over me right now so no progress really. Besides, Cloo still has me quite involved.
As for your question. Raytracing basics tell us that every ray is independent on its neighbors. I'm not aware of any "many rays" vs "many primitives" algorithms and I'm not sure if they even exist.
However, I expect to see a big leap forward in this area once raytraced graphics becomes the next common light bulb.