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
gaoqiong
MIGraphX
Commits
e4fc4d67
Commit
e4fc4d67
authored
Mar 09, 2019
by
Paul
Browse files
Improve outputs of load
parent
62ab25fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/include/migraphx/operators.hpp
src/include/migraphx/operators.hpp
+10
-0
No files found.
src/include/migraphx/operators.hpp
View file @
e4fc4d67
...
...
@@ -1174,9 +1174,19 @@ struct load
}
argument
compute
(
const
shape
&
,
const
std
::
vector
<
argument
>&
args
)
const
{
if
((
offset
+
s
.
bytes
())
>
args
[
0
].
get_shape
().
bytes
())
MIGRAPHX_THROW
(
"Load access is out of bounds"
);
return
{
s
,
args
[
0
].
data
()
+
offset
};
}
int
output_alias
(
const
std
::
vector
<
shape
>&
)
const
{
return
0
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
load
&
op
)
{
os
<<
op
.
name
()
<<
"["
;
os
<<
"offset="
<<
op
.
offset
<<
","
;
os
<<
"end="
<<
(
op
.
offset
+
op
.
s
.
bytes
())
<<
"]"
;
return
os
;
}
};
struct
outline
...
...
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