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
b1506c73
Unverified
Commit
b1506c73
authored
Mar 29, 2023
by
Paul Fultz II
Committed by
GitHub
Mar 29, 2023
Browse files
Fix bug when concatting with the vectorization axis (#1653)
parent
7d26eb9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
src/targets/gpu/jit/concat.cpp
src/targets/gpu/jit/concat.cpp
+3
-1
test/verify/test_concat_axis_2.cpp
test/verify/test_concat_axis_2.cpp
+6
-7
No files found.
src/targets/gpu/jit/concat.cpp
View file @
b1506c73
...
@@ -78,7 +78,9 @@ struct concat_compiler : compiler<concat_compiler>
...
@@ -78,7 +78,9 @@ struct concat_compiler : compiler<concat_compiler>
options
.
params
=
"-Wno-float-equal"
;
options
.
params
=
"-Wno-float-equal"
;
options
.
kernel_name
=
v
.
get
(
"kernel"
,
"concat_kernel"
);
options
.
kernel_name
=
v
.
get
(
"kernel"
,
"concat_kernel"
);
auto
axis
=
find_fast_axis
(
options
.
inputs
);
auto
axis
=
find_fast_axis
(
options
.
inputs
);
auto
vec
=
vectorize
::
elements
(
ctx
,
axis
,
options
.
inputs
);
vectorize
vec
{};
if
(
axis
!=
v
.
at
(
"axis"
).
to
<
std
::
size_t
>
())
vec
=
vectorize
::
elements
(
ctx
,
axis
,
options
.
inputs
);
options
.
set_launch_params
(
options
.
set_launch_params
(
v
,
compute_global_for
(
ctx
,
get_concat_elements
(
options
.
inputs
)
/
vec
.
size
,
256
));
v
,
compute_global_for
(
ctx
,
get_concat_elements
(
options
.
inputs
)
/
vec
.
size
,
256
));
auto
src
=
interpolate_string
(
auto
src
=
interpolate_string
(
...
...
test/verify/test_concat_axis_2.cpp
View file @
b1506c73
...
@@ -33,13 +33,12 @@ struct test_concat_axis_2 : verify_program<test_concat_axis_2>
...
@@ -33,13 +33,12 @@ struct test_concat_axis_2 : verify_program<test_concat_axis_2>
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s0
{
migraphx
::
shape
::
int32_type
,
{
3
,
2
,
1
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
int32_type
,
{
3
,
2
,
1
}};
migraphx
::
shape
s1
{
migraphx
::
shape
::
int32_type
,
{
3
,
2
,
1
}};
auto
x0
=
mm
->
add_parameter
(
"x0"
,
s
);
migraphx
::
shape
s2
{
migraphx
::
shape
::
int32_type
,
{
3
,
2
,
1
}};
auto
x1
=
mm
->
add_parameter
(
"x1"
,
s
);
auto
l0
=
mm
->
add_parameter
(
"x"
,
s0
);
auto
x2
=
mm
->
add_parameter
(
"x2"
,
s
);
auto
l1
=
mm
->
add_parameter
(
"y"
,
s1
);
auto
x3
=
mm
->
add_parameter
(
"x3"
,
s
);
auto
l2
=
mm
->
add_parameter
(
"z"
,
s2
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"concat"
,
{{
"axis"
,
2
}}),
x0
,
x1
,
x2
,
x3
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"concat"
,
{{
"axis"
,
2
}}),
l0
,
l1
,
l2
);
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