diff --git a/Dockerfile.aiter b/Dockerfile.aiter index 8d6e995656..4fcebc9033 100644 --- a/Dockerfile.aiter +++ b/Dockerfile.aiter @@ -10,27 +10,31 @@ RUN pip install pandas zmq einops ninja tabulate vcs_versioning && \ sudo mkdir /home/jenkins/workspace && \ cd /home/jenkins/workspace && rm -rf rocm-libraries ck && \ if [ "$CK_FROM_ROCM_LIBRARIES" = "1" ]; then \ - git clone --depth 1 -b "$CK_AITER_BRANCH" --no-checkout --filter=blob:none https://github.com/ROCm/rocm-libraries.git && \ - cd rocm-libraries && \ + mkdir rocm-libraries && cd rocm-libraries && \ + git init -q && \ + git remote add origin https://github.com/ROCm/rocm-libraries.git && \ + git fetch --depth 1 --filter=blob:none origin "$CK_AITER_BRANCH" && \ git sparse-checkout init --cone && \ git sparse-checkout set projects/composablekernel && \ - git checkout "$CK_AITER_BRANCH" && \ + git checkout FETCH_HEAD && \ ROCM_LIBRARIES_SHA=$(git rev-parse --short HEAD) && \ + LOCAL_BRANCH="ck-import-${ROCM_LIBRARIES_SHA}" && \ mv projects/composablekernel ../ck && \ cd ../ck && rm -rf ../rocm-libraries && \ - git init && \ + git init -b "$LOCAL_BRANCH" && \ git config user.name "assistant-librarian[bot]" && \ git config user.email "assistant-librarian[bot]@users.noreply.github.com" && \ - git branch -m "$CK_AITER_BRANCH" && git add -A && \ + git add -A && \ git commit -m "import from ROCm/rocm-libraries@$ROCM_LIBRARIES_SHA" ; \ else \ - git clone --depth 1 -b "$CK_AITER_BRANCH" https://github.com/ROCm/composable_kernel.git ck ; \ + git clone --depth 1 -b "$CK_AITER_BRANCH" https://github.com/ROCm/composable_kernel.git ck && \ + LOCAL_BRANCH="$CK_AITER_BRANCH" ; \ fi && \ cd /home/jenkins/workspace && rm -rf aiter && \ git clone --depth 1 -b "$AITER_BRANCH" --recursive https://github.com/ROCm/aiter.git && \ cd aiter && \ rm -rf 3rdparty/composable_kernel/ && \ - git clone -b "$CK_AITER_BRANCH" ../ck 3rdparty/composable_kernel/ && \ + git clone -b "$LOCAL_BRANCH" ../ck 3rdparty/composable_kernel/ && \ python3 setup.py develop && \ groupadd -g 1001 jenkins && \ useradd -u 1001 -g 1001 -m -s /bin/bash jenkins && \ diff --git a/Dockerfile.fa b/Dockerfile.fa index 47643310bd..025bbd414e 100644 --- a/Dockerfile.fa +++ b/Dockerfile.fa @@ -12,27 +12,31 @@ RUN set -x ; \ sudo mkdir /home/jenkins/workspace && \ cd /home/jenkins/workspace && rm -rf rocm-libraries ck && \ if [ "$CK_FROM_ROCM_LIBRARIES" = "1" ]; then \ - git clone --depth 1 -b "$CK_FA_BRANCH" --no-checkout --filter=blob:none https://github.com/$CK_FA_ORIGIN/rocm-libraries.git && \ - cd rocm-libraries && \ + mkdir rocm-libraries && cd rocm-libraries && \ + git init -q && \ + git remote add origin https://github.com/$CK_FA_ORIGIN/rocm-libraries.git && \ + git fetch --depth 1 --filter=blob:none origin "$CK_FA_BRANCH" && \ git sparse-checkout init --cone && \ git sparse-checkout set projects/composablekernel && \ - git checkout "$CK_FA_BRANCH" && \ + git checkout FETCH_HEAD && \ ROCM_LIBRARIES_SHA=$(git rev-parse --short HEAD) && \ + LOCAL_BRANCH="ck-import-${ROCM_LIBRARIES_SHA}" && \ mv projects/composablekernel ../ck && \ cd ../ck && rm -rf ../rocm-libraries && \ - git init && \ + git init -b "$LOCAL_BRANCH" && \ git config user.name "assistant-librarian[bot]" && \ git config user.email "assistant-librarian[bot]@users.noreply.github.com" && \ - git branch -m "$CK_FA_BRANCH" && git add -A && \ + git add -A && \ git commit -m "import from ROCm/rocm-libraries@$ROCM_LIBRARIES_SHA" > /dev/null ; \ else \ - git clone --depth 1 -b "$CK_FA_BRANCH" https://github.com/$CK_FA_ORIGIN/composable_kernel.git ck ; \ + git clone --depth 1 -b "$CK_FA_BRANCH" https://github.com/$CK_FA_ORIGIN/composable_kernel.git ck && \ + LOCAL_BRANCH="$CK_FA_BRANCH" ; \ fi && \ cd /home/jenkins/workspace && rm -rf flash-attention && \ git clone --depth 1 -b "$FA_BRANCH" --recursive "https://github.com/$FA_ORIGIN/flash-attention.git" && \ cd flash-attention && \ rm -rf csrc/composable_kernel/ && \ - git clone -b "$CK_FA_BRANCH" ../ck csrc/composable_kernel/ && git add csrc/composable_kernel && \ + git clone -b "$LOCAL_BRANCH" ../ck csrc/composable_kernel/ && git add csrc/composable_kernel && \ MAX_JOBS=$(nproc) GPU_ARCHS="$GPU_ARCHS" /opt/venv/bin/python3 -u -m pip install --no-build-isolation -v . && \ groupadd -g 1001 jenkins && \ useradd -u 1001 -g 1001 -m -s /bin/bash jenkins && \ diff --git a/Jenkinsfile b/Jenkinsfile index 170e0bf432..05eb7f97ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1191,7 +1191,7 @@ CRON_SETTINGS = BRANCH_NAME == "develop" ? '''0 23 * * * % RUN_FULL_QA=true;RUN_ 0 13 * * * % BUILD_INSTANCES_ONLY=true;USE_SCCACHE=false;NINJA_BUILD_TRACE=true;FORCE_CI=true 0 11 * * * % RUN_FULL_CONV_TILE_TESTS=true;RUN_AITER_TESTS=true;RUN_FA_TESTS=true;USE_SCCACHE=false;RUN_PERFORMANCE_TESTS=false;FORCE_CI=true 0 9 * * * % RUN_PYTORCH_TESTS=true;USE_SCCACHE=false;RUN_PERFORMANCE_TESTS=false;BUILD_GFX101=false;BUILD_GFX103=false;BUILD_GFX11=false;BUILD_GFX12=false;BUILD_GFX90A=false;FORCE_CI=true''' : "" -CURRENT_BRANCH_NAME = env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME +CURRENT_BRANCH_NAME = env.CHANGE_ID ? "refs/pull/${env.CHANGE_ID}/head" : (env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME) POLL_SPEC = BRANCH_NAME == "develop" ? 'H H/6 * * *' : ''