From 943437e0d4fc7d7a45e329dbb1fbf616037f6100 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Sat, 6 Jul 2024 03:39:52 +0800 Subject: [PATCH 1/4] switch mkl to mkl-static. --- conda/debugging_pytorch.sh | 2 +- conda/pytorch-nightly/meta.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/conda/debugging_pytorch.sh b/conda/debugging_pytorch.sh index 4cce4f225..bf1a2edc0 100644 --- a/conda/debugging_pytorch.sh +++ b/conda/debugging_pytorch.sh @@ -14,7 +14,7 @@ export USE_CUDA_STATIC_LINK=1 . ./switch_cuda_version.sh 9.0 -conda install -y cmake numpy=1.17 setuptools pyyaml mkl=2018 mkl-include typing_extension ninja magma-cuda80 -c pytorch +conda install -y cmake numpy=1.17 setuptools pyyaml mkl-static=2018 mkl-include typing_extension ninja magma-cuda80 -c pytorch export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" git clone https://github.com/pytorch/pytorch -b nightly2 --recursive diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index aa5319d6f..37e7c959f 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -21,9 +21,9 @@ requirements: - pyyaml {% if cross_compile_arm64 == 0 %} - mkl-include # [x86_64] - - mkl=2020.2 # [py <= 311 and x86_64 and not win] - - mkl=2023.1 # [py >= 312 and x86_64] - - mkl-devel=2023.1 # [x86_64 and win] + - mkl-static=2020.2 # [py <= 311 and x86_64 and not win] + - mkl-static=2023.1 # [py >= 312 and x86_64] + - mkl-static=2023.1 # [x86_64 and win] {% endif %} - typing_extensions - ninja @@ -39,8 +39,8 @@ requirements: run: - python {% if cross_compile_arm64 == 0 %} - - mkl >=2018 # [x86_64 and not win] - - mkl=2023.1 # [x86_64 and win] + - mkl-static >=2018 # [x86_64 and not win] + - mkl-static=2023.1 # [x86_64 and win] {% endif %} - libuv # [win] - intel-openmp # [win] @@ -54,7 +54,7 @@ requirements: - jinja2 - pyyaml {% if cross_compile_arm64 == 0 %} - - blas * mkl # [x86_64] + - blas * mkl-static # [x86_64] {% endif %} - pytorch-mutex 1.0 {{ build_variant }} # [not osx ] {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }} From d134b8e4a061444a7c639153063701cb9ae21391 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Wed, 10 Jul 2024 08:49:47 +0800 Subject: [PATCH 2/4] update mkl-static version to 2024.2.0 --- conda/pytorch-nightly/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index 37e7c959f..b6b3db269 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -21,9 +21,9 @@ requirements: - pyyaml {% if cross_compile_arm64 == 0 %} - mkl-include # [x86_64] - - mkl-static=2020.2 # [py <= 311 and x86_64 and not win] - - mkl-static=2023.1 # [py >= 312 and x86_64] - - mkl-static=2023.1 # [x86_64 and win] + - mkl-static=2024.2.0 # [py <= 311 and x86_64 and not win] + - mkl-static=2024.2.0 # [py >= 312 and x86_64] + - mkl-static=2024.2.0 # [x86_64 and win] {% endif %} - typing_extensions - ninja From 0e6f8334a67e70a0ccacb513caf3bae3c512edc3 Mon Sep 17 00:00:00 2001 From: Xu Han Date: Fri, 12 Jul 2024 11:39:09 +0800 Subject: [PATCH 3/4] Delete mkl-static from yaml --- conda/pytorch-nightly/meta.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index b6b3db269..ea120e446 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -19,12 +19,6 @@ requirements: - python - setuptools - pyyaml - {% if cross_compile_arm64 == 0 %} - - mkl-include # [x86_64] - - mkl-static=2024.2.0 # [py <= 311 and x86_64 and not win] - - mkl-static=2024.2.0 # [py >= 312 and x86_64] - - mkl-static=2024.2.0 # [x86_64 and win] - {% endif %} - typing_extensions - ninja - libuv # [win] @@ -38,10 +32,6 @@ requirements: run: - python - {% if cross_compile_arm64 == 0 %} - - mkl-static >=2018 # [x86_64 and not win] - - mkl-static=2023.1 # [x86_64 and win] - {% endif %} - libuv # [win] - intel-openmp # [win] # llvm-openmp 16 leads to wrong processor affinity for fork child, see #99625. @@ -53,9 +43,6 @@ requirements: - networkx - jinja2 - pyyaml - {% if cross_compile_arm64 == 0 %} - - blas * mkl-static # [x86_64] - {% endif %} - pytorch-mutex 1.0 {{ build_variant }} # [not osx ] {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }} {{ environ.get('CONDA_TRITON_CONSTRAINT', '') }} From 20a1c3e509b57406a7b5210d2f6036f223ae149c Mon Sep 17 00:00:00 2001 From: Xu Han Date: Fri, 12 Jul 2024 20:22:21 +0800 Subject: [PATCH 4/4] Revert "Delete mkl-static from yaml" This reverts commit 0e6f8334a67e70a0ccacb513caf3bae3c512edc3. --- conda/pytorch-nightly/meta.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index ea120e446..b6b3db269 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -19,6 +19,12 @@ requirements: - python - setuptools - pyyaml + {% if cross_compile_arm64 == 0 %} + - mkl-include # [x86_64] + - mkl-static=2024.2.0 # [py <= 311 and x86_64 and not win] + - mkl-static=2024.2.0 # [py >= 312 and x86_64] + - mkl-static=2024.2.0 # [x86_64 and win] + {% endif %} - typing_extensions - ninja - libuv # [win] @@ -32,6 +38,10 @@ requirements: run: - python + {% if cross_compile_arm64 == 0 %} + - mkl-static >=2018 # [x86_64 and not win] + - mkl-static=2023.1 # [x86_64 and win] + {% endif %} - libuv # [win] - intel-openmp # [win] # llvm-openmp 16 leads to wrong processor affinity for fork child, see #99625. @@ -43,6 +53,9 @@ requirements: - networkx - jinja2 - pyyaml + {% if cross_compile_arm64 == 0 %} + - blas * mkl-static # [x86_64] + {% endif %} - pytorch-mutex 1.0 {{ build_variant }} # [not osx ] {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT', '') }} {{ environ.get('CONDA_TRITON_CONSTRAINT', '') }}