-
Notifications
You must be signed in to change notification settings - Fork 7
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
Revert 'reduce_avg' attribute from 'dim_arg' to 'dim' and update op_mapping #1129
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarify, can we update attribute names in the op definition as well? E.g.
forge/forge/op/reduce.py
c1fe80f
to
d6cbcf9
Compare
Correct me if I am wrong, but ReduceAvg seems to have correct namings (dim was not changed from dim_arg to dim here) |
|
|
Did you spot this line: def ReduceAvg(name: str, operandA: Tensor, dim: int, keep_dim: bool = True) -> Tensor:
"""
Reduce by averaging along the given dimension
Parameters
----------
name: str
Op name, unique to the module, or leave blank to autoset
operandA: Tensor
First operand
dim: int
Dimension along which to reduce. A positive number 0 - 3 or negative from -1 to -4.
Returns
-------
Tensor
Forge tensor
"""
assert (dim >= -4) and (dim <= 3)
# if dim < 0:
# dim += 4
return op("reduce_avg", name, operandA, attrs=(dim, keep_dim), dim_arg=[dim], keep_dim=keep_dim).get_tensor() |
d6cbcf9
to
5061845
Compare
Right, i missed that, thanks! |
|
|
Problem description
The previous change in PR #1101 modified the named attribute of
reduce_avg
fromdim
todim_arg
to align with tt-mlir naming conventions. However, this change has been identified as problematic and needs to be reverted.What's changed
This PR reverts the changes introduced in PR #1101, restoring the named attribute of
reduce_avg
back todim
. Additionally, theop_mapping
has been updated fromdim
todim_arg
to ensure compatibility with ttir.Checklist