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
b6ed1d6e
Commit
b6ed1d6e
authored
Oct 19, 2023
by
Umang Yadav
Browse files
Fix tidy
parent
335a1fae
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
18 deletions
+10
-18
src/generate_root_modules.cpp
src/generate_root_modules.cpp
+6
-14
src/targets/gpu/compile_hip.cpp
src/targets/gpu/compile_hip.cpp
+2
-2
src/targets/gpu/include/migraphx/gpu/compile_hip.hpp
src/targets/gpu/include/migraphx/gpu/compile_hip.hpp
+1
-1
test/generate_root_modules.cpp
test/generate_root_modules.cpp
+1
-1
No files found.
src/generate_root_modules.cpp
View file @
b6ed1d6e
...
@@ -166,13 +166,9 @@ struct auto_gen_root_modules
...
@@ -166,13 +166,9 @@ struct auto_gen_root_modules
return
false
;
return
false
;
}
}
return
std
::
any_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
input_ins
)
{
return
std
::
any_of
(
inputs
.
begin
(),
inputs
.
end
(),
[
&
](
auto
input_ins
)
{
if
((
skip_ins
.
find
(
input_ins
)
!=
skip_ins
.
end
())
or
return
((
skip_ins
.
find
(
input_ins
)
!=
skip_ins
.
end
())
or
(
tass
.
find
(
input_ins
)
!=
tass
.
end
()
and
(
tass
.
find
(
input_ins
)
!=
tass
.
end
()
and
tass
.
at
(
ins
)
!=
tid
.
value_or
(
std
::
numeric_limits
<
std
::
size_t
>::
max
())))
tass
.
at
(
ins
)
!=
tid
.
value_or
(
std
::
numeric_limits
<
std
::
size_t
>::
max
())));
{
return
true
;
}
return
false
;
});
});
}
}
...
@@ -184,13 +180,9 @@ struct auto_gen_root_modules
...
@@ -184,13 +180,9 @@ struct auto_gen_root_modules
return
false
;
return
false
;
}
}
return
std
::
any_of
(
outputs
.
begin
(),
outputs
.
end
(),
[
&
](
auto
output_ins
)
{
return
std
::
any_of
(
outputs
.
begin
(),
outputs
.
end
(),
[
&
](
auto
output_ins
)
{
if
(
tass
.
find
(
output_ins
)
!=
tass
.
end
()
and
return
(
tass
.
find
(
output_ins
)
!=
tass
.
end
()
and
tass
.
at
(
output_ins
)
!=
tid
.
value_or
(
std
::
numeric_limits
<
std
::
size_t
>::
max
())
and
tass
.
at
(
output_ins
)
!=
tid
.
value_or
(
std
::
numeric_limits
<
std
::
size_t
>::
max
())
and
output_ins
->
name
()
!=
"@return"
)
output_ins
->
name
()
!=
"@return"
);
{
return
true
;
}
return
false
;
});
});
}
}
...
...
src/targets/gpu/compile_hip.cpp
View file @
b6ed1d6e
...
@@ -194,7 +194,7 @@ struct hiprtc_program
...
@@ -194,7 +194,7 @@ struct hiprtc_program
};
};
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
std
::
vector
<
hiprtc_src_file
>
srcs
,
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
std
::
vector
<
hiprtc_src_file
>
srcs
,
std
::
string
params
,
const
std
::
string
&
params
,
const
std
::
string
&
arch
)
const
std
::
string
&
arch
)
{
{
hiprtc_program
prog
(
std
::
move
(
srcs
));
hiprtc_program
prog
(
std
::
move
(
srcs
));
...
@@ -276,7 +276,7 @@ compile_hip_src(const std::vector<src_file>& srcs, std::string params, const std
...
@@ -276,7 +276,7 @@ compile_hip_src(const std::vector<src_file>& srcs, std::string params, const std
#else // MIGRAPHX_USE_HIPRTC
#else // MIGRAPHX_USE_HIPRTC
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
std
::
vector
<
hiprtc_src_file
>
,
// NOLINT
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
std
::
vector
<
hiprtc_src_file
>
,
// NOLINT
std
::
string
,
// NOLINT
const
std
::
string
&
,
// NOLINT
const
std
::
string
&
)
const
std
::
string
&
)
{
{
MIGRAPHX_THROW
(
"Not using hiprtc"
);
MIGRAPHX_THROW
(
"Not using hiprtc"
);
...
...
src/targets/gpu/include/migraphx/gpu/compile_hip.hpp
View file @
b6ed1d6e
...
@@ -58,7 +58,7 @@ struct hiprtc_src_file
...
@@ -58,7 +58,7 @@ struct hiprtc_src_file
MIGRAPHX_GPU_EXPORT
bool
hip_has_flags
(
const
std
::
vector
<
std
::
string
>&
flags
);
MIGRAPHX_GPU_EXPORT
bool
hip_has_flags
(
const
std
::
vector
<
std
::
string
>&
flags
);
MIGRAPHX_GPU_EXPORT
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
MIGRAPHX_GPU_EXPORT
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src_with_hiprtc
(
std
::
vector
<
hiprtc_src_file
>
srcs
,
std
::
string
params
,
const
std
::
string
&
arch
);
std
::
vector
<
hiprtc_src_file
>
srcs
,
const
std
::
string
&
params
,
const
std
::
string
&
arch
);
MIGRAPHX_GPU_EXPORT
std
::
vector
<
std
::
vector
<
char
>>
MIGRAPHX_GPU_EXPORT
std
::
vector
<
std
::
vector
<
char
>>
compile_hip_src
(
const
std
::
vector
<
src_file
>&
srcs
,
std
::
string
params
,
const
std
::
string
&
arch
);
compile_hip_src
(
const
std
::
vector
<
src_file
>&
srcs
,
std
::
string
params
,
const
std
::
string
&
arch
);
...
...
test/generate_root_modules.cpp
View file @
b6ed1d6e
...
@@ -608,7 +608,7 @@ TEST_CASE(nested_if_then_else_program)
...
@@ -608,7 +608,7 @@ TEST_CASE(nested_if_then_else_program)
auto
z
=
mm
->
add_parameter
(
"z"
,
ds
);
auto
z
=
mm
->
add_parameter
(
"z"
,
ds
);
auto
create_test_module
=
[
&
](
migraphx
::
program
&
prog
,
auto
create_test_module
=
[
&
](
migraphx
::
program
&
prog
,
std
::
size_t
tid
,
std
::
size_t
tid
,
std
::
string
param_prefix
)
{
const
std
::
string
&
param_prefix
)
{
std
::
string
mod_name
=
std
::
string
mod_name
=
"target_"
+
std
::
to_string
(
tid
)
+
"_"
+
std
::
to_string
(
counter_map
[
tid
]
++
);
"target_"
+
std
::
to_string
(
tid
)
+
"_"
+
std
::
to_string
(
counter_map
[
tid
]
++
);
auto
*
test_mod
=
prog
.
create_module
(
mod_name
);
auto
*
test_mod
=
prog
.
create_module
(
mod_name
);
...
...
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