forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Reusable workflows] Linux - Move codegened binary builds + upload to…
… a reusable workflow (take 2) (pytorch#81564) Refactor the codgen used to generate linux binary builds into reusable workflows This PR extracts out what's needed for binary builds & tests for linux, and the upload step that's shared by all OSes. Other OS workflows are extracted in these PRs: - Windows: pytorch#81572 - MacOS: pytorch#81571 The one exception here is I left the ROCm workflow steps as codegen since bugs with those workflows would bring down the entire ROCm runner for all other users as well. Partially fixes pytorch#74480 ### Testing Ran CI with `ciflow/trunk`, `ciflow/binaries`, `ciflow/binaries_conda`, and `ciflow/binaries_wheel` labels Pull Request resolved: pytorch#81564 Approved by: https://github.com/huydhn
- Loading branch information
1 parent
dced803
commit ee1d79a
Showing
23 changed files
with
5,123 additions
and
37,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Test pytorch binary | ||
|
||
description: Pulls the docker image and tests the pytorch binary using it. All env variable referenced in the "Test PyTorch binary" step must be set in the GITHUB_ENV file | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Test PyTorch binary | ||
shell: bash | ||
run: | | ||
set -x | ||
# shellcheck disable=SC2086,SC2090 | ||
container_name=$(docker run \ | ||
${GPU_FLAG:-} \ | ||
-e BINARY_ENV_FILE \ | ||
-e BUILDER_ROOT \ | ||
-e BUILD_ENVIRONMENT \ | ||
-e BUILD_SPLIT_CUDA \ | ||
-e DESIRED_CUDA \ | ||
-e DESIRED_DEVTOOLSET \ | ||
-e DESIRED_PYTHON \ | ||
-e GITHUB_ACTIONS \ | ||
-e GPU_ARCH_TYPE \ | ||
-e GPU_ARCH_VERSION \ | ||
-e LIBTORCH_VARIANT \ | ||
-e PACKAGE_TYPE \ | ||
-e PYTORCH_FINAL_PACKAGE_DIR \ | ||
-e PYTORCH_ROOT \ | ||
-e SKIP_ALL_TESTS \ | ||
--tty \ | ||
--detach \ | ||
-v "${GITHUB_WORKSPACE}/pytorch:/pytorch" \ | ||
-v "${GITHUB_WORKSPACE}/builder:/builder" \ | ||
-v "${RUNNER_TEMP}/artifacts:/final_pkgs" \ | ||
-w / \ | ||
"${DOCKER_IMAGE}" | ||
) | ||
docker exec -t -w "${PYTORCH_ROOT}" "${container_name}" bash -c "bash .circleci/scripts/binary_populate_env.sh" | ||
# Generate test script | ||
docker exec -t -w "${PYTORCH_ROOT}" -e OUTPUT_SCRIPT="/run.sh" "${container_name}" bash -c "bash .circleci/scripts/binary_linux_test.sh" | ||
docker exec -t "${container_name}" bash -c "source ${BINARY_ENV_FILE} && bash -x /run.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.