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
30067609
Commit
30067609
authored
May 18, 2023
by
Ted Themistokleous
Browse files
More debug
parent
6a331a5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
src/onnx/parse_topk.cpp
src/onnx/parse_topk.cpp
+1
-1
src/targets/gpu/device/nonzero.cpp
src/targets/gpu/device/nonzero.cpp
+1
-1
test/verify/test_gather.cpp
test/verify/test_gather.cpp
+1
-0
test/verify/test_gathernd_default.cpp
test/verify/test_gathernd_default.cpp
+1
-0
No files found.
src/onnx/parse_topk.cpp
View file @
30067609
...
@@ -49,7 +49,7 @@ struct parse_topk : op_parser<parse_topk>
...
@@ -49,7 +49,7 @@ struct parse_topk : op_parser<parse_topk>
}
}
else
if
(
contains
(
info
.
attributes
,
"k"
))
else
if
(
contains
(
info
.
attributes
,
"k"
))
{
{
k
=
5
;
//info.attributes.at("k").i();
k
=
5
;
//
info.attributes.at("k").i();
}
}
bool
largest
=
true
;
bool
largest
=
true
;
...
...
src/targets/gpu/device/nonzero.cpp
View file @
30067609
...
@@ -46,7 +46,7 @@ argument nonzero(hipStream_t stream, const argument& result, const argument& arg
...
@@ -46,7 +46,7 @@ argument nonzero(hipStream_t stream, const argument& result, const argument& arg
auto
*
ptr
=
result
.
cast
<
int64_t
>
();
auto
*
ptr
=
result
.
cast
<
int64_t
>
();
gs_launch
(
stream
,
block_size
,
block_size
)([
=
](
auto
,
auto
idx
)
__device__
{
gs_launch
(
stream
,
block_size
,
block_size
)([
=
](
auto
,
auto
idx
)
__device__
{
// fill all output to 0 first
// fill all output to 0 first
idx
.
local_stride
(
out_elem_num
-
1
,
[
&
](
auto
j
)
{
ptr
[
j
]
=
0
;
});
idx
.
local_stride
(
out_elem_num
,
[
&
](
auto
j
)
{
ptr
[
j
]
=
0
;
});
block_scan
<
block_size
>
(
block_scan
<
block_size
>
(
idx
,
idx
,
...
...
test/verify/test_gather.cpp
View file @
30067609
...
@@ -41,6 +41,7 @@ struct test_gather : verify_program<test_gather<Axis>>
...
@@ -41,6 +41,7 @@ struct test_gather : verify_program<test_gather<Axis>>
auto
a1
=
mm
->
add_literal
(
migraphx
::
literal
{
s_indices
,
indices
});
auto
a1
=
mm
->
add_literal
(
migraphx
::
literal
{
s_indices
,
indices
});
int
axis
=
Axis
;
int
axis
=
Axis
;
mm
->
add_instruction
(
migraphx
::
make_op
(
"gather"
,
{{
"axis"
,
axis
}}),
a0
,
a1
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"gather"
,
{{
"axis"
,
axis
}}),
a0
,
a1
);
p
.
debug_print
();
return
p
;
return
p
;
}
}
};
};
...
...
test/verify/test_gathernd_default.cpp
View file @
30067609
...
@@ -38,6 +38,7 @@ struct test_gathernd_default : verify_program<test_gathernd_default>
...
@@ -38,6 +38,7 @@ struct test_gathernd_default : verify_program<test_gathernd_default>
auto
a0
=
mm
->
add_parameter
(
"data"
,
ds
);
auto
a0
=
mm
->
add_parameter
(
"data"
,
ds
);
auto
a1
=
mm
->
add_literal
(
migraphx
::
literal
{
is
,
indices
});
auto
a1
=
mm
->
add_literal
(
migraphx
::
literal
{
is
,
indices
});
mm
->
add_instruction
(
migraphx
::
make_op
(
"gathernd"
),
a0
,
a1
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"gathernd"
),
a0
,
a1
);
p
.
debug_print
();
return
p
;
return
p
;
}
}
};
};
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