-
Notifications
You must be signed in to change notification settings - Fork 16
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
Planning arbitrary Python functions #41
Comments
Hm, I agree that it would be useful. The question is the specific API though. I suppose that function will need a
That's weird, I tried a simple example, and it doesn't happen for me. Can you make a MRE? |
NVTX, while the idea I had in mind, may be a bad general example - since they're really just debugger flags, they take very simple inputs (a c-typed string) and return nothing. If I were doing a Computation "by hand", instead of using a plan, I'd just do
at the top and then call
and then the duration of the
Sure, gimme a bit. |
... Okay, after experimenting, it was actually an error on my end, though it's very weird. If you forget to specify a keyword in So, nevermind, I guess... |
Are you literally writing |
Ah, I was looking at the wrong documentation. Yes, |
Coming back to this - I've run into a more interesting use case, namely the entirety of existing CUDA library code. In particular, there's a number of cuBLAS and cuSPARSE functions I'd like to be able to use in my code. Planning arbitrary functions would let us use ctypes and similar to invoke those in planned computations - and similarly, would let us define and call |
It'd be nice if we could add a scheduled call to a function, to be executed only at runtime, to a plan. The particular use case I have in mind is using NVTX events and ranges, but now that it occurs to me it seems like something that might be generally useful.
(By the way, while
kernel_call
says that it defaults tofast_math=False
, for some reason whenever I have a C++ error thenvcc
command has the-use-fast-math
flag set...)-- Actually, related to that last, it'd be cool if we could require at planning time that our kernel be compiled with particular options. In particular,
-std=c++11
. I strongly suspect it would cut down on usage errors in that case in particular.The text was updated successfully, but these errors were encountered: