From 763f76be43c0f712bf4c9c8e225ebc20aeb4c1ac Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 8 May 2024 10:12:18 +1200 Subject: [PATCH 1/6] Free up disk space on Azure Pipelines Xref git@github.com:weiji14/flash-attn-feedstock.git --- conda-forge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda-forge.yml b/conda-forge.yml index ded6996..e303796 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,4 +1,5 @@ azure: + free_disk_space: true timeout_minutes: 360 github: branch_name: main From cb8b616f6148d2692984ed5d8bdf64bb92d59b20 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 8 May 2024 10:16:47 +1200 Subject: [PATCH 2/6] Set TORCH_CUDA_ARCH_LIST=8.0;8.6;8.9;9.0+PTX Expand to CUDA compatibility 8.0 and above, xref https://developer.nvidia.com/cuda-gpus. Also increase MAX_JOBS. --- recipe/meta.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 608128b..ff0cd0e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -16,11 +16,8 @@ build: number: 0 script: {{ PYTHON }} -m pip install . -vvv --no-deps --no-build-isolation script_env: - # Temporarily reduce ARCHs and JOBS to debug build - # - MAX_JOBS=$CPU_COUNT - - MAX_JOBS=1 - # - TORCH_CUDA_ARCH_LIST=8.0;8.6;8.9;9.0+PTX - - TORCH_CUDA_ARCH_LIST=8.0+PTX + - MAX_JOBS=$CPU_COUNT + - TORCH_CUDA_ARCH_LIST=8.0;8.6;8.9;9.0+PTX skip: true # [cuda_compiler_version in (undefined, "None")] skip: true # [not linux] ignore_run_exports_from: @@ -29,7 +26,7 @@ build: - libcusparse-dev # [(cuda_compiler_version or "").startswith("12")] rpaths: - lib/ - # PyTorch libs are in site-packages instead of with other shared objects + # PyTorch libs are in site-packages instead of with other shared objects - {{ SP_DIR }}/torch/lib/ requirements: From 963d3ca276fed2cbb4a170d194aaacdc4c3b9fd4 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 22:43:33 +0000 Subject: [PATCH 3/6] MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.35.0, and conda-forge-pinning 2024.05.07.15.53.14 --- .azure-pipelines/azure-pipelines-linux.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index ea9b8d6..38c3f1b 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -28,6 +28,27 @@ jobs: variables: {} steps: + - script: | + sudo mkdir -p /opt/empty_dir || true + for d in \ + /opt/ghc \ + /opt/hostedtoolcache \ + /usr/lib/jvm \ + /usr/local/.ghcup \ + /usr/local/lib/android \ + /usr/local/share/powershell \ + /usr/share/dotnet \ + /usr/share/swift \ + ; do + sudo rsync --stats -a --delete /opt/empty_dir/ $d || true + done + sudo apt-get purge -y -f firefox \ + google-chrome-stable \ + microsoft-edge-stable + sudo apt-get autoremove -y >& /dev/null + sudo apt-get autoclean -y >& /dev/null + df -h + displayName: Manage disk space # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | From 95eecf043b3a4a4d6384ad75593afe3a42418b60 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 8 May 2024 13:29:59 +1200 Subject: [PATCH 4/6] Set swapfile_size to 10GiB Xref https://conda-forge.org/docs/maintainer/conda_forge_yml/#azure --- conda-forge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda-forge.yml b/conda-forge.yml index e303796..d3036a2 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,8 @@ azure: free_disk_space: true timeout_minutes: 360 + settings_linux: + swapfile_size: 10GiB github: branch_name: main tooling_branch_name: main From aa6555844c30c89c904b7796c985e4adcf2aa0f9 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 8 May 2024 13:30:50 +1200 Subject: [PATCH 5/6] MNT: Re-rendered with conda-build 24.3.0, conda-smithy 3.35.0, and conda-forge-pinning 2024.05.07.15.53.14 --- .azure-pipelines/azure-pipelines-linux.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 38c3f1b..138f8a1 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -49,6 +49,12 @@ jobs: sudo apt-get autoclean -y >& /dev/null df -h displayName: Manage disk space + - script: | + sudo fallocate -l 10GiB /swapfile || true + sudo chmod 600 /swapfile || true + sudo mkswap /swapfile || true + sudo swapon /swapfile || true + displayName: Create swap file # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | From 3348c5aed4d10a75cfc3e37bb8853d8a4f96245c Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Thu, 9 May 2024 00:33:26 +1200 Subject: [PATCH 6/6] Skip compiling for CUDA compute capability 8.9 and 9.0 --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ff0cd0e..39ff3a5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -17,7 +17,7 @@ build: script: {{ PYTHON }} -m pip install . -vvv --no-deps --no-build-isolation script_env: - MAX_JOBS=$CPU_COUNT - - TORCH_CUDA_ARCH_LIST=8.0;8.6;8.9;9.0+PTX + - TORCH_CUDA_ARCH_LIST=8.0;8.6+PTX skip: true # [cuda_compiler_version in (undefined, "None")] skip: true # [not linux] ignore_run_exports_from: