When installing pytorch with cpuonly and nomkl, the pytorch recipe calls for the installation of mkl. Maybe I am misunderstanding, but I would think if you specifically ask for nomkl then pytorch should be installed linked to OpenMP, as it would be if I installed with pip.
```
## Package Plan ##
environment location: /opt/conda/envs/pytorch-bug
added / updated specs:
- cpuonly
- nomkl
- pytorch
The following packages will be downloaded:
package | build
---------------------------|-----------------
blas-1.0 | openblas 48 KB anaconda
cpuonly-2.0 | 0 2 KB pytorch
ninja-1.10.2 | h4bd325d_1 2.4 MB conda-forge
nomkl-3.0 | 0 48 KB anaconda
pytorch-1.4.0 | py3.8_cpu_0 39.0 MB pytorch
pytorch-mutex-1.0 | cpu 3 KB pytorch
------------------------------------------------------------
Total: 41.5 MB
The following NEW packages will be INSTALLED:
blas anaconda/linux-64::blas-1.0-openblas
cpuonly pytorch/noarch::cpuonly-2.0-0
intel-openmp anaconda/linux-64::intel-openmp-2020.2-254
mkl anaconda/linux-64::mkl-2020.2-256
ninja conda-forge/linux-64::ninja-1.10.2-h4bd325d_1
pytorch pytorch/linux-64::pytorch-1.4.0-py3.8_cpu_0
pytorch-mutex pytorch/noarch::pytorch-mutex-1.0-cpu
The following packages will be UPDATED:
nomkl conda-forge/noarch::nomkl-1.0-h5ca1d4~ --> anaconda/linux-64::nomkl-3.0-0
Proceed ([y]/n)
```
or, if instead I didn't list the `anaconda` channel:
```
## Package Plan ##
environment location: /opt/conda/envs/pytorch-bug
added / updated specs:
- cpuonly
- nomkl
- pytorch
The following packages will be downloaded:
package | build
---------------------------|-----------------
blas-1.0 | openblas 46 KB
cpuonly-2.0 | 0 2 KB pytorch
intel-openmp-2021.4.0 | h06a4308_3561 4.2 MB
mkl-2021.4.0 | h06a4308_640 142.6 MB
ninja-1.10.2 | h4bd325d_0 2.4 MB conda-forge
nomkl-3.0 | 0 46 KB
pytorch-1.4.0 | py3.8_cpu_0 39.0 MB pytorch
pytorch-mutex-1.0 | cpu 3 KB pytorch
------------------------------------------------------------
Total: 188.3 MB
The following NEW packages will be INSTALLED:
blas pkgs/main/linux-64::blas-1.0-openblas
cpuonly pytorch/noarch::cpuonly-2.0-0
intel-openmp pkgs/main/linux-64::intel-openmp-2021.4.0-h06a4308_3561
mkl pkgs/main/linux-64::mkl-2021.4.0-h06a4308_640
ninja conda-forge/linux-64::ninja-1.10.2-h4bd325d_0
pytorch pytorch/linux-64::pytorch-1.4.0-py3.8_cpu_0
pytorch-mutex pytorch/noarch::pytorch-mutex-1.0-cpu
The following packages will be UPDATED:
nomkl conda-forge/noarch::nomkl-1.0-h5ca1d4~ --> pkgs/main/linux-64::nomkl-3.0-0
```
By pip instead
pip install torch
which downloads torch-1.10.1-cp38-cp38-manylinux1_x86_64.whl and installs as desired, without MKL.
Versions
```
$ python collect_env.py
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Debian GNU/Linux 10 (buster) (x86_64)
GCC version: (Debian 8.3.0-6) 8.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.28
Python version: 3.8.12 (default, Oct 12 2021, 13:49:34) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.0-1059-gcp-x86_64-with-glibc2.17
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] numpy==1.20.3
[conda] nomkl 1.0 h5ca1d4c_0 conda-forge
[conda] numpy 1.20.3 py38h9894fe3_1 conda-forge
```
🐛 Describe the bug
When installing pytorch with
cpuonly
andnomkl
, the pytorch recipe calls for the installation ofmkl
. Maybe I am misunderstanding, but I would think if you specifically ask fornomkl
then pytorch should be installed linked to OpenMP, as it would be if I installed with pip.Setup
The buggy command
The result
Both
nomkl
andmkl
are installed!By pip instead
which downloads
torch-1.10.1-cp38-cp38-manylinux1_x86_64.whl
and installs as desired, without MKL.Versions
cc @ezyang @seemethere @malfet