Cannot call a function with two arguments from a triton kernel #1272
Unanswered
alexander-zinoviev
asked this question in
Q&A
Replies: 1 comment
-
The following code works for me at 5686c51. This issue may have been fixed. Can you try to run your program again?
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to write a triton kernel that in turn calls another function that takes multiple arguments. It is something similar to the leaky_relu in the matrix multiplication example https://triton-lang.org/master/getting-started/tutorials/03-matrix-multiplication.html.
The only difference is that I want "my_leaky_relu" to take 2 or more arguments not 1.
@triton.jit
def my_kernel(a_ptr, b_ptr):
my_function(a_ptr, b_ptr)
@triton.jit
def my_function(a_ptr, b_ptr):
return
What I get when I declare a function with two parameters and call it with two arguments is:
Function expects 1 arg(s), got 2 [wrong-arg-count]
Expected: ()
Actually passed: (, _)
and it looks that whatever number of parameters I declare on the function declaration the python compiler still thinks it has only one parameter.
Is there any limitation of parameters a callable can take?
Beta Was this translation helpful? Give feedback.
All reactions