Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/building.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
with:
submodules: recursive

- name: Setup packages
- name: Install dependencies
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpp_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- name: Setup packages
uses: ./.github/actions/setup

- name: Configure
- name: Configure MKL
run: |
export MKL_VERSION=`python -c 'from tools.mkl_ver import compatible_mkl_ver;print(compatible_mkl_ver())'`
export MKL_VERSION=`python tools/print_mkl_version.py`
pip install --no-cache-dir mkl-include==${MKL_VERSION} mkl-static==${MKL_VERSION}

export _BLAS_INCLUDE_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}include")'`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
submodules: recursive

- name: Setup packages
- name: Install dependencies
uses: ./.github/actions/setup

- name: Install package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
submodules: recursive

- name: Setup packages
- name: Install dependencies
uses: ./.github/actions/setup
with:
cuda-version: ${{ matrix.cuda-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
with:
submodules: recursive

- name: Setup packages
- name: Install dependencies
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
submodules: recursive

- name: Setup packages
- name: Install dependencies
uses: ./.github/actions/setup

- name: Install package
Expand Down
11 changes: 9 additions & 2 deletions tools/mkl_ver.py → tools/print_mkl_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import torch


def compatible_mkl_ver():
def compatible_mkl_ver() -> str:
"""Returns an MKL version that is compatible with the current PyTorch
installation.
"""
torch_config = torch.__config__.show()
with_mkl_blas = 'BLAS_INFO=mkl' in torch_config
if torch.backends.mkl.is_available() and with_mkl_blas:
Expand All @@ -15,4 +18,8 @@ def compatible_mkl_ver():

return product_version

return None
raise RuntimeError('No MKL found in PyTorch configuration')


if __name__ == '__main__':
print(compatible_mkl_ver())
Loading