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
d316d529
Commit
d316d529
authored
Jun 06, 2023
by
Alan Turner
Browse files
Formatting
parent
6aac0e76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
src/onnx/parse_where.cpp
src/onnx/parse_where.cpp
+4
-3
src/targets/gpu/jit/ck_gemm.cpp
src/targets/gpu/jit/ck_gemm.cpp
+4
-4
No files found.
src/onnx/parse_where.cpp
View file @
d316d529
...
@@ -59,12 +59,13 @@ struct parse_where : op_parser<parse_where>
...
@@ -59,12 +59,13 @@ struct parse_where : op_parser<parse_where>
compute_broadcasted_lens
(
args
[
0
]
->
get_shape
().
lens
(),
args
[
1
]
->
get_shape
().
lens
());
compute_broadcasted_lens
(
args
[
0
]
->
get_shape
().
lens
(),
args
[
1
]
->
get_shape
().
lens
());
lens
=
compute_broadcasted_lens
(
lens
,
args
[
2
]
->
get_shape
().
lens
());
lens
=
compute_broadcasted_lens
(
lens
,
args
[
2
]
->
get_shape
().
lens
());
if
(
enabled
(
MIGRAPHX_ENABLE_CK
{}))
if
(
enabled
(
MIGRAPHX_ENABLE_CK
{}))
{
{
// Convert condition tensor to int32 to work around CK not supporting bool type
// Convert condition tensor to int32 to work around CK not supporting bool type
args
[
0
]
=
info
.
add_instruction
(
make_op
(
"convert"
,
{{
"target_type"
,
shape
::
int32_type
}}),
args
[
0
]);
args
[
0
]
=
info
.
add_instruction
(
make_op
(
"convert"
,
{{
"target_type"
,
shape
::
int32_type
}}),
args
[
0
]);
}
}
if
(
args
[
0
]
->
get_shape
().
lens
()
!=
lens
)
if
(
args
[
0
]
->
get_shape
().
lens
()
!=
lens
)
{
{
args
[
0
]
=
args
[
0
]
=
...
...
src/targets/gpu/jit/ck_gemm.cpp
View file @
d316d529
...
@@ -355,7 +355,7 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
...
@@ -355,7 +355,7 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
const
auto
&
c_shape
=
inputs
.
back
();
const
auto
&
c_shape
=
inputs
.
back
();
auto
tuning_value
=
v
.
get
(
"tuning_value"
,
4
);
auto
tuning_value
=
v
.
get
(
"tuning_value"
,
4
);
if
(
not
v
.
contains
(
"tuning_value"
))
if
(
not
v
.
contains
(
"tuning_value"
))
tuning_value
=
get_tuning_for
({
a_shape
,
b_shape
,
c_shape
});
tuning_value
=
get_tuning_for
({
a_shape
,
b_shape
,
c_shape
});
auto
batch_count
=
get_batch_count
(
c_shape
);
auto
batch_count
=
get_batch_count
(
c_shape
);
auto
problem
=
create_problem
(
inputs
,
v
);
auto
problem
=
create_problem
(
inputs
,
v
);
...
@@ -416,9 +416,9 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
...
@@ -416,9 +416,9 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
compiler_replace
compiler_replace
compile
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
const
value
&
solution
)
const
compile
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
const
value
&
solution
)
const
{
{
auto
shapes
=
to_shapes
(
ins
->
inputs
());
auto
shapes
=
to_shapes
(
ins
->
inputs
());
auto
v
=
create_settings
(
ins
,
op
);
auto
v
=
create_settings
(
ins
,
op
);
if
(
solution
.
is_null
())
if
(
solution
.
is_null
())
v
[
"tuning_value"
]
=
4
;
v
[
"tuning_value"
]
=
4
;
else
else
v
[
"tuning_value"
]
=
solution
;
v
[
"tuning_value"
]
=
solution
;
...
...
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