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
e4b7207a
Commit
e4b7207a
authored
Feb 14, 2020
by
rusty1s
Browse files
script folder
parent
193136fd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
1 deletion
+154
-1
script/conda.sh
script/conda.sh
+26
-0
script/cuda.sh
script/cuda.sh
+94
-0
script/rename_wheel.py
script/rename_wheel.py
+24
-0
script/torch.sh
script/torch.sh
+9
-0
torch_cluster/__init__.py
torch_cluster/__init__.py
+1
-1
No files found.
script/conda.sh
0 → 100755
View file @
e4b7207a
#!/bin/bash
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
;
then
wget
-nv
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O
miniconda.sh
chmod
+x miniconda.sh
./miniconda.sh
-b
PATH
=
/home/travis/miniconda3/bin:
${
PATH
}
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"osx"
]
;
then
wget
-nv
https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
-O
miniconda.sh
chmod
+x miniconda.sh
./miniconda.sh
-b
PATH
=
/Users/travis/miniconda3/bin:
${
PATH
}
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
;
then
choco
install
openssl.light
choco
install
miniconda3
PATH
=
/c/tools/miniconda3/Scripts:
$PATH
fi
conda update
--yes
conda
conda create
--yes
-n
test
python
=
"
${
PYTHON_VERSION
}
"
script/cuda.sh
0 → 100755
View file @
e4b7207a
#!/bin/bash
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cpu"
]
;
then
export
TOOLKIT
=
cpuonly
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cu92"
]
;
then
export
CUDA_SHORT
=
9.2
export
CUDA
=
9.2.148-1
export
UBUNTU_VERSION
=
ubuntu1604
export
CUBLAS
=
cuda-cublas-dev-9-2
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cu100"
]
;
then
export
CUDA_SHORT
=
10.0
export
CUDA
=
10.0.130-1
export
UBUNTU_VERSION
=
ubuntu1804
export
CUBLAS
=
cuda-cublas-dev-10-0
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
$IDX
"
=
"cu101"
]
;
then
export
IDX
=
cu101
export
CUDA_SHORT
=
10.1
export
CUDA
=
10.1.105-1
export
UBUNTU_VERSION
=
ubuntu1804
export
CUBLAS
=
libcublas-dev
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
$IDX
"
=
"cpu"
]
;
then
export
TOOLKIT
=
cpuonly
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
$IDX
"
=
"cu92"
]
;
then
export
CUDA_SHORT
=
9.2
export
CUDA_URL
=
https://developer.nvidia.com/compute/cuda/
${
CUDA_SHORT
}
/Prod2/local_installers2
export
CUDA_FILE
=
cuda_
${
CUDA_SHORT
}
.148_win10
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
$IDX
"
=
"cu100"
]
;
then
export
CUDA_SHORT
=
10.0
export
CUDA_URL
=
https://developer.nvidia.com/compute/cuda/
${
CUDA_SHORT
}
/Prod/local_installers
export
CUDA_FILE
=
cuda_
${
CUDA_SHORT
}
.130_411.31_win10
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
$IDX
"
=
"cu101"
]
;
then
export
CUDA_SHORT
=
10.1
export
CUDA_URL
=
https://developer.nvidia.com/compute/cuda/
${
CUDA_SHORT
}
/Prod/local_installers
export
CUDA_FILE
=
cuda_
${
CUDA_SHORT
}
.105_418.96_win10.exe
export
TOOLKIT
=
"cudatoolkit=
${
CUDA_SHORT
}
"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"osx"
]
&&
[
"
$IDX
"
=
"cpu"
]
;
then
export
TOOLKIT
=
""
fi
if
[
"
${
IDX
}
"
=
"cpu"
]
;
then
export
FORCE_CPU
=
1
else
export
FORCE_CUDA
=
1
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
INSTALLER
=
cuda-repo-
${
UBUNTU_VERSION
}
_
${
CUDA
}
_amd64.deb
wget
-nv
"http://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/
${
INSTALLER
}
"
sudo
dpkg
-i
"
${
INSTALLER
}
"
wget
-nv
"https://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/7fa2af80.pub"
sudo
apt-key add 7fa2af80.pub
sudo
apt update
-qq
sudo
apt
install
-y
"cuda-core-
${
CUDA_SHORT
/./-
}
"
"cuda-cudart-dev-
${
CUDA_SHORT
/./-
}
"
"
${
CUBLAS
}
"
"cuda-cusparse-dev-
${
CUDA_SHORT
/./-
}
"
sudo
apt clean
CUDA_HOME
=
/usr/local/cuda-
${
CUDA_SHORT
}
LD_LIBRARY_PATH
=
${
CUDA_HOME
}
/lib64:
${
LD_LIBRARY_PATH
}
PATH
=
${
CUDA_HOME
}
/bin:
${
PATH
}
nvcc
--version
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
wget
-nv
"
${
CUDA_URL
}
/
${
CUDA_FILE
}
"
PowerShell
-Command
"Start-Process -FilePath
\"
${
CUDA_FILE
}
\"
-ArgumentList
\"
-s nvcc_
${
CUDA_SHORT
}
cublas_dev_
${
CUDA_SHORT
}
cusparse_dev_
${
CUDA_SHORT
}
\"
-Wait -NoNewWindow"
CUDA_HOME
=
/c/Program
\
Files/NVIDIA
\
GPU
\
Computing
\
Toolkit/CUDA/v
${
CUDA_SHORT
}
PATH
=
${
CUDA_HOME
}
/bin:
$PATH
PATH
=
/c/Program
\
Files
\ \(
x86
\)
/Microsoft
\
Visual
\
Studio/2017/BuildTools/MSBuild/15.0/Bin:
$PATH
nvcc
--version
fi
# Fix Cuda9.2 on Windows: https://github.com/pytorch/pytorch/issues/6109
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
=
"cu92"
]
;
then
sed
-i
.bak
-e
'129,141d'
"
${
CUDA_HOME
}
/include/crt/host_config.h"
fi
script/rename_wheel.py
0 → 100644
View file @
e4b7207a
import
sys
import
os
import
os.path
as
osp
import
glob
import
shutil
idx
=
sys
.
argv
[
1
]
assert
idx
in
[
'cpu'
,
'cu92'
,
'cu100'
,
'cu101'
]
dist_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'..'
,
'dist'
)
wheels
=
glob
.
glob
(
osp
.
join
(
'dist'
,
'**'
,
'*.whl'
),
recursive
=
True
)
for
wheel
in
wheels
:
if
idx
in
wheel
:
continue
paths
=
wheel
.
split
(
osp
.
sep
)
names
=
paths
[
-
1
].
split
(
'-'
)
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
'latest+'
+
idx
]
+
names
[
-
3
:])
shutil
.
copyfile
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
name
=
'-'
.
join
(
names
[:
-
4
]
+
[
names
[
-
4
]
+
'+'
+
idx
]
+
names
[
-
3
:])
os
.
rename
(
wheel
,
osp
.
join
(
*
paths
[:
-
1
],
name
))
script/torch.sh
0 → 100755
View file @
e4b7207a
#!/bin/bash
# Fix "member may not be initialized" error on Windows: https://github.com/pytorch/pytorch/issues/27958
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
sed
-i
.bak
-e
's/constexpr/const/g'
/c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/script/module.h
sed
-i
.bak
-e
's/constexpr/const/g'
/c/tools/miniconda3/envs/test/lib/site-packages/torch/include/torch/csrc/jit/argument_spec.h
sed
-i
.bak
-e
's/return \*(this->value)/return \*((type\*)this->value)/g'
/c/tools/miniconda3/envs/test/lib/site-packages/torch/include/pybind11/cast.h
fi
torch_cluster/__init__.py
View file @
e4b7207a
...
...
@@ -7,7 +7,7 @@ from .radius import radius, radius_graph
from
.rw
import
random_walk
from
.sampler
import
neighbor_sampler
__version__
=
'1.
4.5
'
__version__
=
'1.
5.0
'
__all__
=
[
'graclus_cluster'
,
...
...
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