[ci] move rocm jobs from pull to trunk workflow
This makes the rocm jobs run on master-only. We've been battling queue
times for a few months now
(https://github.com/pytorch/pytorch/issues/73039). So far we have tried
or investigated:
1. Moving distributed builds to master
2. Moving distributed builds to periodic
3. Only running rocm on a specific set of paths
4. Running multiple jobs on a single rocm host.
Unfortunately, we haven't been able to reduce queuing times to good
levels. As a result, ROCm jobs are the "weightiest" job in PR CI, with
an average TTS of 3.3h (see https://hud.pytorch.org/metrics, panel name
"Job time-to-signal, all branches").
There are two things we haven't tried so far:
1. Running "smoke tests" only on PR
2. Switching rocm builds to master
Since #2 is easiest let's give it a try. For now, the policy would be
the same as what we do for other capacity-constrained configurations
(Win and Mac)—run on master only, but revert if there is a breakage
introduced.
[skip ci]
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77989
Approved by: https://github.com/malfet, https://github.com/janeyx99