From 8bcf01631a14385df95230da4424b09f0375c52b Mon Sep 17 00:00:00 2001 From: Jagadish Krishnamoorthy Date: Wed, 4 Aug 2021 10:18:47 -0700 Subject: [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 Pull Request resolved: https://github.com/pytorch/pytorch/pull/62502 Reviewed By: malfet Differential Revision: D30089171 Pulled By: seemethere fbshipit-source-id: b07234ce66d48e3af113640995f923ee586b3cd9 --- .circleci/docker/common/install_rocm.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.circleci') 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 -- cgit v1.2.3