-
Notifications
You must be signed in to change notification settings - Fork 16
Add pt.(zeros|ones)_like #604
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
base: main
Are you sure you want to change the base?
Conversation
Hi @inducer,
Any preferences on how many of them we should fix and how should we skip? Thanks |
See latest commit, I just disabled those warnings for the tests. Some of them may disappear if/when pyopencl gets typed. |
Thanks! |
pytato/cmath.py
Outdated
|
||
return _apply_elem_wise_func( | ||
(a,), | ||
"zero_of", |
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.
We should add some discussion of this in design.rst
(and point to it here), since it is a bit non-obvious.
03b2f46
to
c0388d5
Compare
# Eliminate dead-code to prevent from unnecessary communication arising | ||
# from the unused sub-expressions. | ||
outputs_ = eliminate_dead_code(outputs) | ||
assert isinstance(outputs_, DictOfNamedArrays) | ||
outputs = outputs_ | ||
del outputs_ |
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.
Use typing.cast
in eliminate_dead_code
.
No description provided.