Skip to content

Conversation

@kshitij12345
Copy link
Collaborator

@kshitij12345 kshitij12345 commented Feb 6, 2023

Fixes pytorch/functorch#724

TODO:

  • Docs

NOTE: const_fold pass raises UserWarning -> #94374

cc @zou3519 @Chillee @samdow @soumith @janeyx99

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 6, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

@pytorch-bot pytorch-bot bot added the release notes: fx release notes category label Feb 6, 2023
@kshitij12345 kshitij12345 marked this pull request as ready for review February 6, 2023 11:57
@kshitij12345 kshitij12345 requested a review from Chillee February 6, 2023 11:57
@kshitij12345 kshitij12345 added module: functorch Pertaining to torch.func or pytorch/functorch release notes: torch.func release notes category for torch.vmap or torch.func.* APIs labels Feb 7, 2023
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 8, 2023
Copy link
Collaborator

@Chillee Chillee left a comment

Choose a reason for hiding this comment

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

LGTM!

return tangents

jvp_graph = make_fx(trace_fn)(flat_tangents)
const_folded_jvp_graph = const_fold.split_const_subgraphs(jvp_graph)
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmmm... looking at the documentation, it seems like this one delays the constant folding until runtime. I wonder if it might be worth doing it here instead of upon the first invocation. Not a big deal, but might be easier to handle with compilation.

@kshitij12345
Copy link
Collaborator Author

I am not sure why lintrunner is failing on the files that this PR hasn't touched. Any idea? Recent master looks to be green.

@kshitij12345 kshitij12345 added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 9, 2023
@kshitij12345
Copy link
Collaborator Author

@pytorchbot merge -f"lintrunner failing on unchanged files"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@kshitij12345
Copy link
Collaborator Author

@pytorchbot revert -m "Broke lint runner" -c ignoredsignal

@kshitij12345 kshitij12345 reopened this Feb 9, 2023
@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@kshitij12345 your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Feb 9, 2023
This reverts commit b6b9e1e.

Reverted #94173 on behalf of https://github.com/kshitij12345 due to Broke lint runner
@kshitij12345
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

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 Merged module: functorch Pertaining to torch.func or pytorch/functorch open source release notes: fx release notes category release notes: torch.func release notes category for torch.vmap or torch.func.* APIs Reverted triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a linearize like jax.linearize

5 participants