Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
starrty_sampler
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
starrty_sampler
Commits
faec7932
Commit
faec7932
authored
Feb 24, 2023
by
zljJoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20230204
parent
3e80e491
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
33 deletions
+2
-33
message_worker.py
+2
-33
No files found.
message_worker.py
View file @
faec7932
...
...
@@ -63,6 +63,7 @@ class message_worker:
print
(
t2
-
t1
,
t3
-
t2
,
t4
-
t3
,
time
.
time
()
-
t4
)
def
get_attr
(
self
,
node_feature
,
ob_rrefs
):
local_feature
=
self
.
get_localattr
(
node_feature
[
self
.
rank
])
futs
=
[]
part
=
0
for
i
in
range
(
self
.
worker_size
):
...
...
@@ -78,39 +79,7 @@ class message_worker:
for
fut
in
futs
:
feature_part
=
fut
.
wait
()
local_feature
=
self
.
get_localattr
(
node_feature
[
self
.
rank
])
''''
#get remote attr
def get_list_attr(self,node_list,ob_rrefs):
feature=torch.zeros(node_list,self.graph.get_attr_size())
sample_info={}
for ob_rank in range(1,self.world_size):
sample_info[ob_rank]=[]
futs=[]
node_feature={}
for i in range(node_list.size()):
for nid in range(node_list[i]):
part_id=self.graph.get_nodepart(nid)
if(self.id!=part_id):
sample_info[part_id].append(nid)
else:
node_feature[nid]=self.graph.get_nodeattr(nid)
for ob_rank in range(1,self.world_size):
if(ob_rank != self.id and sample_info[ob_rank]):
sample_info=set(sample_info[ob_rank]).
futs.append(
rpc_async(
ob_rrefs[ob_rank-1].owner(),
ob_rrefs[ob_rank-1].rpc_sync().get_localattr,
args=(sample_info[ob_rank])
)
)
for fut in futs:
feature_part=fut.wait()
for f in feature_part:
node_feature[f[0]]=f[1:]
return
'''
def
get_localattr
(
self
,
node_list
):
local_id
=
self
.
graph
.
get_localId_by_partitionId
(
self
.
rank
,
node_list
)
...
...
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