Skip to content

Commit 68bb8b0

Browse files
authored
Install blas & mkl (#1060)
* Install blas & mkl These are necessary for the TPU pytorch XLA. They also provide a significant perforance boost. They used to be automatically included when we were installing torch from conda but they are not now that we install torch from pip. I added a test to prevent regression. http://b/195414519 * separate conda commands to speed up resolution
1 parent 47a089a commit 68bb8b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ RUN conda config --add channels conda-forge && \
4242
conda config --add channels nvidia && \
4343
conda config --add channels rapidsai && \
4444
# ^ rapidsai is the highest priority channel, default lowest, conda-forge 2nd lowest.
45+
conda install mkl blas && \
4546
# b/161473620#comment7 pin required to prevent resolver from picking pysal 1.x., pysal 2.2.x is also downloading data on import.
4647
conda install cartopy=0.19 imagemagick=7.0 pyproj==3.1.0 pysal==2.1.0 && \
4748
/tmp/clean-layer.sh

tests/test_numpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ def test_array(self):
1212
# Numpy must be linked to the MKL. (Occasionally, a third-party package will muck up the installation
1313
# and numpy will be reinstalled with an OpenBLAS backing.)
1414
def test_mkl(self):
15-
# This will throw an exception if the MKL is not linked correctly.
16-
get_info("blas_mkl")
15+
# This will throw an exception if the MKL is not linked correctly or return an empty dict.
16+
self.assertTrue(get_info("blas_mkl"))

0 commit comments

Comments
 (0)