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
51651eca
"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "00eca4b8876aef281f4cefee6adde60239fa4938"
Unverified
Commit
51651eca
authored
Jan 19, 2022
by
Jinjing Zhou
Committed by
GitHub
Jan 19, 2022
Browse files
Fix test failure in multithread rpc test (#3660)
parent
e4cb4a37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/distributed/test_rpc.py
tests/distributed/test_rpc.py
+3
-2
No files found.
tests/distributed/test_rpc.py
View file @
51651eca
...
@@ -219,7 +219,7 @@ def test_multi_thread_rpc():
...
@@ -219,7 +219,7 @@ def test_multi_thread_rpc():
dgl
.
distributed
.
send_request
(
0
,
req
)
dgl
.
distributed
.
send_request
(
0
,
req
)
def
subthread_call
(
server_id
):
def
subthread_call
(
server_id
):
req
=
HelloRequest
(
STR
,
INTEGER
,
TENSOR
+
server_id
,
simple_func
)
req
=
HelloRequest
(
STR
,
INTEGER
,
TENSOR
,
simple_func
)
dgl
.
distributed
.
send_request
(
server_id
,
req
)
dgl
.
distributed
.
send_request
(
server_id
,
req
)
...
@@ -229,8 +229,9 @@ def test_multi_thread_rpc():
...
@@ -229,8 +229,9 @@ def test_multi_thread_rpc():
res0
=
dgl
.
distributed
.
recv_response
()
res0
=
dgl
.
distributed
.
recv_response
()
res1
=
dgl
.
distributed
.
recv_response
()
res1
=
dgl
.
distributed
.
recv_response
()
# Order is not guaranteed
assert_array_equal
(
F
.
asnumpy
(
res0
.
tensor
),
F
.
asnumpy
(
TENSOR
))
assert_array_equal
(
F
.
asnumpy
(
res0
.
tensor
),
F
.
asnumpy
(
TENSOR
))
assert_array_equal
(
F
.
asnumpy
(
res1
.
tensor
),
F
.
asnumpy
(
TENSOR
+
1
))
assert_array_equal
(
F
.
asnumpy
(
res1
.
tensor
),
F
.
asnumpy
(
TENSOR
))
dgl
.
distributed
.
exit_client
()
dgl
.
distributed
.
exit_client
()
start_client_multithread
(
"rpc_ip_config_multithread.txt"
)
start_client_multithread
(
"rpc_ip_config_multithread.txt"
)
...
...
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