summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagadish Krishnamoorthy <jagdish.krishna@gmail.com>2021-08-04 10:18:47 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2021-08-04 10:19:55 -0700
commit8bcf01631a14385df95230da4424b09f0375c52b (patch)
tree83aa5168d893b411b9d0faf6472d6760a0ba7cd2
parentdfdc3069e73caa0ae9344bd1130dd3bdc42353ee (diff)
downloadpytorch-8bcf01631a14385df95230da4424b09f0375c52b.tar.gz
pytorch-8bcf01631a14385df95230da4424b09f0375c52b.tar.bz2
pytorch-8bcf01631a14385df95230da4424b09f0375c52b.zip
[ROCm] update magma (#62502)
Summary: Update magma to point to magma_ctrl_launch_bounds branch. When upstream magma branch is used, cholesky tests in test_ops.py and test_linalg.py fails due to "Intel MKL ERROR: Parameter 4 was incorrect on entry to DPOTRF." Suspect commit: [35325212b15c5baadd7493d61b19b2db2635cb68](https://bitbucket.org/icl/magma/commits/35325212b15c5baadd7493d61b19b2db2635cb68) in magma master. Signed-off-by: Jagadish Krishnamoorthy <jagdish.krishna@gmail.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/62502 Reviewed By: malfet Differential Revision: D30089171 Pulled By: seemethere fbshipit-source-id: b07234ce66d48e3af113640995f923ee586b3cd9
-rw-r--r--.circleci/docker/common/install_rocm.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/.circleci/docker/common/install_rocm.sh b/.circleci/docker/common/install_rocm.sh
index f4cdbc4226..fa4df9a81b 100644
--- a/.circleci/docker/common/install_rocm.sh
+++ b/.circleci/docker/common/install_rocm.sh
@@ -4,9 +4,13 @@ set -ex
install_magma() {
# "install" hipMAGMA into /opt/rocm/magma by copying after build
- git clone https://bitbucket.org/icl/magma.git
+ git clone https://bitbucket.org/icl/magma.git -b magma_ctrl_launch_bounds
pushd magma
- git checkout aed4e285084763113ce5757393d4008e27b5194b
+ # The branch "magma_ctrl_launch_bounds" is having a fix over the below commit, so keeping the below comment for reference.
+ #git checkout 878b1ce02e9cfe4a829be22c8f911e9c0b6bd88f
+ # Work around non-asii characters in certain magma sources; remove this after upstream magma fixes this.
+ perl -i.bak -pe 's/[^[:ascii:]]//g' sparse/control/magma_zfree.cpp
+ perl -i.bak -pe 's/[^[:ascii:]]//g' sparse/control/magma_zsolverinfo.cpp
cp make.inc-examples/make.inc.hip-gcc-mkl make.inc
echo 'LIBDIR += -L$(MKLROOT)/lib' >> make.inc
echo 'LIB += -Wl,--enable-new-dtags -Wl,--rpath,/opt/rocm/lib -Wl,--rpath,$(MKLROOT)/lib -Wl,--rpath,/opt/rocm/magma/lib' >> make.inc
@@ -15,7 +19,7 @@ install_magma() {
sed -i 's/^FOPENMP/#FOPENMP/g' make.inc
export PATH="${PATH}:/opt/rocm/bin"
make -f make.gen.hipMAGMA -j $(nproc)
- LANG=C.UTF-8 make lib/libmagma.so -j $(nproc) MKLROOT=/opt/conda
+ make lib/libmagma.so -j $(nproc) MKLROOT=/opt/conda
make testing/testing_dgemm -j $(nproc) MKLROOT=/opt/conda
popd
mv magma /opt/rocm