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
45e9fbb9
Commit
45e9fbb9
authored
Nov 30, 2024
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add time count
parent
c8c62f90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
starrygl/sample/count_static.py
+1
-1
starrygl/sample/data_loader.py
+4
-0
No files found.
starrygl/sample/count_static.py
View file @
45e9fbb9
...
...
@@ -32,7 +32,7 @@ class time_count:
@staticmethod
def
start_gpu
():
# Uncomment for better breakdown timings
torch
.
cuda
.
synchronize
()
#
torch.cuda.synchronize()
start_event
=
torch
.
cuda
.
Event
(
enable_timing
=
True
)
end_event
=
torch
.
cuda
.
Event
(
enable_timing
=
True
)
start_event
.
record
()
...
...
starrygl/sample/data_loader.py
View file @
45e9fbb9
...
...
@@ -293,6 +293,7 @@ class DistributedDataLoader:
t3
=
time
.
time
()
self
.
result_queue
.
append
((
batch_data
,
dist_nid
,
dist_eid
,
edge_feat
,
node_feat
))
tt
.
time_memory_fetch
+=
tt
.
elapsed_event
(
t1
)
#print(tt.time_memory_fetch)
t1
=
tt
.
start_gpu
()
self
.
submit
()
tt
.
time_sample_and_build
+=
tt
.
elapsed_event
(
t1
)
...
...
@@ -326,6 +327,7 @@ class DistributedDataLoader:
node_feat
,
mem
=
get_node_feature_by_dist
(
self
.
graph
,
self
.
mailbox
,
dist_nid
,
is_local
,
out_device
=
self
.
device
)
prepare_input
(
node_feat
,
edge_feat
,
mem
,
mfgs
,
dist_nid
,
dist_eid
)
tt
.
time_memory_fetch
+=
tt
.
elapsed_event
(
t1
)
#print(tt.time_memory_fetch)
if
(
self
.
mailbox
is
not
None
and
self
.
mailbox
.
historical_cache
is
not
None
):
id
=
batch_data
[
1
][
0
][
0
]
.
srcdata
[
'ID'
]
mask
=
DistIndex
(
id
)
.
is_shared
...
...
@@ -363,6 +365,8 @@ class DistributedDataLoader:
batch_data
[
1
][
0
][
0
]
.
srcdata
[
'his_mem'
]
=
batch_data
[
1
][
0
][
0
]
.
srcdata
[
'mem'
]
.
clone
()
batch_data
[
1
][
0
][
0
]
.
srcdata
[
'his_ts'
]
=
batch_data
[
1
][
0
][
0
]
.
srcdata
[
'mail_ts'
]
.
clone
()
tt
.
time_memory_fetch
+=
tt
.
elapsed_event
(
t1
)
#print(tt.time_memory_fetch)
#if(self.mailbox is not None and self.mailbox.historical_cache is not None):
# id = batch_data[1][0][0].srcdata['ID']
# mask = DistIndex(id).is_shared
...
...
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