File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,9 @@ set(OPENCV_LIBS
185185 "libjpeg.so"
186186)
187187
188+ # The patchelf commands ensure the MKL libraries are loaded correctly during runtime
189+ # Without these, the framework/backend complains of missing libraries / symbols and
190+ # in some cases leads to segmentation faults.
188191if (${TRITON_PYTORCH_DOCKER_BUILD} )
189192 string (REPLACE ";" " " CONDA_LIBS_STR "${CONDA_LIBS} " )
190193
@@ -228,6 +231,10 @@ if (${TRITON_PYTORCH_DOCKER_BUILD})
228231 COMMAND /bin/sh -c "if [ -f libmkl_avx2.so ]; then patchelf --add-needed libmkl_core.so libmkl_avx2.so; fi"
229232 COMMAND /bin/sh -c "if [ -f libmkl_avx512.so ]; then patchelf --add-needed libmkl_gnu_thread.so libmkl_avx512.so; fi"
230233 COMMAND /bin/sh -c "if [ -f libmkl_avx512.so ]; then patchelf --add-needed libmkl_core.so libmkl_avx512.so; fi"
234+ COMMAND /bin/sh -c "if [ -f libmkl_vml_def.so ]; then patchelf --add-needed libmkl_gnu_thread.so libmkl_vml_def.so; fi"
235+ COMMAND /bin/sh -c "if [ -f libmkl_vml_def.so ]; then patchelf --add-needed libmkl_intel_thread.so libmkl_vml_def.so; fi"
236+ COMMAND /bin/sh -c "if [ -f libmkl_vml_def.so ]; then patchelf --add-needed libmkl_core.so libmkl_vml_def.so; fi"
237+ COMMAND /bin/sh -c "patchelf --add-needed libmkl_intel_lp64.so libmkl_intel_thread.so"
231238 COMMAND docker rm pytorch_backend_ptlib
232239 COMMENT "Extracting pytorch and torchvision libraries and includes from ${TRITON_PYTORCH_DOCKER_IMAGE} "
233240 VERBATIM
You can’t perform that action at this time.
0 commit comments