-
Notifications
You must be signed in to change notification settings - Fork 63
Support bool as an attribute type #283
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
Comments
Quick question: is this with the latest opset of ONNX, which updates ReduceLogSumExp? |
I was using opset18, onnx 1.13 and onnxruntime 1.13 I think |
Ok, the problem is with keepdim. Currently, onnxscript doesn't recognize the "bool" type as a valid attribute type. (ONNX doesn't have bool attributes, it uses int attributes even for booleans.) So, if I use |
I see! That makes a lot of sense. I like the idea of supporting bool since it is a kind of int even in Python |
…outputs (#301) ~~Concern on the annotation of `k` as `int`. I assume this would imply static value in onnx/onnxscript? Since scalars could be non-static in torch, would we want a scalar type wrapper too?~~ Answer is use `INT64`. * Add `aten_topk`. * Extend onnx script type annotation for bool argument for attributes. * Extend opinfo test for multiple outputs. Fixes #283
#281
produces
ERROR onnxscript/test/function_libs/torch_aten/ops_correctness_test.py - TypeError: value "<onnxscript.values.Dynamic object at 0x7f2611f68640>" is not valid attribute data type.
Even though
dim
should be an input?cc @gramalingam @fatcat-z @xiaowuhu
The text was updated successfully, but these errors were encountered: