Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement fft torchop #2141
base: main
Are you sure you want to change the base?
Implement fft torchop #2141
Changes from 2 commits
36a700c
40588ce
e7190f1
fc615bc
e1c24b1
7f9fc4a
d58f63c
6496d98
e877530
7bcaded
bc4d4ca
a01de3f
de24eeb
f50a653
8a1e1ef
c51ebba
f04585e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check notice
Code scanning / CodeQL
Unused import
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.
Question for @justinchuby : what does INT64 type signify? Specifically, is there a convention that tells us whether something is a statically known int value, or a symint, or a dynamic int value?
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.
I saw that
op.Size
returns an int64, so I was usingINT64
. However, from the test errors, I realized that I need to castsignal_size
to be the same type asself
so that I can properly call op.Divide/op.Multiply with self/signal_size being the same type.I am not sure if this means
signal_size
should befloat
orTFloat
.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.
Is
signal_size
an output of an ONNX op? Output from an ONNX op should be Tensor, so it should be TFloat.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 check https://github.com/pytorch/pytorch/blob/68414512e6fe641b02a6fe217fd516b7b776ea0d/aten/src/ATen/native/native_functions.yaml#L2991 for the signature of functions.
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.
It’s usually symint. We use the same INT64 for symint and tensors
Check failure
Code scanning / CodeQL
Asserting a tuple
Check failure
Code scanning / CodeQL
Asserting a tuple
Check warning on line 130 in onnxscript/function_libs/torch_lib/ops/fft.py
onnxscript/function_libs/torch_lib/ops/fft.py#L127-L130
Check warning on line 135 in onnxscript/function_libs/torch_lib/ops/fft.py
onnxscript/function_libs/torch_lib/ops/fft.py#L132-L135
Check warning on line 137 in onnxscript/function_libs/torch_lib/ops/fft.py
onnxscript/function_libs/torch_lib/ops/fft.py#L137