-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Impossible to generate random numbers with constexpr seed #3390
Comments
cc @manman-ren |
I will try to triage this later this afternoon. If anyone wants to take a look before, feel free! |
This "help wanted" label looks new :] @jlebar |
I can reproduce with top of trunk. With a simple fix
It works, the error is because we can't apply "to(tl.uint64)" to a constexpr. The fix (which I am not sure if it is correct) is to copy the constexpr to another variable and apply "to(tl.uint64)" on the variable. |
|
- Otherwise, frontend crashes for non-tensor arguments.
Can be fixed by inserting to_tensor in philox, but maybe ast visiter should automatically insert a to_tensor call when we are about to get a attribute access error? |
That might be difficult. You could have a string or other objects as a |
Then in the AST visitor, you'll have to check if the constexpr's value is an integer or a float, only then you can convert to a tensor |
…riton-lang#3396) - Otherwise, frontend crashes for non-tensor arguments. Fixes triton-lang#3390
yields
The text was updated successfully, but these errors were encountered: