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
a4a7e02f
"examples/vscode:/vscode.git/clone" did not exist on "7ea777e1222686b2e07534526ebd152ff694bbde"
Unverified
Commit
a4a7e02f
authored
Aug 19, 2020
by
Chao Ma
Committed by
GitHub
Aug 19, 2020
Browse files
[BugFix] Fix a small bug on kvstore (#2058)
* small fix * update
parent
6e8f7605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
13 deletions
+2
-13
python/dgl/distributed/rpc.py
python/dgl/distributed/rpc.py
+2
-3
src/rpc/rpc.cc
src/rpc/rpc.cc
+0
-10
No files found.
python/dgl/distributed/rpc.py
View file @
a4a7e02f
...
...
@@ -991,11 +991,10 @@ def register_ctrl_c():
"""
_CAPI_DGLRPCHandleCtrlC
()
def
copy_data_to_shared_memory
(
source
,
dst
):
def
copy_data_to_shared_memory
(
dst
,
source
):
"""Copy tensor data to shared-memory tensor
"""
_CAPI_DGLCopyDataToSharedMemory
(
F
.
zerocopy_to_dgl_ndarray
(
source
),
F
.
zerocopy_to_dgl_ndarray
(
dst
))
F
.
zerocopy_to_dgl_ndarray
(
dst
).
copyfrom
(
F
.
zerocopy_to_dgl_ndarray
(
source
))
############### Some basic services will be defined here #############
...
...
src/rpc/rpc.cc
View file @
a4a7e02f
...
...
@@ -476,15 +476,5 @@ DGL_REGISTER_GLOBAL("distributed.rpc._CAPI_DGLRPCFastPull")
*
rv
=
res_tensor
;
});
DGL_REGISTER_GLOBAL
(
"distributed.rpc._CAPI_DGLCopyDataToSharedMemory"
)
.
set_body
([]
(
DGLArgs
args
,
DGLRetValue
*
rv
)
{
NDArray
source
=
args
[
0
];
NDArray
dst
=
args
[
1
];
CHECK_EQ
(
source
.
GetSize
(),
dst
.
GetSize
());
char
*
src_ptr
=
static_cast
<
char
*>
(
source
->
data
);
char
*
dst_ptr
=
static_cast
<
char
*>
(
dst
->
data
);
memcpy
(
src_ptr
,
dst_ptr
,
dst
.
GetSize
());
});
}
// namespace rpc
}
// namespace dgl
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