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
e6174b8f
Commit
e6174b8f
authored
Jun 05, 2019
by
Paul
Browse files
Formatting
parent
697dcb06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
src/driver/main.cpp
src/driver/main.cpp
+5
-8
src/driver/perf.cpp
src/driver/perf.cpp
+1
-2
No files found.
src/driver/main.cpp
View file @
e6174b8f
...
@@ -56,8 +56,8 @@ struct compiler
...
@@ -56,8 +56,8 @@ struct compiler
{
{
loader
l
;
loader
l
;
bool
gpu
=
true
;
bool
gpu
=
true
;
void
parse
(
argument_parser
&
ap
)
void
parse
(
argument_parser
&
ap
)
{
{
l
.
parse
(
ap
);
l
.
parse
(
ap
);
ap
(
gpu
,
{
"--gpu"
},
ap
.
help
(
"Compile on the gpu"
),
ap
.
set_value
(
true
));
ap
(
gpu
,
{
"--gpu"
},
ap
.
help
(
"Compile on the gpu"
),
ap
.
set_value
(
true
));
ap
(
gpu
,
{
"--cpu"
},
ap
.
help
(
"Compile on the cpu"
),
ap
.
set_value
(
false
));
ap
(
gpu
,
{
"--cpu"
},
ap
.
help
(
"Compile on the cpu"
),
ap
.
set_value
(
false
));
...
@@ -70,10 +70,7 @@ struct compiler
...
@@ -70,10 +70,7 @@ struct compiler
return
p
;
return
p
;
}
}
auto
params
(
const
program
&
p
)
auto
params
(
const
program
&
p
)
{
return
create_param_map
(
p
,
gpu
);
}
{
return
create_param_map
(
p
,
gpu
);
}
};
};
struct
read
:
command
<
read
>
struct
read
:
command
<
read
>
...
@@ -129,8 +126,8 @@ struct perf : command<perf>
...
@@ -129,8 +126,8 @@ struct perf : command<perf>
{
{
compiler
c
;
compiler
c
;
unsigned
n
=
100
;
unsigned
n
=
100
;
void
parse
(
argument_parser
&
ap
)
void
parse
(
argument_parser
&
ap
)
{
{
c
.
parse
(
ap
);
c
.
parse
(
ap
);
ap
(
n
,
{
"--iterations"
,
"-n"
},
ap
.
help
(
"Number of iterations to run for perf report"
));
ap
(
n
,
{
"--iterations"
,
"-n"
},
ap
.
help
(
"Number of iterations to run for perf report"
));
}
}
...
...
src/driver/perf.cpp
View file @
e6174b8f
...
@@ -28,14 +28,13 @@ program::parameter_map create_param_map(const program& p, bool gpu)
...
@@ -28,14 +28,13 @@ program::parameter_map create_param_map(const program& p, bool gpu)
void
compile_program
(
program
&
p
,
bool
gpu
)
void
compile_program
(
program
&
p
,
bool
gpu
)
{
{
if
(
gpu
)
if
(
gpu
)
{
{
#ifdef HAVE_GPU
#ifdef HAVE_GPU
p
.
compile
(
gpu
::
target
{});
p
.
compile
(
gpu
::
target
{});
#else
#else
MIGRAPHX_THROW
(
"Gpu not supported."
);
MIGRAPHX_THROW
(
"Gpu not supported."
);
#endif
#endif
}
}
else
else
{
{
...
...
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