Skip to content

Conversation

vors
Copy link
Contributor

@vors vors commented Nov 24, 2022

This change aims to make bazel build more embeeding-friendly.
Namely, when PyTorch is included as an external repo in another project, it is usually included like this

        native.local_repository(
            name = "pytorch",
            path = ...,
            repo_mapping = repo_mapping,
        )

Or

        http_archive(
            name = "pytorch",
            urls = ...
            repo_mapping = repo_mapping,
        )

In this case, references to @// would resolve to the top-level WORKSPACE that includes PyTorch.
That makes upgrades harder because we need to carry around this patch.
Note that under some edge-case circumstances even // resolves to the top-level WORKSPACE.

This change makes the embedding of the bazel build easier without compromising anything for the main repo, since the @pytorch// still refers to the same thing.

cc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @VitalyFedyunin @jgong5 @mingfeima @sanchitintel @ashokei @jingxu10 @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 24, 2022

🔗 Helpful Links

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

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

❌ 2 Failures

As of commit cc7bea3:

NEW FAILURES - The following jobs have failed:

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 24, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the module: mkldnn Related to Intel IDEEP or oneDNN (a.k.a. mkldnn) integration label Nov 24, 2022
@vors
Copy link
Contributor Author

vors commented Nov 24, 2022

I didn't add the cc -- seems like some automation?

@kit1980
Copy link
Contributor

kit1980 commented Nov 27, 2022

/easycla

@kit1980
Copy link
Contributor

kit1980 commented Nov 27, 2022

@vors Could you check that the email on your commits listed in your GitHub account? This seems to be an issue that upsets EasyCLA.

@vors
Copy link
Contributor Author

vors commented Nov 27, 2022

@kit1980 thank you! I plan to do more contributions as part of my work at Cruise, as well as help my teammates to do the same. Since PyTorch now part of Linux Foundation it seems like CLA also changed? Let me spend a little bit of time sorting out CLA with our legal team.

@kit1980
Copy link
Contributor

kit1980 commented Nov 28, 2022

@vors besides signing the CLA, there is a technical CLA-check related detail: email on the commit (as seen by git) must be listed in your GitHub account, this seems to be not the case currently.

@vors
Copy link
Contributor Author

vors commented Nov 29, 2022

Oh I see, let me fix it :)

@albanD albanD requested a review from kit1980 November 29, 2022 14:23
@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Nov 29, 2022
@kit1980 kit1980 self-assigned this Nov 29, 2022
@vors
Copy link
Contributor Author

vors commented Dec 13, 2022

Ok I worked with our legal, we signed CLA and I'm now CLA manager for Cruise.

This should be ready to merge from the legal point on view :)

@kit1980 can you help with the code review?

@kit1980
Copy link
Contributor

kit1980 commented Dec 15, 2022

/easycla

@vors
Copy link
Contributor Author

vors commented Dec 20, 2022

@pytorchbot /rebase

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 20, 2022

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: '/rebase' (choose from 'merge', 'revert', 'rebase', 'label', 'drci')

usage: @pytorchbot [-h] {merge,revert,rebase,label,drci} ...

Try @pytorchbot --help for more info.

@vors
Copy link
Contributor Author

vors commented Dec 20, 2022

@pytorchbot rebase

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 20, 2022

You don't have permissions to rebase this PR, only people with write permissions may rebase PRs.

@sanchitintel
Copy link
Collaborator

@pytorchbot rebase -b master

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased sergei/master/add-pytorch onto refs/remotes/origin/master, please pull locally before adding more changes (for example, via git checkout sergei/master/add-pytorch && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the sergei/master/add-pytorch branch from 30d64da to d1befe9 Compare December 20, 2022 21:17
@sanchitintel

This comment was marked as resolved.

@kit1980
Copy link
Contributor

kit1980 commented Dec 20, 2022

/easycla

@vors vors force-pushed the sergei/master/add-pytorch branch from d1befe9 to cc7bea3 Compare December 20, 2022 21:37
@vors
Copy link
Contributor Author

vors commented Dec 20, 2022

/easycla

@facebook-github-bot
Copy link
Contributor

@kit1980 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@vors
Copy link
Contributor Author

vors commented Dec 21, 2022

Gentle ping on this one, can we start getting a review?

@kit1980
Copy link
Contributor

kit1980 commented Dec 22, 2022

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Dec 22, 2022
@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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.3-py3.8 / test (default, 2, 2, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

@vors
Copy link
Contributor Author

vors commented Dec 22, 2022

Seems unrelated...

@vors
Copy link
Contributor Author

vors commented Dec 22, 2022

@pytorchbot merge

@vors
Copy link
Contributor Author

vors commented Dec 22, 2022

@pytorchbot sudo merge

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 22, 2022

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'sudo' (choose from 'merge', 'revert', 'rebase', 'label', 'drci')

usage: @pytorchbot [-h] {merge,revert,rebase,label,drci} ...

Try @pytorchbot --help for more info.

@kit1980
Copy link
Contributor

kit1980 commented Dec 22, 2022

@pytorchbot merge -f "Pre-existing ROCm issues"

@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

@vors
Copy link
Contributor Author

vors commented Dec 22, 2022

@kit1980 🙇

pytorchmergebot pushed a commit that referenced this pull request Jan 4, 2023
This is a follow-up from #89660
There is another place that needs to be updated.

I think this time I covered all of them...
Pull Request resolved: #91424
Approved by: https://github.com/malfet
@dagitses
Copy link
Collaborator

dagitses commented Jan 4, 2023

What are the edge cases under which // resolves to the top-level workspace?

@vors
Copy link
Contributor Author

vors commented Jan 4, 2023

There are 3 flavors:

  • //...
  • @//...
  • @pytorch//...

From our expirience in Cruise, only the last one provides an unambiguous stable resolution.
The //... one always resolves to the top namespace which is not what we want.

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: mkldnn Related to Intel IDEEP or oneDNN (a.k.a. mkldnn) integration open source 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.

8 participants