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
0de1de3d
Unverified
Commit
0de1de3d
authored
Apr 26, 2024
by
Rhett Ying
Committed by
GitHub
Apr 26, 2024
Browse files
[dev] upgrade minimum required torch version to 2.0.0 (#7358)
parent
3afa105b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
python/dgl/backend/pytorch/tensor.py
python/dgl/backend/pytorch/tensor.py
+2
-2
script/create_dev_conda_env.sh
script/create_dev_conda_env.sh
+6
-6
tests/scripts/build_dgl.bat
tests/scripts/build_dgl.bat
+4
-0
No files found.
python/dgl/backend/pytorch/tensor.py
View file @
0de1de3d
...
@@ -12,8 +12,8 @@ from ... import ndarray as nd
...
@@ -12,8 +12,8 @@ from ... import ndarray as nd
from
...function.base
import
TargetCode
from
...function.base
import
TargetCode
from
...utils
import
version
from
...utils
import
version
if
version
.
parse
(
th
.
__version__
)
<
version
.
parse
(
"
1.13
.0"
):
if
version
.
parse
(
th
.
__version__
)
<
version
.
parse
(
"
2.0
.0"
):
raise
RuntimeError
(
"DGL requires PyTorch >=
1.13
.0"
)
raise
RuntimeError
(
"DGL requires PyTorch >=
2.0
.0"
)
def
data_type_dict
():
def
data_type_dict
():
...
...
script/create_dev_conda_env.sh
View file @
0de1de3d
#!/bin/bash
#!/bin/bash
readonly
CUDA_VERSIONS
=
"11.
6,11.
7,11.8,12.1"
readonly
CUDA_VERSIONS
=
"11.7,11.8,12.1"
readonly
TORCH_VERSION
=
"
1.13
.0"
readonly
TORCH_VERSION
=
"
2.0
.0"
readonly
PYTHON_VERSION
=
"3.
8
"
readonly
PYTHON_VERSION
=
"3.
10
"
usage
()
{
usage
()
{
cat
<<
EOF
cat
<<
EOF
...
@@ -10,8 +10,8 @@ usage: bash $0 OPTIONS
...
@@ -10,8 +10,8 @@ usage: bash $0 OPTIONS
examples:
examples:
bash
$0
-c
bash
$0
-c
bash
$0
-g 11.7
bash
$0
-g 11.7
bash
$0
-g 11.7 -p 3.
8
bash
$0
-g 11.7 -p 3.
10
bash
$0
-g 11.7 -p 3.
8
-t
1.13
.0
bash
$0
-g 11.7 -p 3.
10
-t
2.0
.0
bash
$0
-c -n dgl-dev-cpu
bash
$0
-c -n dgl-dev-cpu
Create a developement environment for DGL developers.
Create a developement environment for DGL developers.
...
@@ -29,7 +29,7 @@ OPTIONS:
...
@@ -29,7 +29,7 @@ OPTIONS:
-p Create dev environment based on specified python version.
-p Create dev environment based on specified python version.
-s Run silently which indicates always 'yes' for any confirmation.
-s Run silently which indicates always 'yes' for any confirmation.
-t Create dev environment based on specified PyTorch version such
-t Create dev environment based on specified PyTorch version such
as '
1.13
.0'.
as '
2.0
.0'.
EOF
EOF
}
}
...
...
tests/scripts/build_dgl.bat
View file @
0de1de3d
@ECHO
OFF
@ECHO
OFF
SETLOCAL
EnableDelayedExpansion
SETLOCAL
EnableDelayedExpansion
ECHO
"Current user:
%USERNAME%
"
python
--version
CALL
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
CALL
"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
CALL
mkvirtualenv
--system-site-packages
%BUILD_TAG%
CALL
mkvirtualenv
--system-site-packages
%BUILD_TAG%
DEL
/S /Q
build
DEL
/S /Q
build
...
...
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