Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Niegsch
slapos
Commits
18c4c3e2
Commit
18c4c3e2
authored
Oct 12, 2017
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/pytorch: Fix RPATH to use slapos libraries.
parent
437a5bc1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
component/pytorch/buildout.cfg
component/pytorch/buildout.cfg
+6
-3
component/pytorch/pytorch.4af66c4.patch
component/pytorch/pytorch.4af66c4.patch
+26
-0
No files found.
component/pytorch/buildout.cfg
View file @
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_}/
setup.py
.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_}/
pytorch
.4af66c4.patch ) || (rm -fr ${:location}; exit 1)
[pytorch-build-interpreter]
[pytorch-build-interpreter]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
...
@@ -49,7 +49,6 @@ workdir = ${pytorch-repository:location}
...
@@ -49,7 +49,6 @@ 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}
...
@@ -62,7 +61,6 @@ script =
...
@@ -62,7 +61,6 @@ 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']]),
...
@@ -78,6 +76,11 @@ script =
...
@@ -78,6 +76,11 @@ 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'
...
...
component/pytorch/
setup.py
.4af66c4.patch
→
component/pytorch/
pytorch
.4af66c4.patch
View file @
18c4c3e2
...
@@ -11,3 +11,16 @@ index 1d9a765..a50e9cb 100644
...
@@ -11,3 +11,16 @@ 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment