Skip to content

Commit 754ec9e

Browse files
bddppqfacebook-github-bot
authored andcommitted
Reduce rocm link time with ThinLTO
Summary: Pull Request resolved: pytorch#10758 Differential Revision: D9467554 Pulled By: bddppq fbshipit-source-id: 6853ccd96ac3209e062c110913ea37d6840c8134
1 parent 9767951 commit 754ec9e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.jenkins/caffe2/build.sh

+5
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ if [[ $BUILD_ENVIRONMENT == *rocm* ]]; then
156156
export LC_ALL=C.UTF-8
157157
export HCC_AMDGPU_TARGET=gfx900
158158
159+
# The link time of libcaffe2_hip.so takes 40 minutes, according to
160+
# https://github.com/RadeonOpenCompute/hcc#thinlto-phase-1---implemented
161+
# using using ThinLTO could significantly improve link-time performance.
162+
export KMTHINLTO=1
163+
159164
########## HIPIFY Caffe2 operators
160165
${PYTHON} "${ROOT_DIR}/tools/amd_build/build_pytorch_amd.py"
161166
${PYTHON} "${ROOT_DIR}/tools/amd_build/build_caffe2_amd.py"

0 commit comments

Comments
 (0)