Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
4d23a1b8
Commit
4d23a1b8
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
6da0d705
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
component/pytorch/buildout.cfg
component/pytorch/buildout.cfg
+6
-1
component/pytorch/pytorch.4af66c4.patch
component/pytorch/pytorch.4af66c4.patch
+26
-0
No files found.
component/pytorch/buildout.cfg
View file @
4d23a1b8
...
@@ -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
...
@@ -78,6 +78,11 @@ script =
...
@@ -78,6 +78,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 @
4d23a1b8
...
@@ -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