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
6b1e4b67
Commit
6b1e4b67
authored
Feb 01, 2019
by
Khalique
Browse files
fix build errors
parent
d2549384
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
13 deletions
+52
-13
src/targets/gpu/include/migraphx/gpu/lrn.hpp
src/targets/gpu/include/migraphx/gpu/lrn.hpp
+39
-0
src/targets/gpu/include/migraphx/gpu/miopen.hpp
src/targets/gpu/include/migraphx/gpu/miopen.hpp
+2
-2
src/targets/gpu/lowering.cpp
src/targets/gpu/lowering.cpp
+3
-3
src/targets/gpu/lrn.cpp
src/targets/gpu/lrn.cpp
+8
-8
No files found.
src/targets/gpu/include/migraph/gpu/lrn.hpp
→
src/targets/gpu/include/migraph
x
/gpu/lrn.hpp
View file @
6b1e4b67
#ifndef MIGRAPH_GUARD_RTGLIB_LRN_HPP
#define MIGRAPH_GUARD_RTGLIB_LRN_HPP
#ifndef MIGRAPH
X
_GUARD_RTGLIB_LRN_HPP
#define MIGRAPH
X
_GUARD_RTGLIB_LRN_HPP
#include <migraph/gpu/lowering.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/instruction.hpp>
#include <migraph/operators.hpp>
#include <migraph/generate.hpp>
#include <migraph/shape_for_each.hpp>
#include <migraph/config.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph/gpu/hip.hpp>
#include <migraph/dfor.hpp>
#include <migraph/gpu/device/contiguous.hpp>
#include <migraph/gpu/device/add.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/gpu/rocblas.hpp>
#include <migraph/gpu/context.hpp>
#include <migraph
x
/gpu/lowering.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph
x
/generate.hpp>
#include <migraph
x
/shape_for_each.hpp>
#include <migraph
x
/config.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <migraph
x
/gpu/hip.hpp>
#include <migraph
x
/dfor.hpp>
#include <migraph
x
/gpu/device/contiguous.hpp>
#include <migraph
x
/gpu/device/add.hpp>
#include <migraph
x
/iterator_for.hpp>
#include <migraph
x
/gpu/rocblas.hpp>
#include <migraph
x
/gpu/context.hpp>
#include <utility>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
x
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
struct
miopen_lrn
...
...
@@ -33,7 +33,7 @@ struct miopen_lrn
};
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
x
#endif
src/targets/gpu/include/migraphx/gpu/miopen.hpp
View file @
6b1e4b67
...
...
@@ -23,7 +23,7 @@ using fusion_plan_descriptor = MIGRAPHX_MANAGE_PTR(miopenFusionPlanDescriptor_t,
miopenDestroyFusionPlan
);
using
fused_operator_args
=
MIGRAPHX_MANAGE_PTR
(
miopenOperatorArgs_t
,
miopenDestroyOperatorArgs
);
using
lrn_descriptor
=
MIGRAPH_MANAGE_PTR
(
miopenLRNDescriptor_t
,
miopenDestroyLRNDescriptor
);
using
lrn_descriptor
=
MIGRAPH
X
_MANAGE_PTR
(
miopenLRNDescriptor_t
,
miopenDestroyLRNDescriptor
);
template
<
class
Result
,
class
F
,
class
...
Ts
>
Result
make_obj
(
F
f
,
Ts
...
xs
)
...
...
@@ -91,7 +91,7 @@ inline pooling_descriptor make_pooling(const migraphx::op::pooling& op)
return
p
;
}
inline
lrn_descriptor
make_lrn
(
const
migraph
::
op
::
lrn
&
op
)
inline
lrn_descriptor
make_lrn
(
const
migraph
x
::
op
::
lrn
&
op
)
{
auto
ldesc
=
make_obj
<
lrn_descriptor
>
(
&
miopenCreateLRNDescriptor
);
miopenSetLRNDescriptor
(
ldesc
.
get
(),
miopenLRNCrossChannel
,
op
.
size
,
op
.
alpha
,
op
.
beta
,
op
.
bias
);
...
...
src/targets/gpu/lowering.cpp
View file @
6b1e4b67
...
...
@@ -93,10 +93,10 @@ struct miopen_apply
add_extend_op
<
miopen_contiguous
,
op
::
contiguous
>
(
"contiguous"
);
add_extend_op
<
hip_concat
,
op
::
concat
>
(
"concat"
);
add_extend_op
<
miopen_softmax
,
op
::
softmax
>
(
"softmax"
);
add_extend_op
<
miopen_lrn
,
op
::
lrn
>
(
"lrn"
);
add_extend_op
<
hip_gather
,
op
::
gather
>
(
"gather"
);
add_extend_op
<
hip_pad
,
op
::
pad
>
(
"pad"
);
add_lrn_op
();
add_convolution_op
();
add_pooling_op
();
add_batch_norm_inference_op
();
...
...
@@ -157,9 +157,9 @@ struct miopen_apply
});
}
void
a
pply_lrn
(
instruction_ref
ins
)
void
a
dd_lrn_op
(
)
{
apply_map
.
emplace
(
"lrn"
,
[
=
](
insruction_ref
ins
)
{
apply_map
.
emplace
(
"lrn"
,
[
=
](
ins
t
ruction_ref
ins
)
{
auto
&&
op
=
any_cast
<
op
::
lrn
>
(
ins
->
get_operator
());
auto
ldesc
=
make_lrn
(
op
);
auto
output
=
insert_allocation
(
ins
,
ins
->
get_shape
());
...
...
src/targets/gpu/lrn.cpp
View file @
6b1e4b67
#include <migraph/gpu/lrn.hpp>
#include <migraph/operators.hpp>
#include <migraph/manage_ptr.hpp>
#include <migraph/gpu/miopen.hpp>
#include <migraph
x
/gpu/lrn.hpp>
#include <migraph
x
/operators.hpp>
#include <migraph
x
/manage_ptr.hpp>
#include <migraph
x
/gpu/miopen.hpp>
#include <utility>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
migraph
x
{
inline
namespace
MIGRAPH
X
_INLINE_NS
{
namespace
gpu
{
shape
miopen_lrn
::
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
...
...
@@ -36,5 +36,5 @@ argument miopen_lrn::compute(context& ctx,
}
}
// namespace gpu
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace MIGRAPH
X
_INLINE_NS
}
// namespace migraph
x
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