Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210130133
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210130133
Commits
c6ac67d5
Commit
c6ac67d5
authored
6 years ago
by
Yi Zhu
Committed by
Will Zhang
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: fix bug when elem in model < split num (#911)
* fix bug when elem cnt in model < split num * add checker
parent
e9630113
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
oneflow/core/kernel/reduce_gather_kernel.cpp
+2
-0
2 additions, 0 deletions
oneflow/core/kernel/reduce_gather_kernel.cpp
with
2 additions
and
0 deletions
oneflow/core/kernel/reduce_gather_kernel.cpp
+
2
−
0
View file @
c6ac67d5
...
...
@@ -8,11 +8,13 @@ void ReduceGatherKernel::ForwardDataContent(
char
*
dst_cur_dptr
=
out_blob
->
mut_dptr
<
char
>
();
for
(
const
std
::
string
&
ibn
:
this
->
op_attribute
().
input_bns
())
{
Blob
*
in_blob
=
BnInOp2Blob
(
ibn
);
if
(
!
in_blob
)
{
break
;
}
size_t
in_byte_size
=
in_blob
->
ByteSizeOfDataContentField
();
AutoMemcpy
(
ctx
.
device_ctx
,
dst_cur_dptr
,
in_blob
->
dptr
<
char
>
(),
in_byte_size
,
in_blob
->
mem_case
(),
out_blob
->
mem_case
());
dst_cur_dptr
+=
in_byte_size
;
}
CHECK_EQ
(
dst_cur_dptr
-
out_blob
->
mut_dptr
<
char
>
(),
out_blob
->
ByteSizeOfDataContentField
());
}
REGISTER_KERNEL
(
OperatorConf
::
kReduceGatherConf
,
ReduceGatherKernel
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment