-
Notifications
You must be signed in to change notification settings - Fork 86
[WIP] Unblock bloom model #439
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
|
We should also remove the cast in |
Codecov Report
@@ Coverage Diff @@
## main #439 +/- ##
=======================================
Coverage 71.27% 71.27%
=======================================
Files 108 108
Lines 10475 10480 +5
Branches 1085 1085
=======================================
+ Hits 7466 7470 +4
- Misses 2699 2700 +1
Partials 310 310
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| @torch_op("aten::bitwise_not", overload=True) | ||
| def aten_bitwise_not_bool(self: BOOL) -> BOOL: | ||
| # bitwise_not(Tensor self) -> Tensor | ||
| # FIXME(titaiwang): This is a hack to get around the fact that we don't have op.BitwiseNot supporting bool now. |
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 will have to go with this I think. Not a hack as we need a dispatcher to handle different dtypes
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.
Need if for aten_bitwise_not?
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.
Oh we cannot do if because the dtypes are different, and we don’t know the dtype within a function
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.
So even trace only won’t work for us here
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.
So how should we know the dtype beforehand?
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.
Maybe there are only certain kinds of ops can be input of BitWise operations that we can do the processing in those ops?
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.
Guess we can forget it...
@_onnx_symbolic("aten::bitwise_not")
@_beartype.beartype
def bitwise_not(g: jit_utils.GraphContext, input):
if not symbolic_helper._is_bool(input):
raise errors.SymbolicValueError(
"ONNX export does NOT support exporting bitwise Not "
"for non-boolean input values",
input,
)
return g.op("Not", input)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.
So how should we know the dtype beforehand?
the exporter knows about dtypes so it can choose which function to use
|
|
||
|
|
||
| @torch_op("aten::masked_fill") | ||
| def aten_masked_fill(self: TTensor, mask: BOOL, value: TTensor) -> TTensor: |
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.
Could you create another PR for the non-hacks we identified, including changes to mask fill and bitwise not (both versions) so that we can merge into main? The rest can stay here for reference but we are probably not going to merge?
|
Replace by #442 |
No description provided.