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
65c5581f
Unverified
Commit
65c5581f
authored
Nov 14, 2018
by
Paul Fultz II
Committed by
GitHub
Nov 14, 2018
Browse files
Merge branch 'master' into identity
parents
453fa37a
f04a3ba6
Changes
192
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
96 additions
and
96 deletions
+96
-96
src/include/migraphx/pass_config.hpp
src/include/migraphx/pass_config.hpp
+4
-4
src/include/migraphx/program.hpp
src/include/migraphx/program.hpp
+9
-9
src/include/migraphx/ranges.hpp
src/include/migraphx/ranges.hpp
+4
-4
src/include/migraphx/rank.hpp
src/include/migraphx/rank.hpp
+3
-3
src/include/migraphx/raw_data.hpp
src/include/migraphx/raw_data.hpp
+8
-8
src/include/migraphx/reflect.hpp
src/include/migraphx/reflect.hpp
+5
-5
src/include/migraphx/requires.hpp
src/include/migraphx/requires.hpp
+9
-9
src/include/migraphx/shape.hpp
src/include/migraphx/shape.hpp
+5
-5
src/include/migraphx/shape_for_each.hpp
src/include/migraphx/shape_for_each.hpp
+5
-5
src/include/migraphx/simplify_algebra.hpp
src/include/migraphx/simplify_algebra.hpp
+3
-3
src/include/migraphx/simplify_reshapes.hpp
src/include/migraphx/simplify_reshapes.hpp
+4
-4
src/include/migraphx/streamutils.hpp
src/include/migraphx/streamutils.hpp
+4
-4
src/include/migraphx/stringutils.hpp
src/include/migraphx/stringutils.hpp
+3
-3
src/include/migraphx/target.hpp
src/include/migraphx/target.hpp
+5
-5
src/include/migraphx/tensor_view.hpp
src/include/migraphx/tensor_view.hpp
+6
-6
src/include/migraphx/time.hpp
src/include/migraphx/time.hpp
+3
-3
src/include/migraphx/tracer.hpp
src/include/migraphx/tracer.hpp
+4
-4
src/include/migraphx/type_name.hpp
src/include/migraphx/type_name.hpp
+4
-4
src/include/migraphx/type_traits.hpp
src/include/migraphx/type_traits.hpp
+4
-4
src/include/migraphx/verify.hpp
src/include/migraphx/verify.hpp
+4
-4
No files found.
src/include/migraph/pass_config.hpp
→
src/include/migraph
x
/pass_config.hpp
View file @
65c5581f
...
...
@@ -2,14 +2,14 @@
#ifndef MIGRAPH_GUARD_PASS_CONFIG_HPP
#define MIGRAPH_GUARD_PASS_CONFIG_HPP
#include <migraph/env.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/env.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
MIGRAPH_DECLARE_ENV_VAR
(
MIGRAPH_DISABLE_MEMORY_COLORING
)
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif // MIGRAPH_GUARD_PASS_CONFIG_HPP
src/include/migraph/program.hpp
→
src/include/migraph
x
/program.hpp
View file @
65c5581f
...
...
@@ -3,17 +3,17 @@
#include <list>
#include <unordered_map>
#include <migraph/operation.hpp>
#include <migraph/literal.hpp>
#include <migraph/builtin.hpp>
#include <migraph/instruction_ref.hpp>
#include <migraph/target.hpp>
#include <migraph/tracer.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/operation.hpp>
#include <migraph
x
/literal.hpp>
#include <migraph
x
/builtin.hpp>
#include <migraph
x
/instruction_ref.hpp>
#include <migraph
x
/target.hpp>
#include <migraph
x
/tracer.hpp>
#include <migraph
x
/config.hpp>
#include <algorithm>
#include <iostream>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program_impl
;
...
...
@@ -110,6 +110,6 @@ struct program
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/ranges.hpp
→
src/include/migraph
x
/ranges.hpp
View file @
65c5581f
...
...
@@ -3,10 +3,10 @@
#include <algorithm>
#include <initializer_list>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
...
...
@@ -107,6 +107,6 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/rank.hpp
→
src/include/migraph
x
/rank.hpp
View file @
65c5581f
#ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP
#define MIGRAPH_GUARD_RTGLIB_RANK_HPP
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
int
N
>
...
...
@@ -17,6 +17,6 @@ struct rank<0>
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/raw_data.hpp
→
src/include/migraph
x
/raw_data.hpp
View file @
65c5581f
...
...
@@ -2,11 +2,11 @@
#ifndef MIGRAPH_GUARD_RAW_DATA_HPP
#define MIGRAPH_GUARD_RAW_DATA_HPP
#include <migraph/tensor_view.hpp>
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/tensor_view.hpp>
#include <migraph
x
/requires.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
raw_data_base
...
...
@@ -104,7 +104,7 @@ struct raw_data : raw_data_base
bool
matches
()
const
{
return
is_data_ptr
<
T
>
{}
||
self
->
get_shape
().
type
()
==
migraph
::
shape
::
get_type
<
get_data_type
<
T
>>
{};
self
->
get_shape
().
type
()
==
migraph
x
::
shape
::
get_type
<
get_data_type
<
T
>>
{};
}
template
<
class
T
>
...
...
@@ -125,7 +125,7 @@ struct raw_data : raw_data_base
{
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
buffer
=
static_cast
<
const
Derived
&>
(
*
this
).
data
();
if
(
s
.
type
()
!=
migraph
::
shape
::
get_type
<
T
>
{})
if
(
s
.
type
()
!=
migraph
x
::
shape
::
get_type
<
T
>
{})
MIGRAPH_THROW
(
"Incorrect data type for raw data"
);
return
make_view
(
s
,
reinterpret_cast
<
T
*>
(
buffer
));
}
...
...
@@ -136,7 +136,7 @@ struct raw_data : raw_data_base
{
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
buffer
=
static_cast
<
const
Derived
&>
(
*
this
).
data
();
assert
(
s
.
type
()
==
migraph
::
shape
::
get_type
<
T
>
{});
assert
(
s
.
type
()
==
migraph
x
::
shape
::
get_type
<
T
>
{});
return
reinterpret_cast
<
T
*>
(
buffer
);
}
};
...
...
@@ -206,6 +206,6 @@ auto visit_all(T&& x, Ts&&... xs)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/reflect.hpp
→
src/include/migraph
x
/reflect.hpp
View file @
65c5581f
#ifndef MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#define MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#include <migraph/functional.hpp>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/functional.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph
x
/config.hpp>
#include <functional>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
...
...
@@ -48,6 +48,6 @@ void reflect_each(T& x, F f)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/requires.hpp
→
src/include/migraph
x
/requires.hpp
View file @
65c5581f
...
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP
#include <type_traits>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
bool
...
Bs
>
...
...
@@ -32,21 +32,21 @@ struct requires_enum
#if 0
// TODO: This currently crashed on clang
#define MIGRAPH_REQUIRES(...) \
typename migraph::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT(
\
typename migraph
x
::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, \
__LINE__) = migraph::requires_enum<__LINE__>::a,
\
__LINE__) = migraph
x
::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__, \
MIGRAPH_REQUIRES_CAT(PrivateRequires, __LINE__) == \
migraph::requires_enum<__LINE__>::a>{}>::type
migraph
x
::requires_enum<__LINE__>::a>{}>::type
#else
#define MIGRAPH_REQUIRES(...) \
typename migraph::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, __LINE__) = migraph::requires_enum<__LINE__>::a, \
#define MIGRAPH_REQUIRES(...)
\
typename migraph
x
::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, __LINE__) = migraph
x
::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__>{}>::type
#endif
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/shape.hpp
→
src/include/migraph
x
/shape.hpp
View file @
65c5581f
...
...
@@ -7,11 +7,11 @@
#include <numeric>
#include <memory>
#include <migraph/errors.hpp>
#include <migraph/half.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/errors.hpp>
#include <migraph
x
/half.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
shape_impl
;
...
...
@@ -164,6 +164,6 @@ struct shape
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/shape_for_each.hpp
→
src/include/migraph
x
/shape_for_each.hpp
View file @
65c5581f
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#include <migraph/shape.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/shape.hpp>
#include <migraph
x
/config.hpp>
#include <algorithm>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
F
>
void
shape_for_each
(
const
migraph
::
shape
&
s
,
F
f
)
void
shape_for_each
(
const
migraph
x
::
shape
&
s
,
F
f
)
{
// Ensure calls to f use const ref to vector
auto
call
=
[
&
f
](
const
std
::
vector
<
std
::
size_t
>&
i
)
{
f
(
i
);
};
...
...
@@ -29,6 +29,6 @@ void shape_for_each(const migraph::shape& s, F f)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/simplify_algebra.hpp
→
src/include/migraph
x
/simplify_algebra.hpp
View file @
65c5581f
...
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP
#include <string>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
...
...
@@ -19,6 +19,6 @@ struct simplify_algebra
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/simplify_reshapes.hpp
→
src/include/migraph
x
/simplify_reshapes.hpp
View file @
65c5581f
...
...
@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_RESHAPES_HPP
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/instruction_ref.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
...
...
@@ -20,6 +20,6 @@ struct simplify_reshapes
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/streamutils.hpp
→
src/include/migraph
x
/streamutils.hpp
View file @
65c5581f
...
...
@@ -3,10 +3,10 @@
#include <ostream>
#include <algorithm>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
...
...
@@ -57,6 +57,6 @@ void stream_write_value(std::ostream& os, const T& x)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/stringutils.hpp
→
src/include/migraph
x
/stringutils.hpp
View file @
65c5581f
...
...
@@ -5,9 +5,9 @@
#include <numeric>
#include <string>
#include <sstream>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
std
::
string
...
...
@@ -88,6 +88,6 @@ inline std::string to_string(const T& x)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/target.hpp
→
src/include/migraph
x
/target.hpp
View file @
65c5581f
...
...
@@ -8,11 +8,11 @@
#include <type_traits>
#include <utility>
#include <vector>
#include <migraph/context.hpp>
#include <migraph/pass.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/context.hpp>
#include <migraph
x
/pass.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
#ifdef DOXYGEN
...
...
@@ -245,6 +245,6 @@ inline const ValueType& any_cast(const target& x)
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/tensor_view.hpp
→
src/include/migraph
x
/tensor_view.hpp
View file @
65c5581f
#ifndef MIGRAPH_GUARD_TENSOR_VIEW_HPP
#define MIGRAPH_GUARD_TENSOR_VIEW_HPP
#include <migraph/shape.hpp>
#include <migraph/float_equal.hpp>
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/shape.hpp>
#include <migraph
x
/float_equal.hpp>
#include <migraph
x
/requires.hpp>
#include <migraph
x
/config.hpp>
#include <iostream>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
...
...
@@ -170,6 +170,6 @@ tensor_view<T> make_view(shape s, T* data)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/time.hpp
→
src/include/migraph
x
/time.hpp
View file @
65c5581f
...
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TIME_HPP
#include <chrono>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
Duration
,
class
F
>
...
...
@@ -17,6 +17,6 @@ auto time(F f)
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/tracer.hpp
→
src/include/migraph
x
/tracer.hpp
View file @
65c5581f
...
...
@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_TRACER_HPP
#include <ostream>
#include <migraph/functional.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/functional.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
tracer
...
...
@@ -31,6 +31,6 @@ struct tracer
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/type_name.hpp
→
src/include/migraph
x
/type_name.hpp
View file @
65c5581f
...
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_NAME_HPP
#include <string>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
PrivateMigraphTypeNameProbe
>
...
...
@@ -38,10 +38,10 @@ const std::string& get_type_name()
template
<
class
T
>
const
std
::
string
&
get_type_name
(
const
T
&
)
{
return
migraph
::
get_type_name
<
T
>
();
return
migraph
x
::
get_type_name
<
T
>
();
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/type_traits.hpp
→
src/include/migraph
x
/type_traits.hpp
View file @
65c5581f
...
...
@@ -9,10 +9,10 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_TRAITS_HPP
#include <type_traits>
#include <migraph/half.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/half.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
#define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
...
...
@@ -31,6 +31,6 @@ MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_signed, half)
MIGRAPH_DETAIL_EXTEND_TRAIT_FOR
(
is_arithmetic
,
half
)
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/include/migraph/verify.hpp
→
src/include/migraph
x
/verify.hpp
View file @
65c5581f
...
...
@@ -7,10 +7,10 @@
#include <iostream>
#include <numeric>
#include <migraph/float_equal.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/float_equal.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
// Compute the value of a range
...
...
@@ -174,5 +174,5 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
Prev
1
2
3
4
5
6
7
8
…
10
Next
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