SIGN IN SIGN UP

Switch PyTorch nightly to commit-based pin (#1247)

Summary:
This PR replaces the existing PyTorch nightly pin with a commit-based one where the PyTorch commit could be:

* A commit from main or viable/strict
* A commit from a WIP pull request
* or even a branch name

The main benefit of this change is to allow folks who are working on both PyTorch and ExecuTorch the flexibility of using the commit they want from PyTorch without the need to wait for that to become available on nightly build while leaving ExecuTorch CI in a potential broken state.

The changes here include:
* Remove `nightly.txt`
* PyTorch pinned commit is checkout and is built from source.
  * For Linux, the build happens during Docker image build, so there is no impact on CI duration.  From dev point of view, a PyTorch snapshot has always been installed at the specified commit
  * For MacOS, the build happens during the CI job.  This incurs additional build time, but I have added sccache to mitigate it.  The increase here is less than 5 minutes from my spot check, for example [before](https://github.com/pytorch/executorch/actions/runs/6948971118/job/18906105216) v.s. [after](https://github.com/pytorch/executorch/actions/runs/6951428944/job/18913383896)
* Audio, and vision will also need to be built from source (for compatibility with PyTorch C++ layer).  For simplicity, audio and vision commit pins will come from core
* Install sccache and its openssl dependency
* Tweak the codebase here and there to make it work with building PyTorch from source

After this is ready, I will announce it to the team before landing the change.

Pull Request resolved: https://github.com/pytorch/executorch/pull/1247

Reviewed By: mergennachin, guangy10

Differential Revision: D51518043

Pulled By: huydhn

fbshipit-source-id: 39a36028dcb646f4d56821ea6e101ead12d02de9
H
Huy Do committed
d70db7d122a636319492b0bb179aed1304b75837
Parent: 3a4bb06
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 12/1/2023, 3:27:56 AM