Open harokyang opened 6 years ago
Solved it Have to add more memories to make it work Don't know why but OpenCL require a huge amount of RAM to compile the kernel In my 16GB test environment, the scene data consumed about 7~8GB RAM after loaded During the compilation(clBuildProgram call), OpenCL ate 6+GB RAM and failed when there is no more to feed it with the NVIDIA card On the other hand, the AMD card will fight for the system reserved memory, so it may finish the compilation, but RAM view of the resource monitor will go roller coaster for a very long time
After switch to my 64GB machine, everything goes fine
Is that the normal behavior of OpenCL? I am considering to unload the scene before compiling the kernel then load the scene again if really needed
Another question Does the generated kernel depend on the scene data? Or does it only depend on the materials loaded?
If it's the second case, perhaps we can load materials first, then build kernel, then load scene data and compute the space structure, to ease the memory usage
Rendering a fully decorated indoor scene Uberv2 material generated too many inputmap cases It seems there is a limit to the case number, if exceeded, will unable to be build clBuildProgram report CL_OUT_OF_RESOURCES if that happened
Tested with NVIDIA Quadro P6000/Tesla M60/GeForce 1080Ti, all failed Tested with AMD Vega Frontier, may pass the build, but took more then 10 mins to finish
In all test cases, none of the RAM usage reach 8GB, and none of the VRAM usage reach 3GB The physical memory resources are totally sufficient