Skip to content

ban .sizes() and .strides() calls in derivatives.yaml#86611

Closed
bdhirsh wants to merge 19 commits intogh/bdhirsh/325/basefrom
gh/bdhirsh/325/head
Closed

ban .sizes() and .strides() calls in derivatives.yaml#86611
bdhirsh wants to merge 19 commits intogh/bdhirsh/325/basefrom
gh/bdhirsh/325/head

Conversation

@bdhirsh
Copy link
Collaborator

@bdhirsh bdhirsh commented Oct 10, 2022

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 10, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86611

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures, 9 Pending

As of commit ed8fae2:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

bdhirsh added a commit that referenced this pull request Oct 10, 2022
ghstack-source-id: 56b9a54
Pull Request resolved: #86611
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the replace rule for these?
Also you should do the same for size(int) and stride(int) as well (see the regex in the replace list).

@bdhirsh
Copy link
Collaborator Author

bdhirsh commented Oct 11, 2022

Agreed on both accounts - I'll update soon (deleting the existing sizes/strides regex, and erroring on .size(int) too)

bdhirsh added a commit that referenced this pull request Oct 11, 2022
ghstack-source-id: f980d1a
Pull Request resolved: #86611
bdhirsh added a commit that referenced this pull request Oct 12, 2022
ghstack-source-id: e7d7c6d
Pull Request resolved: #86611
bdhirsh added a commit that referenced this pull request Oct 12, 2022
ghstack-source-id: cf2c81d
Pull Request resolved: #86611
bdhirsh added a commit that referenced this pull request Oct 13, 2022
ghstack-source-id: 0568604
Pull Request resolved: #86611
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 13, 2022
@bdhirsh
Copy link
Collaborator Author

bdhirsh commented Oct 13, 2022

Sadly this won't be ok to merge yet, since we need to wait on symintify'ing split() to go through (Alban's working on that, but it'll take some time due to internal failures).

I'm hoping to land the big derivatives.yaml change asap though (below this in the stack).

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM
Small optional improvement you could do.

".sizes() is not supported in derivative formulas. Instead, please use the SymInt version,"
+ f".sym_sizes(), which returned a c10::SymIntArrayRef. formula={formula}"
)
if re.search("\.size\([-]?\d+\)", formula):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we most likely want to handle ->size( here.

Rick0317 pushed a commit to Rick0317/pytorch that referenced this pull request Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants