-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix triangular_solve meta function out parameter names.
#140186
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/140186
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit bded981 with merge base ffb9790 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR replaces the parameter names specified in the `triangular_solve_meta`
function (specifically in its `out_wrapper(...)` decorator) by those written in the
_native_functions.yaml_ file.
This name mismatch caused the operation to fail when using the meta device (see error
below):
```python
Traceback (most recent call last):
File "examples/test.py", line 23, in <module>
torch.triangular_solve(b.to("meta"), A.to("meta"), out=meta_out)
File "torch/_decomp/__init__.py", line 100, in _fn
return f(*args, **kwargs, out=None if is_none else out_kwargs)
File "torch/_prims_common/wrappers.py", line 289, in _fn
result = fn(*args, **kwargs)
TypeError: triangular_solve_meta() got an unexpected keyword argument 'X'
```
ghstack-source-id: 1fa2de5
Pull Request resolved: #140186
This PR replaces the parameter names specified in the `triangular_solve_meta`
function (specifically in its `out_wrapper(...)` decorator) by those written in the
_native_functions.yaml_ file.
This name mismatch caused the operation to fail when using the meta device (see error
below):
```python
Traceback (most recent call last):
File "examples/test.py", line 23, in <module>
torch.triangular_solve(b.to("meta"), A.to("meta"), out=meta_out)
File "torch/_decomp/__init__.py", line 100, in _fn
return f(*args, **kwargs, out=None if is_none else out_kwargs)
File "torch/_prims_common/wrappers.py", line 289, in _fn
result = fn(*args, **kwargs)
TypeError: triangular_solve_meta() got an unexpected keyword argument 'X'
```
ghstack-source-id: 67cdf96
Pull Request resolved: #140186
|
what's with the new xfail? |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
So, before this PR, the meta consistency test wasn't failing because both meta and CPU devices were raising error. Different errors, though:
After fixing the meta error, meta stopped raising an error. Which means that it's not consistent with its CPU version anymore. The next PR in this stack fixes the consistency error, deleting the XFAIL. |
…140286) Tracking issue: #138399 Pull Request resolved: #140286 Approved by: https://github.com/ezyang ghstack dependencies: #140186
Tracking issue: #138399 This PR fixes a number of reference implementations (which are also used as meta functions), making them more consistent with CPU device. More specifically, it fixes those operations that use `_make_elementwise_unary_reference` decorator, and don't error on mismatching out argument dtype while they error when using concrete devices (e.g. CPU). The fixed operations are: - `abs` - `ceil` - `floor` - `frac` - `isneginf` - `isposinf` - `sgn` - `sign` - `signbit` - `trunc` Pull Request resolved: #140288 Approved by: https://github.com/ezyang ghstack dependencies: #140186, #140286
…0186) This PR replaces the parameter names specified in the `triangular_solve_meta` function (specifically in its `@out_wrapper(...)` decorator) by those written in the _native_functions.yaml_ file. This name mismatch caused the operation to fail when using the meta device (see error below): ```python Traceback (most recent call last): File "examples/test.py", line 23, in <module> torch.triangular_solve(b.to("meta"), A.to("meta"), out=meta_out) File "torch/_decomp/__init__.py", line 100, in _fn return f(*args, **kwargs, out=None if is_none else out_kwargs) File "torch/_prims_common/wrappers.py", line 289, in _fn result = fn(*args, **kwargs) TypeError: triangular_solve_meta() got an unexpected keyword argument 'X' ``` Pull Request resolved: pytorch#140186 Approved by: https://github.com/ezyang
…ytorch#140286) Tracking issue: pytorch#138399 Pull Request resolved: pytorch#140286 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#140186
Tracking issue: pytorch#138399 This PR fixes a number of reference implementations (which are also used as meta functions), making them more consistent with CPU device. More specifically, it fixes those operations that use `_make_elementwise_unary_reference` decorator, and don't error on mismatching out argument dtype while they error when using concrete devices (e.g. CPU). The fixed operations are: - `abs` - `ceil` - `floor` - `frac` - `isneginf` - `isposinf` - `sgn` - `sign` - `signbit` - `trunc` Pull Request resolved: pytorch#140288 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#140186, pytorch#140286
…h#140289) Tracking issue: pytorch#138399 Pull Request resolved: pytorch#140289 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#140186, pytorch#140286, pytorch#140288
Stack from ghstack (oldest at bottom):
log_softmax: fix meta function output argument dtype check. #140289triangular_solve: fix meta function output argument dtype check. #140286triangular_solvemeta function out parameter names. #140186This PR replaces the parameter names specified in the
triangular_solve_metafunction (specifically in its
@out_wrapper(...)decorator) by those written in thenative_functions.yaml file.
This name mismatch caused the operation to fail when using the meta device (see error
below):