-
Notifications
You must be signed in to change notification settings - Fork 64
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
Some basic example with Kernel #21
Comments
Yeah I'll get round to doing that. |
It is better to give two examples. One is quite simple, to understand the basics, and one more complex, to understand where to move on. |
I'm here 2 years later ... Any examples? |
maybe this test file can serve as an example 🤔 ? |
Thank you! This is exactly what I need! |
I got a working kernel here tl;dr: The order of operations which seems to be working is:
reduceCUDA()
destroyCUDA()
the kernel itself is in the kernel/ subdir, compiled to .ptx as this:
the kernel does have a sort of main function:
Hope this serves as a solid example to the next person. |
hey @neurlang do you want to put this in a PR as an example? |
pushing hashtron kernel to the main cu repo doesn't feel right. it would shift the maintenance burden to you, i still need to tweak the kernel sometimes, etc. I think I will keep it in my repo instead. Anyone can look there anyway. Speaking of this repo (gorgonia/cu), I would prefer to put here more testcases which stress the code paths related to my kernel, to make sure that hashtron behavior is not broken here accidentally by you or by someone, now that it works pretty stable. On the other hand, now that we (or simply me) know how to make a CU kernel, it would be a good idea to write it to the gorgonia.github.io site as a tutorial to make a CU kernel. I'll open a separate issue on there instead. |
Hi!
Please provide some basic example how to work with this library properly.
How to create basic Kernel and use it into computation with GPU.
Thanks!
The text was updated successfully, but these errors were encountered: