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
96358e41
"vscode:/vscode.git/clone" did not exist on "bd1b76771ee816b3784b1436921c4b8930c27093"
Commit
96358e41
authored
Nov 14, 2018
by
Paul
Browse files
Rename to migraphx
parent
80203608
Changes
190
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
93 additions
and
93 deletions
+93
-93
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
+8
-8
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
src/include/migraphx/verify_args.hpp
src/include/migraphx/verify_args.hpp
+5
-5
src/instruction.cpp
src/instruction.cpp
+6
-6
No files found.
src/include/migraph/ranges.hpp
→
src/include/migraph
x
/ranges.hpp
View file @
96358e41
...
...
@@ -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 @
96358e41
#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 @
96358e41
...
...
@@ -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 @
96358e41
#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 @
96358e41
...
...
@@ -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, \
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 @
96358e41
...
...
@@ -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 @
96358e41
#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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
#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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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 @
96358e41
...
...
@@ -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
src/include/migraph/verify_args.hpp
→
src/include/migraph
x
/verify_args.hpp
View file @
96358e41
#ifndef MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#define MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#include <migraph/verify.hpp>
#include <migraph/argument.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/verify.hpp>
#include <migraph
x
/argument.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
bool
verify_args
(
const
std
::
string
&
name
,
...
...
@@ -85,6 +85,6 @@ inline bool verify_args(const std::string& name,
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
src/instruction.cpp
View file @
96358e41
#include <migraph/instruction.hpp>
#include <migraph/builtin.hpp>
#include <migraph/erase.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph
x
/builtin.hpp>
#include <migraph
x
/erase.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
instruction
::
instruction
(
operation
o
,
shape
r
,
std
::
vector
<
instruction_ref
>
args
)
...
...
@@ -70,7 +70,7 @@ bool instruction::valid() const
{
computed
=
compute_shape
(
op
,
arguments
);
}
catch
(
migraph
::
exception
&
)
catch
(
migraph
x
::
exception
&
)
{
return
false
;
}
...
...
@@ -184,4 +184,4 @@ shape compute_shape(const operation& op, const std::vector<instruction_ref>& arg
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
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