Commit 6da0d705 authored by Yusei Tahara's avatar Yusei Tahara

Revert "component/pytorch: Fix RPATH to use slapos libraries."

This reverts commit 18c4c3e2.
parent 18c4c3e2
...@@ -23,7 +23,7 @@ commit = 4af66c43045a317b477918c503d105f565b4a66b ...@@ -23,7 +23,7 @@ commit = 4af66c43045a317b477918c503d105f565b4a66b
git-binary = ${git:location}/bin/git git-binary = ${git:location}/bin/git
patch-binary = ${patch:location}/bin/patch patch-binary = ${patch:location}/bin/patch
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = export HOME=${:location}; (${:git-binary} clone --recursive --quiet -b ${:tag} ${:repository} ${:location}; cd ${:location}; ${:git-binary} checkout ${:commit}; ${:patch-binary} -p1 -d . < ${:_profile_base_location_}/pytorch.4af66c4.patch ) || (rm -fr ${:location}; exit 1) command = export HOME=${:location}; (${:git-binary} clone --recursive --quiet -b ${:tag} ${:repository} ${:location}; cd ${:location}; ${:git-binary} checkout ${:commit}; ${:patch-binary} -p1 -d . < ${:_profile_base_location_}/setup.py.4af66c4.patch ) || (rm -fr ${:location}; exit 1)
[pytorch-build-interpreter] [pytorch-build-interpreter]
recipe = zc.recipe.egg recipe = zc.recipe.egg
...@@ -49,6 +49,7 @@ workdir = ${pytorch-repository:location} ...@@ -49,6 +49,7 @@ workdir = ${pytorch-repository:location}
python-bin = ${buildout:bin-directory}/${pytorch-build-interpreter:interpreter} python-bin = ${buildout:bin-directory}/${pytorch-build-interpreter:interpreter}
no-cuda = 0 no-cuda = 0
cmake-bin = ${cmake:location}/bin cmake-bin = ${cmake:location}/bin
git-bin = ${git:location}/bin
binutils-location = ${binutils:location} binutils-location = ${binutils:location}
gcc-location = ${gcc:location} gcc-location = ${gcc:location}
openblas-location = ${openblas:location} openblas-location = ${openblas:location}
...@@ -61,6 +62,7 @@ script = ...@@ -61,6 +62,7 @@ script =
openblas_location = self.options['openblas-location'] openblas_location = self.options['openblas-location']
env = {'PYTHONPATH':workdir, env = {'PYTHONPATH':workdir,
'PATH':':'.join([self.options['cmake-bin'], 'PATH':':'.join([self.options['cmake-bin'],
self.options['git-bin'],
binutils_location+'/bin', binutils_location+'/bin',
gcc_location+'/bin', gcc_location+'/bin',
os.environ['PATH']]), os.environ['PATH']]),
...@@ -76,11 +78,6 @@ script = ...@@ -76,11 +78,6 @@ script =
'CC':gcc_location+'/bin/gcc', 'CC':gcc_location+'/bin/gcc',
'CXX':gcc_location+'/bin/g++', 'CXX':gcc_location+'/bin/g++',
'PYTORCH_PYTHON':python_bin, 'PYTORCH_PYTHON':python_bin,
'SLAPOS_COMPILE_ARGS':' '.join(['-Wl,-rpath,'+gcc_location+'/lib',
'-Wl,-rpath,'+gcc_location+'/lib64',
'-Wl,-rpath,'+binutils_location+'/lib',
'-Wl,-rpath,'+openblas_location+'/lib',
])
} }
if self.options.get('no-cuda') == '1': if self.options.get('no-cuda') == '1':
env['NO_CUDA'] = '1' env['NO_CUDA'] = '1'
......
...@@ -11,16 +11,3 @@ index 1d9a765..a50e9cb 100644 ...@@ -11,16 +11,3 @@ index 1d9a765..a50e9cb 100644
if WITH_SYSTEM_NCCL: if WITH_SYSTEM_NCCL:
my_env["NCCL_ROOT_DIR"] = NCCL_ROOT_DIR my_env["NCCL_ROOT_DIR"] = NCCL_ROOT_DIR
if WITH_CUDA: if WITH_CUDA:
diff --git a/torch/lib/build_libs.sh b/torch/lib/build_libs.sh
index af7020e..a91bd05 100755
--- a/torch/lib/build_libs.sh
+++ b/torch/lib/build_libs.sh
@@ -24,7 +24,7 @@ C_FLAGS=" -DTH_INDEX_BASE=0 -I$INSTALL_DIR/include \
-I$INSTALL_DIR/include/THS -I$INSTALL_DIR/include/THCS \
-I$INSTALL_DIR/include/THPP -I$INSTALL_DIR/include/THNN \
-I$INSTALL_DIR/include/THCUNN"
-LDFLAGS="-L$INSTALL_DIR/lib "
+LDFLAGS="-L$INSTALL_DIR/lib $SLAPOS_COMPILE_ARGS"
LD_POSTFIX=".so.1"
LD_POSTFIX_UNVERSIONED=".so"
if [[ $(uname) == 'Darwin' ]]; then
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment