Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
5f1babf0
Unverified
Commit
5f1babf0
authored
Feb 15, 2023
by
Quan (Andy) Gan
Committed by
GitHub
Feb 15, 2023
Browse files
fix build for multiple pytorch versions (#5289)
parent
40c968b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
dgl_sparse/build.sh
dgl_sparse/build.sh
+5
-1
tensoradapter/pytorch/build.sh
tensoradapter/pytorch/build.sh
+5
-1
No files found.
dgl_sparse/build.sh
View file @
5f1babf0
...
@@ -23,8 +23,12 @@ if [ $# -eq 0 ]; then
...
@@ -23,8 +23,12 @@ if [ $# -eq 0 ]; then
cp
-v
$CPSOURCE
$BINDIR
/dgl_sparse
cp
-v
$CPSOURCE
$BINDIR
/dgl_sparse
else
else
for
PYTHON_INTERP
in
$@
;
do
for
PYTHON_INTERP
in
$@
;
do
$CMAKE_COMMAND
$CMAKE_FLAGS
-DPYTHON_INTERP
=
$PYTHON_INTERP
..
TORCH_VER
=
$(
$PYTHON_INTERP
-c
'import torch; print(torch.__version__.split("+")[0])'
)
mkdir
-p
$TORCH_VER
cd
$TORCH_VER
$CMAKE_COMMAND
$CMAKE_FLAGS
-DPYTHON_INTERP
=
$PYTHON_INTERP
../..
make
-j
make
-j
cp
-v
$CPSOURCE
$BINDIR
/dgl_sparse
cp
-v
$CPSOURCE
$BINDIR
/dgl_sparse
cd
..
done
done
fi
fi
tensoradapter/pytorch/build.sh
View file @
5f1babf0
...
@@ -20,8 +20,12 @@ if [ $# -eq 0 ]; then
...
@@ -20,8 +20,12 @@ if [ $# -eq 0 ]; then
cp
-v
$CPSOURCE
$BINDIR
/tensoradapter/pytorch
cp
-v
$CPSOURCE
$BINDIR
/tensoradapter/pytorch
else
else
for
PYTHON_INTERP
in
$@
;
do
for
PYTHON_INTERP
in
$@
;
do
$CMAKE_COMMAND
$CMAKE_FLAGS
-DPYTHON_INTERP
=
$PYTHON_INTERP
..
TORCH_VER
=
$(
$PYTHON_INTERP
-c
'import torch; print(torch.__version__.split("+")[0])'
)
mkdir
-p
$TORCH_VER
cd
$TORCH_VER
$CMAKE_COMMAND
$CMAKE_FLAGS
-DPYTHON_INTERP
=
$PYTHON_INTERP
../..
make
-j
make
-j
cp
-v
$CPSOURCE
$BINDIR
/tensoradapter/pytorch
cp
-v
$CPSOURCE
$BINDIR
/tensoradapter/pytorch
cd
..
done
done
fi
fi
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