Skip to content

Add op(roll) | feat(torchlib) #905

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

Merged
merged 21 commits into from
Jul 27, 2023
Merged

Add op(roll) | feat(torchlib) #905

merged 21 commits into from
Jul 27, 2023

Conversation

xiaowuhu
Copy link
Contributor

@xiaowuhu xiaowuhu commented Jul 20, 2023

In _roll_input_wrangler:

  1. convert shifts from int to tensor
  2. convert dims from int or tensor to attributes list, so we can use loop in trace_only mode to process aten_roll(x, (y1, y2), (z1, z2)) case.

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #905 (c39595c) into main (7402a96) will increase coverage by 0.07%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##             main     #905      +/-   ##
==========================================
+ Coverage   76.84%   76.91%   +0.07%     
==========================================
  Files         112      112              
  Lines       13619    13669      +50     
  Branches     1386     1397      +11     
==========================================
+ Hits        10466    10514      +48     
+ Misses       2805     2804       -1     
- Partials      348      351       +3     
Files Changed Coverage Δ
...ipt/tests/function_libs/torch_lib/ops_test_data.py 96.20% <84.61%> (-0.68%) ⬇️
onnxscript/function_libs/torch_lib/ops/core.py 77.72% <94.87%> (+0.28%) ⬆️

... and 1 file with indirect coverage changes

@justinchuby justinchuby self-assigned this Jul 20, 2023
@justinchuby justinchuby requested review from BowenBao and fatcat-z July 20, 2023 16:46
@xiaowuhu xiaowuhu mentioned this pull request Jul 23, 2023
@justinchuby
Copy link
Collaborator

dims is a Sequence that is by default empty: int[1] dims=[]. It will not be None, or an int.

@justinchuby
Copy link
Collaborator

LGTM. The last batch of comments mostly around updating the signature/logic to match the aten signature.

@justinchuby
Copy link
Collaborator

I also tried https://github.com/microsoft/onnxscript/pull/918/files only to realize concat doesn't take a dynamic axis

@justinchuby
Copy link
Collaborator

Thank you!

@xiaowuhu xiaowuhu merged commit d77f001 into main Jul 27, 2023
@xiaowuhu xiaowuhu deleted the xiaowu/AddOp(roll) branch July 27, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants