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
11fcecad
"tests/experimental/vscode:/vscode.git/clone" did not exist on "9a95065140a0432ed3367ac0a1e1a199f89825bd"
Commit
11fcecad
authored
Nov 27, 2018
by
Paul
Browse files
Formatting
parent
0b217041
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
32 deletions
+32
-32
src/include/migraphx/check_shapes.hpp
src/include/migraphx/check_shapes.hpp
+1
-1
src/include/migraphx/env.hpp
src/include/migraphx/env.hpp
+1
-1
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+2
-2
src/include/migraphx/operators.hpp
src/include/migraphx/operators.hpp
+2
-2
src/include/migraphx/raw_data.hpp
src/include/migraphx/raw_data.hpp
+2
-2
src/include/migraphx/requires.hpp
src/include/migraphx/requires.hpp
+5
-5
src/include/migraphx/shape.hpp
src/include/migraphx/shape.hpp
+1
-1
src/include/migraphx/type_traits.hpp
src/include/migraphx/type_traits.hpp
+8
-8
src/program.cpp
src/program.cpp
+1
-1
src/targets/gpu/include/migraphx/gpu/miopen.hpp
src/targets/gpu/include/migraphx/gpu/miopen.hpp
+5
-5
test/include/rob.hpp
test/include/rob.hpp
+1
-1
test/validate.cpp
test/validate.cpp
+3
-3
No files found.
src/include/migraphx/check_shapes.hpp
View file @
11fcecad
...
...
@@ -47,7 +47,7 @@ struct check_shapes
{
if
(
size
()
!=
n
)
MIGRAPHX_THROW
(
prefix
()
+
"Wrong number of arguments: expected "
+
std
::
to_string
(
n
)
+
" but given "
+
std
::
to_string
(
size
()));
" but given "
+
std
::
to_string
(
size
()));
return
*
this
;
}
...
...
src/include/migraphx/env.hpp
View file @
11fcecad
...
...
@@ -9,7 +9,7 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
// Declare a cached environment variable
#define MIGRAPHX_DECLARE_ENV_VAR(x)
\
#define MIGRAPHX_DECLARE_ENV_VAR(x) \
struct x \
{ \
static const char* value() { return #x; } \
...
...
src/include/migraphx/matcher.hpp
View file @
11fcecad
...
...
@@ -169,7 +169,7 @@ basic_matcher<predicate_matcher<P>> make_basic_pred_matcher(P p)
}
/// This macro takes care of the boilerplate for defining a matcher
#define MIGRAPHX_BASIC_MATCHER(name, ...)
\
#define MIGRAPHX_BASIC_MATCHER(name, ...) \
struct name##_m \
{ \
instruction_ref match(__VA_ARGS__) const; \
...
...
@@ -178,7 +178,7 @@ basic_matcher<predicate_matcher<P>> make_basic_pred_matcher(P p)
inline instruction_ref name##_m::match(__VA_ARGS__) const
/// This macro takes care of the boilerplate for defining a predicate matcher
#define MIGRAPHX_PRED_MATCHER(name, ...)
\
#define MIGRAPHX_PRED_MATCHER(name, ...) \
struct name##_m \
{ \
bool operator()(__VA_ARGS__) const; \
...
...
src/include/migraphx/operators.hpp
View file @
11fcecad
...
...
@@ -590,8 +590,8 @@ struct dot
auto
t
=
a
.
type
();
if
(
a
.
lens
()[
1
]
!=
b
.
lens
()[
0
])
MIGRAPHX_THROW
(
"Inner dimensions do not match: {"
+
to_string_range
(
a
.
lens
())
+
"} x {"
+
to_string_range
(
b
.
lens
())
+
"}"
);
MIGRAPHX_THROW
(
"Inner dimensions do not match: {"
+
to_string_range
(
a
.
lens
())
+
"} x {"
+
to_string_range
(
b
.
lens
())
+
"}"
);
return
{
t
,
{
a
.
lens
()[
0
],
b
.
lens
()[
1
]}};
}
};
...
...
src/include/migraphx/raw_data.hpp
View file @
11fcecad
...
...
@@ -144,7 +144,7 @@ struct raw_data : raw_data_base
template
<
class
T
,
class
U
,
MIGRAPHX_REQUIRES
(
std
::
is_base_of
<
raw_data_base
,
T
>{}
&&
std
::
is_base_of
<
raw_data_base
,
U
>
{})
>
std
::
is_base_of
<
raw_data_base
,
U
>
{})
>
bool
operator
==
(
const
T
&
x
,
const
U
&
y
)
{
auto
&&
xshape
=
x
.
get_shape
();
...
...
@@ -167,7 +167,7 @@ bool operator==(const T& x, const U& y)
template
<
class
T
,
class
U
,
MIGRAPHX_REQUIRES
(
std
::
is_base_of
<
raw_data_base
,
T
>{}
&&
std
::
is_base_of
<
raw_data_base
,
U
>
{})
>
std
::
is_base_of
<
raw_data_base
,
U
>
{})
>
bool
operator
!=
(
const
T
&
x
,
const
U
&
y
)
{
return
!
(
x
==
y
);
...
...
src/include/migraphx/requires.hpp
View file @
11fcecad
...
...
@@ -33,14 +33,14 @@ struct requires_enum
// TODO: This currently crashed on clang
#define MIGRAPHX_REQUIRES(...) \
typename migraphx::requires_enum<__LINE__>::e MIGRAPHX_REQUIRES_CAT( \
PrivateRequires, \
__LINE__) = migraphx::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__, \
PrivateRequires,
\
__LINE__) = migraphx::requires_enum<__LINE__>::a,
\
class = typename std::enable_if<and_<__VA_ARGS__,
\
MIGRAPHX_REQUIRES_CAT(PrivateRequires, __LINE__) == \
migraphx::requires_enum<__LINE__>::a>{}>::type
#else
#define MIGRAPHX_REQUIRES(...)
\
typename migraphx::requires_enum<__LINE__>::e MIGRAPHX_REQUIRES_CAT(
\
#define MIGRAPHX_REQUIRES(...) \
typename migraphx::requires_enum<__LINE__>::e MIGRAPHX_REQUIRES_CAT( \
PrivateRequires, __LINE__) = migraphx::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__>{}>::type
#endif
...
...
src/include/migraphx/shape.hpp
View file @
11fcecad
...
...
@@ -44,7 +44,7 @@ struct shape
template
<
class
T
,
class
=
void
>
struct
get_type
;
#define MIGRAPHX_SHAPE_GET_TYPE(x, t)
\
#define MIGRAPHX_SHAPE_GET_TYPE(x, t) \
template <class T> \
struct get_type<t, T> : std::integral_constant<type_t, x> \
{ \
...
...
src/include/migraphx/type_traits.hpp
View file @
11fcecad
...
...
@@ -16,14 +16,14 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
#define MIGRAPHX_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
template <class X> \
struct trait : std::trait<X> \
{ \
}; \
\
template <> \
struct trait<T> : std::true_type \
{ \
template <class X>
\
struct trait : std::trait<X>
\
{
\
};
\
\
template <>
\
struct trait<T> : std::true_type
\
{
\
};
MIGRAPHX_DETAIL_EXTEND_TRAIT_FOR
(
is_floating_point
,
half
)
...
...
src/program.cpp
View file @
11fcecad
...
...
@@ -298,7 +298,7 @@ void program::compile(const target& t, tracer trace)
{
auto
index
=
std
::
distance
(
impl
->
instructions
.
begin
(),
invalid
);
MIGRAPHX_THROW
(
p
.
name
()
+
" pass produces invalid program at instruction "
+
std
::
to_string
(
index
)
+
": "
+
invalid
->
name
());
std
::
to_string
(
index
)
+
": "
+
invalid
->
name
());
}
trace
();
#endif
...
...
src/targets/gpu/include/migraphx/gpu/miopen.hpp
View file @
11fcecad
...
...
@@ -12,15 +12,15 @@ namespace gpu {
using
miopen_handle
=
MIGRAPHX_MANAGE_PTR
(
miopenHandle_t
,
miopenDestroy
);
using
tensor_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenTensorDescriptor_t
,
miopenDestroyTensorDescriptor
);
miopenDestroyTensorDescriptor
);
using
convolution_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenConvolutionDescriptor_t
,
miopenDestroyConvolutionDescriptor
);
miopenDestroyConvolutionDescriptor
);
using
pooling_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenPoolingDescriptor_t
,
miopenDestroyPoolingDescriptor
);
miopenDestroyPoolingDescriptor
);
using
activation_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenActivationDescriptor_t
,
miopenDestroyActivationDescriptor
);
miopenDestroyActivationDescriptor
);
using
fusion_plan_descriptor
=
MIGRAPHX_MANAGE_PTR
(
miopenFusionPlanDescriptor_t
,
miopenDestroyFusionPlan
);
miopenDestroyFusionPlan
);
using
fused_operator_args
=
MIGRAPHX_MANAGE_PTR
(
miopenOperatorArgs_t
,
miopenDestroyOperatorArgs
);
template
<
class
Result
,
class
F
,
class
...
Ts
>
...
...
test/include/rob.hpp
View file @
11fcecad
...
...
@@ -30,7 +30,7 @@ struct mem_data_ptr
using
type
=
T
C
::*
;
};
#define MIGRAPHX_ROB(name, Type, C, mem)
\
#define MIGRAPHX_ROB(name, Type, C, mem) \
struct name##_tag : mem_data_ptr<C, Type> \
{ \
}; \
...
...
test/validate.cpp
View file @
11fcecad
...
...
@@ -40,9 +40,9 @@ TEST_CASE(incomplete_args)
}
MIGRAPHX_ROB
(
access_ins_arguments
,
std
::
vector
<
migraphx
::
instruction_ref
>
,
migraphx
::
instruction
,
arguments
)
std
::
vector
<
migraphx
::
instruction_ref
>
,
migraphx
::
instruction
,
arguments
)
TEST_CASE
(
invalid_args
)
{
...
...
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