Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
lsy323 committed Sep 27, 2023
1 parent 5cd3213 commit 5314548
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 34 deletions.
19 changes: 0 additions & 19 deletions .circleci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -ex

# Only used in sccache
# source ./env
source .circleci/common.sh
PYTORCH_DIR=/tmp/pytorch
XLA_DIR=$PYTORCH_DIR/xla
Expand All @@ -12,22 +10,6 @@ clone_pytorch $PYTORCH_DIR $XLA_DIR
# Use bazel cache
USE_CACHE=1

# SCCACHE="$(which sccache)"
# if [ -z "${SCCACHE}" ]; then
# echo "Unable to find sccache..."
# exit 1
# fi

# if which sccache > /dev/null; then
# # Save sccache logs to file
# sccache --stop-server || true
# rm ~/sccache_error.log || true
# SCCACHE_ERROR_LOG=~/sccache_error.log RUST_LOG=sccache::server=error sccache --start-server

# # Report sccache stats for easier debugging
# sccache --zero-stats
# fi

rebase_pull_request_on_target_branch

pushd $PYTORCH_DIR
Expand All @@ -45,7 +27,6 @@ python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
export USE_CUDA=0
python setup.py install

# sccache --show-stats

source $XLA_DIR/xla_env
export GCLOUD_SERVICE_KEY_FILE="$XLA_DIR/default_credentials.json"
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
env:
ECR_DOCKER_IMAGE_BASE: ${{ inputs.ecr-docker-image-base }}
GCR_DOCKER_IMAGE: ${{ inputs.gcr-docker-image }}
# TODO create work dir in Dockerfile, create user similar to .circleci/docker/Dockerfile
WORKDIR: /home
SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
GCLOUD_SERVICE_KEY: ${{ secrets.gcloud-service-key }}
Expand Down Expand Up @@ -79,19 +78,14 @@ jobs:
- name: Start the container
shell: bash
run: |
# pid=$(docker run -t -d -w "$WORKDIR" "${GCR_DOCKER_IMAGE}")
pid=$(docker run --privileged -t -d -w "$WORKDIR" -e "TERM=xterm-256color" "${GCR_DOCKER_IMAGE}")
# docker exec -u jenkins "${pid}" sudo chown -R jenkins "${WORKDIR}"
docker exec --privileged "${pid}" /bin/bash
docker cp "${GITHUB_WORKSPACE}/." "$pid:$WORKDIR"
echo "pid=${pid}" >> "${GITHUB_ENV}"
- name: Prepare build env
shell: bash
run: |
# echo "declare -x SCCACHE_BUCKET=${SCCACHE_BUCKET}" | docker exec -i "${pid}" sh -c "cat >> env"
# echo "declare -x CC=clang-8 CXX=clang++-8" | docker exec -i "${pid}" sh -c "cat >> xla_env"
# add USE_CUDA=0 to disable pytorch gpu build in gpu container
echo "declare -x USE_CUDA=0" | docker exec -i "${pid}" sh -c "cat >> xla_env"
echo "declare -x DISABLE_XRT=${DISABLE_XRT}" | docker exec -i "${pid}" sh -c "cat >> xla_env"
echo "declare -x XLA_CUDA=${XLA_CUDA}" | docker exec -i "${pid}" sh -c "cat >> xla_env"
Expand All @@ -101,7 +95,6 @@ jobs:
- name: Build
shell: bash
run: |
# docker exec -u jenkins "${pid}" bash -c ". ~/.bashrc && .circleci/build.sh"
docker exec --privileged "${pid}" bash -c ". ~/.bashrc && .circleci/build.sh"
- name: Cleanup build env
shell: bash
Expand All @@ -119,7 +112,6 @@ jobs:
fi
export COMMIT_DOCKER_IMAGE="${ECR_DOCKER_IMAGE_BASE}:${image_tag_base}-${GITHUB_SHA}"
# export COMMIT_DOCKER_IMAGE="${GCR_DOCKER_IMAGE_BASE}:${image_tag_base}-${GITHUB_SHA}"
time docker commit "${pid}" "${COMMIT_DOCKER_IMAGE}"
time docker push "${COMMIT_DOCKER_IMAGE}"
echo "docker-image=${COMMIT_DOCKER_IMAGE}" >> "${GITHUB_OUTPUT}"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ jobs:
CIRCLE_WORKFLOW_ID: ${{ github.run_id }}
CIRCLE_BUILD_NUM: ${{ github.run_number }}
run: |
# docker cp "${pid}":/home/jenkins/htmlcov "${GITHUB_WORKSPACE}"
docker cp "${pid}":/root/htmlcov "${GITHUB_WORKSPACE}"
if [ -n "${GPU_FLAG:-}" ]; then
# Python
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
uses: ./.github/workflows/_build.yml
with:
ecr-docker-image-base: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/xla_base
# gcr-docker-image: gcr.io/tpu-pytorch/xla_base:latest
# gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:cuda
# gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.8_cuda_11.8
gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.8_cuda_12.1
disable_xrt: 1
cuda: 1
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_and_test_xrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
uses: ./.github/workflows/_build.yml
with:
ecr-docker-image-base: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/xla_base
# gcr-docker-image: gcr.io/tpu-pytorch/xla_base:latest
# gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:cuda
# gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.8_cuda_11.8
gcr-docker-image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/development:3.8_cuda_12.1
disable_xrt: 0
cuda: 1
Expand Down

0 comments on commit 5314548

Please sign in to comment.