-
Notifications
You must be signed in to change notification settings - Fork 267
[query] no sharing in utilities #15520
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4399,7 +4399,7 @@ def reshape(self, *shape): | |
| for i, tuple_field_type in enumerate(shape.dtype.types): | ||
| if tuple_field_type not in [hl.tint32, hl.tint64]: | ||
| raise TypeError(f"Argument {i} of reshape needs to be an integer, got {tuple_field_type}.") | ||
| shape_ir = hl.or_missing(hl.is_defined(shape), hl.tuple([hl.int64(i) for i in shape]))._ir | ||
| shape_ir = hl.bind(lambda s: hl.or_missing(hl.is_defined(s), hl.tuple([hl.int64(i) for i in s])), shape)._ir | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While not recomputing
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this duplicate work? if anything it should do less work as we are evaluating/binding |
||
| ndim = len(shape) | ||
| else: | ||
| wrapped_shape = wrap_to_list(shape) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Inlining
Constantscan lead to significantIRbloat fromLiterals andEncodedLiteral.We don't have
Simplifyrules that match on either literal type and so I'm unaware of any reason to inline them.Note that we pay special attention to literals in
Emitto ensure we don't duplicate them in generated code. I'm not sure that this is required anymore, but I'll leave that for another change.