Change call Scalar by reference#53467
Conversation
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 4a205aa (more details on the Dr. CI page):
🕵️ 24 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
| Job | Step | Action |
|---|---|---|
| Build | 🔁 rerun | |
| Build | 🔁 rerun | |
| Build | 🔁 rerun |
ci.pytorch.org: 2 failed
- Failed:
pr/caffe2-pytorch-linux-bionic-rocm4.0.1-py3.6-test - Failed:
pr/pytorch-linux-bionic-rocm4.0.1-py3.6
This comment was automatically generated by Dr. CI (expand for details).
Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group.
|
This PR/commit is based on #52825, with some removals. |
| options = direct_solve(options_ctype) | ||
| return f'{options}.pinned_memory_opt()' | ||
|
|
||
| elif isinstance(goal, OptionalCType) and goal.elem.type == "Scalar": |
There was a problem hiding this comment.
Looks like mypy complaints about type inference here: https://app.circleci.com/pipelines/github/pytorch/pytorch/282083/workflows/93049392-4333-49e7-bdac-3fad6954c5a0/jobs/11365785
Traceback (most recent call last):
File "test_type_hints.py", line 173, in test_run_mypy
self.fail(f"mypy failed: {stdout} {stderr}")
AssertionError: mypy failed: tools/codegen/api/translate.py:184:50: error: Item "OptionalCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:184:50: error: Item "ConstRefCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:184:50: error: Item "MutRefCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:185:20: error: Incompatible return value type (got "Union[str, SpecialArgName]", expected "str")
tools/codegen/api/translate.py:187:14: error: Item "OptionalCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:187:14: error: Item "ConstRefCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:187:14: error: Item "MutRefCType" of "Union[BaseCType, OptionalCType, ConstRefCType, MutRefCType]" has no attribute "type"
tools/codegen/api/translate.py:188:20: error: Incompatible return value type (got "Union[str, SpecialArgName]", expected "str")
Found 8 errors in 1 file (checked 20 source files)
cc @smessmer
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D26873799](https://our.internmc.facebook.com/intern/diff/D26873799) [ghstack-poisoned]
|
Reorganize the stack so there are only two PRs in the stack (see #53583) . Close PRs no longer exist in stack. |
Stack from ghstack:
Summary:
Based on #52825, with some removals.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D26873799