Skip to content

Inputs and attributes could not be separated by _adapt_to_eager_mode method. #287

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

Closed
fatcat-z opened this issue Jan 6, 2023 · 1 comment · Fixed by #404
Closed

Inputs and attributes could not be separated by _adapt_to_eager_mode method. #287

fatcat-z opened this issue Jan 6, 2023 · 1 comment · Fixed by #404
Labels
topic: eager mode Eager mode evaluation

Comments

@fatcat-z
Copy link
Contributor

fatcat-z commented Jan 6, 2023

Ideally when an aten_xxx() function was called in eager mode, we will process all positional inputs so the data types are expected, but will leave kwargs alone.

But currently both inputs and attributes will be passed into _adapt_to_eager_mode() method as args which caused we process those attributes unexpectedly. This will cause make_attribute() failed because the dtype of attribute is wrong.

@gramalingam
Copy link
Collaborator

I believe that this is the same issue as: #305 ... we need to ensure that onnxscript allows both positional and keyword-based ways of specifying both inputs and attributes.

fatcat-z added a commit that referenced this issue Jan 14, 2023
1. Add 2 new ops: permute and pow.
2. Fix (partially) #287: convert the values of attributes from tensor
back to numpy value when we call Op.

Signed-off-by: Jay Zhang <[email protected]>
justinchuby added a commit that referenced this issue Jan 26, 2023
Create `param_manipulation` for separate inputs and attributes from
python args and kwargs.
Raname `typing.py` to
`onnxscript/function_libs/torch_aten/tensor_typing.py`

- #305 
- #287
- #320

Co-authored-by: Ti-Tai Wang <[email protected]>
justinchuby added a commit that referenced this issue Feb 6, 2023
)

Generalize #368 to all eager backends

split happens in the evaluator instead of the Op or OnnxFunction call
methods so that evaluators can control behaviors like whether to fill in
default values for attributes.

Fixes #287, partially #305 (still need the scripted version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: eager mode Eager mode evaluation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants