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
73339a83
Commit
73339a83
authored
May 29, 2018
by
Paul
Browse files
Formatting
parent
da011b99
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
src/targets/miopen/include/rtg/miopen/miopen_target.hpp
src/targets/miopen/include/rtg/miopen/miopen_target.hpp
+2
-1
src/targets/miopen/miopen_target.cpp
src/targets/miopen/miopen_target.cpp
+18
-21
No files found.
src/targets/miopen/include/rtg/miopen/miopen_target.hpp
View file @
73339a83
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
#include <rtg/program.hpp>
#include <rtg/program.hpp>
namespace
rtg
{
namespace
miopen
{
namespace
rtg
{
namespace
miopen
{
struct
miopen_target
struct
miopen_target
{
{
...
...
src/targets/miopen/miopen_target.cpp
View file @
73339a83
...
@@ -3,23 +3,30 @@
...
@@ -3,23 +3,30 @@
#include <miopen/miopen.h>
#include <miopen/miopen.h>
namespace
rtg
{
namespace
miopen
{
namespace
rtg
{
namespace
miopen
{
using
miopen_handle
=
RTG_MANAGE_PTR
(
miopenHandle_t
,
miopenDestroy
);
using
miopen_handle
=
RTG_MANAGE_PTR
(
miopenHandle_t
,
miopenDestroy
);
using
tensor_descriptor
=
RTG_MANAGE_PTR
(
miopenTensorDescriptor_t
,
miopenDestroyTensorDescriptor
);
using
tensor_descriptor
=
RTG_MANAGE_PTR
(
miopenTensorDescriptor_t
,
miopenDestroyTensorDescriptor
);
using
convolution_descriptor
=
RTG_MANAGE_PTR
(
miopenConvolutionDescriptor_t
,
miopenDestroyConvolutionDescriptor
);
using
convolution_descriptor
=
RTG_MANAGE_PTR
(
miopenConvolutionDescriptor_t
,
using
activation_descriptor
=
RTG_MANAGE_PTR
(
miopenActivationDescriptor_t
,
miopenDestroyActivationDescriptor
);
miopenDestroyConvolutionDescriptor
);
using
activation_descriptor
=
RTG_MANAGE_PTR
(
miopenActivationDescriptor_t
,
miopenDestroyActivationDescriptor
);
struct
miopen_apply
struct
miopen_apply
{
{
program
*
prog
;
program
*
prog
;
void
apply
()
void
apply
()
{
{
for
(
auto
it
=
prog
->
begin
();
it
!=
prog
->
end
();
it
++
)
{
for
(
auto
it
=
prog
->
begin
();
it
!=
prog
->
end
();
it
++
)
if
(
it
->
op
.
name
()
==
"convolution"
)
{
{
if
(
it
->
op
.
name
()
==
"convolution"
)
{
apply_convolution
(
it
);
apply_convolution
(
it
);
}
else
if
(
it
->
op
.
name
()
==
"activation"
)
{
}
else
if
(
it
->
op
.
name
()
==
"activation"
)
{
apply_activation
(
it
);
apply_activation
(
it
);
}
}
}
}
...
@@ -31,22 +38,12 @@ struct miopen_apply
...
@@ -31,22 +38,12 @@ struct miopen_apply
// prog->replace_instruction(ins, miopen_convolution{op}, ins->arguments);
// prog->replace_instruction(ins, miopen_convolution{op}, ins->arguments);
}
}
void
apply_activation
(
instruction_ref
ins
)
void
apply_activation
(
instruction_ref
ins
)
{}
{
}
};
};
std
::
string
miopen_target
::
name
()
const
std
::
string
miopen_target
::
name
()
const
{
return
"miopen"
;
}
{
return
"miopen"
;
}
void
miopen_target
::
apply
(
program
&
p
)
const
void
miopen_target
::
apply
(
program
&
p
)
const
{
miopen_apply
{
&
p
}.
apply
();
}
{
miopen_apply
{
&
p
}.
apply
();
}
}
// namespace miopen
}
// namespace miopen
...
...
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