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
torch-cluster
Commits
c60c456c
Commit
c60c456c
authored
Apr 07, 2018
by
rusty1s
Browse files
rename
parent
e6812b97
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
16 deletions
+4
-16
build.py
build.py
+1
-1
build.sh
build.sh
+3
-5
build_new.sh
build_new.sh
+0
-10
No files found.
build.py
View file @
c60c456c
...
@@ -18,7 +18,7 @@ extra_objects = []
...
@@ -18,7 +18,7 @@ extra_objects = []
with_cuda
=
False
with_cuda
=
False
if
torch
.
cuda
.
is_available
():
if
torch
.
cuda
.
is_available
():
subprocess
.
call
([
'./build
_new
.sh'
,
osp
.
dirname
(
torch
.
__file__
)])
subprocess
.
call
([
'./build.sh'
,
osp
.
dirname
(
torch
.
__file__
)])
headers
+=
[
'aten/THCC/THCC{}.h'
.
format
(
f
)
for
f
in
files
]
headers
+=
[
'aten/THCC/THCC{}.h'
.
format
(
f
)
for
f
in
files
]
sources
+=
[
'aten/THCC/THCC{}.c'
.
format
(
f
)
for
f
in
files
]
sources
+=
[
'aten/THCC/THCC{}.c'
.
format
(
f
)
for
f
in
files
]
...
...
build.sh
View file @
c60c456c
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
echo
"Compiling kernel..."
echo
"Compiling kernel..."
if
[
-z
"
$1
"
]
;
then
TORCH
=
$(
python
-c
"import os; import torch; print(os.path.dirname(torch.__file__))"
)
;
else
TORCH
=
"
$1
"
;
fi
if
[
-z
"
$1
"
]
;
then
TORCH
=
$(
python
-c
"import os; import torch; print(os.path.dirname(torch.__file__))"
)
;
else
TORCH
=
"
$1
"
;
fi
SRC_DIR
=
torch_cluster/kernel
SRC_DIR
=
aten/THC
BUILD_DIR
=
torch_clus
te
r
/build
BUILD_DIR
=
a
te
n
/build
mkdir
-p
$BUILD_DIR
mkdir
-p
$BUILD_DIR
for
i
in
serial grid
;
do
$(
which nvcc
)
-c
-o
"
$BUILD_DIR
/THC.so"
"
$SRC_DIR
/THC.cu"
-arch
=
sm_52
-Xcompiler
-fPIC
-shared
"-I
$TORCH
/lib/include/TH"
"-I
$TORCH
/lib/include"
"-I
$SRC_DIR
"
$(
which nvcc
)
-c
-o
"
$BUILD_DIR
/
$i
.so"
"
$SRC_DIR
/
$i
.cu"
-arch
=
sm_35
-Xcompiler
-fPIC
-shared
"-I
$TORCH
/lib/include/TH"
"-I
$TORCH
/lib/include/THC"
"-I
$SRC_DIR
"
done
build_new.sh
deleted
100755 → 0
View file @
e6812b97
#!/bin/sh
echo
"Compiling kernel..."
if
[
-z
"
$1
"
]
;
then
TORCH
=
$(
python
-c
"import os; import torch; print(os.path.dirname(torch.__file__))"
)
;
else
TORCH
=
"
$1
"
;
fi
SRC_DIR
=
aten/THC
BUILD_DIR
=
aten/build
mkdir
-p
$BUILD_DIR
$(
which nvcc
)
-c
-o
"
$BUILD_DIR
/THC.so"
"
$SRC_DIR
/THC.cu"
-arch
=
sm_52
-Xcompiler
-fPIC
-shared
"-I
$TORCH
/lib/include/TH"
"-I
$TORCH
/lib/include"
"-I
$SRC_DIR
"
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