Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CL_OUT_OF_RESOURCES error from clBuildProgram #170

Open
harokyang opened this issue Jul 3, 2018 · 3 comments
Open

CL_OUT_OF_RESOURCES error from clBuildProgram #170

harokyang opened this issue Jul 3, 2018 · 3 comments

Comments

@harokyang
Copy link

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

@harokyang
Copy link
Author

harokyang commented Jul 3, 2018

passed
failed

The first cl script pass the build, but the second failed
The only difference between them is that the second scene loaded one more model with several materials attached

@harokyang
Copy link
Author

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

@harokyang
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant