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

Compiling uberv2 shader take too much time #148

Open
harokyang opened this issue May 24, 2018 · 5 comments
Open

Compiling uberv2 shader take too much time #148

harokyang opened this issue May 24, 2018 · 5 comments

Comments

@harokyang
Copy link

The latest build removed singleBRDF and only Uberv2 available
But in a large scene, Uberv2 shader take too long to be built

Test scene has about 300+ unique models all with different kind of material setting, and 2000+ instances of those models
The whole scene takes about 6GB RAM when fully loaded

It takes about 3-5 minutes to compile all required OpenCL shaders with NVIDIA GTX 1080Ti 11GB VRAM
And with the AMD Vega Frontier Edition 16GB VRAM, the shaders never finished(Waited for an hour)

If roll back to singleBRDF version, the compiling only takes about half a minute

@Kvalme
Copy link
Contributor

Kvalme commented May 24, 2018

Hi.
Can you share reproduction case with us?
If you can't share scene, you can enable kernel dump in Baikal and send us generated kernels.
(simply uncomment "//#define DUMP_PROGRAM_SOURCE 1" line in Baikal/Utils/cl_program.cpp, clean kernel cache and rerun application. It should generate several .cl files)

@harokyang
Copy link
Author

You can get dumps here
https://github.com/harokyang/RadeonProRender-Baikal/tree/208d93dc23aa214d2236b2e788c980f5b688dbd2/Baikal

Don't know why so many files dumped, some of them are identical to each other

There are almost 4000 case in each switch block
Is that suppose to happen?

@Kvalme
Copy link
Contributor

Kvalme commented May 30, 2018

Thanks you for sharing this.
We've merged change that reduces amount of such cases and should help with kernel compilation issue.
Can you check if it solves issue for you?

@harokyang
Copy link
Author

build time reduced from almost 3 mins to about 40 secs
switch cases reduced from almost 4000 to about 10
great improvement

@harokyang
Copy link
Author

Did another run
singleBRDF only takes 20s to compile while Uberv2 takes 50s

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

2 participants