-
Notifications
You must be signed in to change notification settings - Fork 659
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
Uncaught Error: argument bit ratio not found #600
Comments
When you are using |
We need to throw more descriptive errors here. |
The problem is that you aren't passing in the second variable, |
What do you mean by "you aren't passing in the second variable"? |
I think I misspoke, I haven't had time to properly look into this. |
I'm experiencing this as well, when I pass an array more than a single function call from the kernel. addFunction(foo(array) {
return [array[0], array[1]]
})
addFunction(bar(array) {
return foo(array)
})
k = createKernal(function(array) {
foo(array) // totally fine
bar(array) // errs with "gpu-browser.js:6923 Uncaught Error: Bit ratio for argument objList not found in function bar"
})
k([1,2,3,4,5]) |
In "assignArgumentBitRatio" the index for "argumentBitRatios" should be the one of the function, not the kernel. Otherwise, you get a "bit ratio not found" error if you pass arguments to a function with a different order than they're passed to the kernel. Fix gpujs#600
What is wrong?
Adding certain custom functions causes the error:
Uncaught Error: argument bit ratio not found
Where does it happen?
Not system specific
How do we replicate the issue?
Setting
setGraphical(true)
causes the error for some reasonHow important is this (1-5)?
3 or 4 maybe?
Expected behavior (i.e. solution)
No error
Other Comments
In
FunctionBuilder.assignArgumentBitRatio
, replacingcalleeNode.argumentBitRatios[i]
withcalleeNode.argumentBitRatios[argumentIndex]
should fix the problem.Also, why does having a blank
return
statement cause an errorwhen there is no error with having no
return
statementsThe text was updated successfully, but these errors were encountered: