triton
triton copied to clipboard
[Frontend] [BC breaking] Always follow C semantics on %
The semantics of % in triton used to be type dependant (!!).
With this PR, we make % always follow C semantics, similar to //.
We update the type promotion docs fixing some inaccuracies. It is still not entirely precise though. For a discussion of the current semantics see https://github.com/triton-lang/triton/issues/4697
I left this aside for now, prioritising the mxfp stuff, as this is lower prio. It shouldn't take long too long to land tho.
Hello, I was wondering what more is left of this task? I'm happy to pick it up if this is a task that is still lower priority.
I've looked through the failed tests and interpreter code to get a better understanding of what is happening. I could be wrong about this assumption but it seems that the create_frem function needs to have special cases to handle the new semantics? Similar to how the create_idiv is created to follow C semantics.
It pretty much just needs to make the tests more resilient. Many tests rely on UB and things that should not be tested. I think it shouldn't be terribly difficult to get it though the finish line. I don't think I'll be able to shepherd you, but if you think you can do it (and given what you have said, I think you are), feel free to take on it and tag me as a reviewer once you have a PR up :)
Sweet, I'll take a crack at it then!
Will land in https://github.com/triton-lang/triton/pull/4955