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

Config struct + reductions #419

Closed
wants to merge 7 commits into from
Closed

Config struct + reductions #419

wants to merge 7 commits into from

Conversation

brabreda
Copy link

@brabreda brabreda commented Sep 1, 2023

This pull request introduces:

  • a config object that can be used to use specific features depending on a backend.
  • reduction API

Another idea would be to include ndrange in this config object. With this, we would be able to base the kernellaunch on this object so no need to define groupsize and ndrange again.

@vchuravy
Copy link
Member

vchuravy commented Sep 1, 2023

Thank you, this is interesting. A couple quick comments:

  1. The dependency relationship between GPUArrays and KernelAbstractions should be inverted. E.g. KA should be a dependency of GPUArrays and used there to implement map reduce.
  2. The new functionality requires tests and documentation.
  3. How does Config differ from Kernel? Could we merge them into the same steuct?

@brabreda
Copy link
Author

brabreda commented Sep 1, 2023

I will fix the first 2 points.

For me, config is rather a way of defining an algorithm rather than the kernel. For example max_ndrange does not represent the maximum amount of threads that the GPU supports. It just tells that the shouldn't be more thread as it may impact the performance for that operation.

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

Successfully merging this pull request may close these issues.

2 participants