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

gpu: kernel lookup is slow #13

Open
Ulfgard opened this issue May 28, 2018 · 1 comment
Open

gpu: kernel lookup is slow #13

Ulfgard opened this issue May 28, 2018 · 1 comment

Comments

@Ulfgard
Copy link
Member

Ulfgard commented May 28, 2018

This is an issue in boost.compute but i do not see it solved any time soon. Anyways, we would need for that version of boost.compute to be adopted on a broader scale to rely on it.

The issue is that a kernel lookup is slow, ~1ms, even if the program is already compiled and cached. compute only caches the programs, not the kernel. Thus, we have to cache the kernels as well - this is not a problem as most programs only have one kernel. so we just have to instantiate the kernel after the program is generated and cache both together.

@Ulfgard
Copy link
Member Author

Ulfgard commented May 29, 2018

we could maybe get around all that caching by using

static thread_local kernel k = create_my_kernel(...);

this would create the kernel exactly once per thread. I am not sure whether generating a lot of kernels might lead to problems in driver implementation. I have not found any information on that. but it is unlikely that there would be a hard limit.

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