Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BTS-MTGNN
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhlj
BTS-MTGNN
Commits
e4ac1c7a
Commit
e4ac1c7a
authored
Jul 24, 2023
by
Wenjie Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support cpu training
parent
f4af3231
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
starrygl/loader/__init__.py
+8
-2
starrygl/parallel/__init__.py
+1
-1
No files found.
starrygl/loader/__init__.py
View file @
e4ac1c7a
...
...
@@ -138,7 +138,10 @@ class NodeHandle:
return
x
,
fut
def
async_select
(
self
,
src
:
Union
[
Tensor
,
TensorBuffer
],
idx
:
Tensor
)
->
torch
.
futures
.
Future
[
Tensor
]:
fut
=
torch
.
futures
.
Future
(
devices
=
[
self
.
_device
])
if
self
.
_device
!=
torch
.
device
(
"cpu"
):
fut
=
torch
.
futures
.
Future
(
devices
=
[
self
.
_device
])
else
:
fut
=
torch
.
futures
.
Future
()
def
run
():
try
:
with
torch
.
no_grad
():
...
...
@@ -157,7 +160,10 @@ class NodeHandle:
def
async_update
(
self
,
src
:
Union
[
Tensor
,
TensorBuffer
],
val
:
Tensor
,
idx
:
Tensor
,
ops
:
str
=
"mov"
)
->
torch
.
futures
.
Future
:
assert
ops
in
[
"mov"
,
"add"
]
fut
=
torch
.
futures
.
Future
(
devices
=
[
self
.
_device
])
if
self
.
_device
!=
torch
.
device
(
"cpu"
):
fut
=
torch
.
futures
.
Future
(
devices
=
[
self
.
_device
])
else
:
fut
=
torch
.
futures
.
Future
()
def
run
():
try
:
with
torch
.
no_grad
():
...
...
starrygl/parallel/__init__.py
View file @
e4ac1c7a
...
...
@@ -6,7 +6,7 @@ import torch.distributed.rpc as rpc
import
os
from
typing
import
*
from
.degree
import
compute_in_degree
,
compute_out_degree
,
compute_gcn_norm
#
from .degree import compute_in_degree, compute_out_degree, compute_gcn_norm
from
.sync_bn
import
SyncBatchNorm
def
convert_parallel_model
(
...
...
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