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
Commit
96358e41
authored
Nov 14, 2018
by
Paul
Browse files
Rename to migraphx
parent
80203608
Changes
190
Show 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 @@
...
@@ -3,10 +3,10 @@
#include <algorithm>
#include <algorithm>
#include <initializer_list>
#include <initializer_list>
#include <migraph/rank.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
namespace
detail
{
...
@@ -107,6 +107,6 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
...
@@ -107,6 +107,6 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/rank.hpp
→
src/include/migraph
x
/rank.hpp
View file @
96358e41
#ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP
#ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP
#define 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
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
int
N
>
template
<
int
N
>
...
@@ -17,6 +17,6 @@ struct rank<0>
...
@@ -17,6 +17,6 @@ struct rank<0>
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/raw_data.hpp
→
src/include/migraph
x
/raw_data.hpp
View file @
96358e41
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
#ifndef MIGRAPH_GUARD_RAW_DATA_HPP
#ifndef MIGRAPH_GUARD_RAW_DATA_HPP
#define MIGRAPH_GUARD_RAW_DATA_HPP
#define MIGRAPH_GUARD_RAW_DATA_HPP
#include <migraph/tensor_view.hpp>
#include <migraph
x
/tensor_view.hpp>
#include <migraph/requires.hpp>
#include <migraph
x
/requires.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
raw_data_base
struct
raw_data_base
...
@@ -104,7 +104,7 @@ struct raw_data : raw_data_base
...
@@ -104,7 +104,7 @@ struct raw_data : raw_data_base
bool
matches
()
const
bool
matches
()
const
{
{
return
is_data_ptr
<
T
>
{}
||
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
>
template
<
class
T
>
...
@@ -125,7 +125,7 @@ struct raw_data : raw_data_base
...
@@ -125,7 +125,7 @@ struct raw_data : raw_data_base
{
{
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
buffer
=
static_cast
<
const
Derived
&>
(
*
this
).
data
();
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"
);
MIGRAPH_THROW
(
"Incorrect data type for raw data"
);
return
make_view
(
s
,
reinterpret_cast
<
T
*>
(
buffer
));
return
make_view
(
s
,
reinterpret_cast
<
T
*>
(
buffer
));
}
}
...
@@ -136,7 +136,7 @@ struct raw_data : raw_data_base
...
@@ -136,7 +136,7 @@ struct raw_data : raw_data_base
{
{
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
s
=
static_cast
<
const
Derived
&>
(
*
this
).
get_shape
();
auto
&&
buffer
=
static_cast
<
const
Derived
&>
(
*
this
).
data
();
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
);
return
reinterpret_cast
<
T
*>
(
buffer
);
}
}
};
};
...
@@ -206,6 +206,6 @@ auto visit_all(T&& x, Ts&&... xs)
...
@@ -206,6 +206,6 @@ auto visit_all(T&& x, Ts&&... xs)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/reflect.hpp
→
src/include/migraph
x
/reflect.hpp
View file @
96358e41
#ifndef MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#ifndef MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#define MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#define MIGRAPH_GUARD_RTGLIB_REFLECT_HPP
#include <migraph/functional.hpp>
#include <migraph
x
/functional.hpp>
#include <migraph/rank.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <functional>
#include <functional>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
namespace
detail
{
...
@@ -48,6 +48,6 @@ void reflect_each(T& x, F f)
...
@@ -48,6 +48,6 @@ void reflect_each(T& x, F f)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/requires.hpp
→
src/include/migraph
x
/requires.hpp
View file @
96358e41
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP
#include <type_traits>
#include <type_traits>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
bool
...
Bs
>
template
<
bool
...
Bs
>
...
@@ -32,21 +32,21 @@ struct requires_enum
...
@@ -32,21 +32,21 @@ struct requires_enum
#if 0
#if 0
// TODO: This currently crashed on clang
// TODO: This currently crashed on clang
#define MIGRAPH_REQUIRES(...) \
#define MIGRAPH_REQUIRES(...) \
typename migraph::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
typename migraph
x
::requires_enum<__LINE__>::e MIGRAPH_REQUIRES_CAT( \
PrivateRequires, \
PrivateRequires, \
__LINE__) = migraph::requires_enum<__LINE__>::a, \
__LINE__) = migraph
x
::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__, \
class = typename std::enable_if<and_<__VA_ARGS__, \
MIGRAPH_REQUIRES_CAT(PrivateRequires, __LINE__) == \
MIGRAPH_REQUIRES_CAT(PrivateRequires, __LINE__) == \
migraph::requires_enum<__LINE__>::a>{}>::type
migraph
x
::requires_enum<__LINE__>::a>{}>::type
#else
#else
#define MIGRAPH_REQUIRES(...) \
#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, \
PrivateRequires, __LINE__) = migraph
x
::requires_enum<__LINE__>::a, \
class = typename std::enable_if<and_<__VA_ARGS__>{}>::type
class = typename std::enable_if<and_<__VA_ARGS__>{}>::type
#endif
#endif
#endif
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/shape.hpp
→
src/include/migraph
x
/shape.hpp
View file @
96358e41
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
#include <numeric>
#include <numeric>
#include <memory>
#include <memory>
#include <migraph/errors.hpp>
#include <migraph
x
/errors.hpp>
#include <migraph/half.hpp>
#include <migraph
x
/half.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
shape_impl
;
struct
shape_impl
;
...
@@ -164,6 +164,6 @@ struct shape
...
@@ -164,6 +164,6 @@ struct shape
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#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
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#include <migraph/shape.hpp>
#include <migraph
x
/shape.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <algorithm>
#include <algorithm>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
F
>
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
// Ensure calls to f use const ref to vector
auto
call
=
[
&
f
](
const
std
::
vector
<
std
::
size_t
>&
i
)
{
f
(
i
);
};
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)
...
@@ -29,6 +29,6 @@ void shape_for_each(const migraph::shape& s, F f)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/simplify_algebra.hpp
→
src/include/migraph
x
/simplify_algebra.hpp
View file @
96358e41
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP
#include <string>
#include <string>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
struct
program
;
...
@@ -19,6 +19,6 @@ struct simplify_algebra
...
@@ -19,6 +19,6 @@ struct simplify_algebra
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/simplify_reshapes.hpp
→
src/include/migraph
x
/simplify_reshapes.hpp
View file @
96358e41
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_RESHAPES_HPP
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_RESHAPES_HPP
#include <string>
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph
x
/instruction_ref.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
struct
program
;
...
@@ -20,6 +20,6 @@ struct simplify_reshapes
...
@@ -20,6 +20,6 @@ struct simplify_reshapes
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/streamutils.hpp
→
src/include/migraph
x
/streamutils.hpp
View file @
96358e41
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
#include <ostream>
#include <ostream>
#include <algorithm>
#include <algorithm>
#include <migraph/rank.hpp>
#include <migraph
x
/rank.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
template
<
class
T
>
...
@@ -57,6 +57,6 @@ void stream_write_value(std::ostream& os, const T& x)
...
@@ -57,6 +57,6 @@ void stream_write_value(std::ostream& os, const T& x)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/stringutils.hpp
→
src/include/migraph
x
/stringutils.hpp
View file @
96358e41
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
#include <numeric>
#include <numeric>
#include <string>
#include <string>
#include <sstream>
#include <sstream>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
std
::
string
inline
std
::
string
...
@@ -88,6 +88,6 @@ inline std::string to_string(const T& x)
...
@@ -88,6 +88,6 @@ inline std::string to_string(const T& x)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/target.hpp
→
src/include/migraph
x
/target.hpp
View file @
96358e41
...
@@ -8,11 +8,11 @@
...
@@ -8,11 +8,11 @@
#include <type_traits>
#include <type_traits>
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include <migraph/context.hpp>
#include <migraph
x
/context.hpp>
#include <migraph/pass.hpp>
#include <migraph
x
/pass.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
#ifdef DOXYGEN
#ifdef DOXYGEN
...
@@ -245,6 +245,6 @@ inline const ValueType& any_cast(const target& x)
...
@@ -245,6 +245,6 @@ inline const ValueType& any_cast(const target& x)
#endif
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/tensor_view.hpp
→
src/include/migraph
x
/tensor_view.hpp
View file @
96358e41
#ifndef MIGRAPH_GUARD_TENSOR_VIEW_HPP
#ifndef MIGRAPH_GUARD_TENSOR_VIEW_HPP
#define MIGRAPH_GUARD_TENSOR_VIEW_HPP
#define MIGRAPH_GUARD_TENSOR_VIEW_HPP
#include <migraph/shape.hpp>
#include <migraph
x
/shape.hpp>
#include <migraph/float_equal.hpp>
#include <migraph
x
/float_equal.hpp>
#include <migraph/requires.hpp>
#include <migraph
x
/requires.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
#include <iostream>
#include <iostream>
#include <utility>
#include <utility>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
template
<
class
T
>
...
@@ -170,6 +170,6 @@ tensor_view<T> make_view(shape s, T* data)
...
@@ -170,6 +170,6 @@ tensor_view<T> make_view(shape s, T* data)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/time.hpp
→
src/include/migraph
x
/time.hpp
View file @
96358e41
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TIME_HPP
#define MIGRAPH_GUARD_RTGLIB_TIME_HPP
#include <chrono>
#include <chrono>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
Duration
,
class
F
>
template
<
class
Duration
,
class
F
>
...
@@ -17,6 +17,6 @@ auto time(F f)
...
@@ -17,6 +17,6 @@ auto time(F f)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/tracer.hpp
→
src/include/migraph
x
/tracer.hpp
View file @
96358e41
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_TRACER_HPP
#define MIGRAPH_GUARD_RTGLIB_TRACER_HPP
#include <ostream>
#include <ostream>
#include <migraph/functional.hpp>
#include <migraph
x
/functional.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
tracer
struct
tracer
...
@@ -31,6 +31,6 @@ struct tracer
...
@@ -31,6 +31,6 @@ struct tracer
};
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/type_name.hpp
→
src/include/migraph
x
/type_name.hpp
View file @
96358e41
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_NAME_HPP
#define MIGRAPH_GUARD_RTGLIB_TYPE_NAME_HPP
#include <string>
#include <string>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
PrivateMigraphTypeNameProbe
>
template
<
class
PrivateMigraphTypeNameProbe
>
...
@@ -38,10 +38,10 @@ const std::string& get_type_name()
...
@@ -38,10 +38,10 @@ const std::string& get_type_name()
template
<
class
T
>
template
<
class
T
>
const
std
::
string
&
get_type_name
(
const
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_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/type_traits.hpp
→
src/include/migraph
x
/type_traits.hpp
View file @
96358e41
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
#define MIGRAPH_GUARD_RTGLIB_TYPE_TRAITS_HPP
#define MIGRAPH_GUARD_RTGLIB_TYPE_TRAITS_HPP
#include <type_traits>
#include <type_traits>
#include <migraph/half.hpp>
#include <migraph
x
/half.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
#define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
#define MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(trait, T) \
...
@@ -31,6 +31,6 @@ MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_signed, half)
...
@@ -31,6 +31,6 @@ MIGRAPH_DETAIL_EXTEND_TRAIT_FOR(is_signed, half)
MIGRAPH_DETAIL_EXTEND_TRAIT_FOR
(
is_arithmetic
,
half
)
MIGRAPH_DETAIL_EXTEND_TRAIT_FOR
(
is_arithmetic
,
half
)
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/verify.hpp
→
src/include/migraph
x
/verify.hpp
View file @
96358e41
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
#include <iostream>
#include <iostream>
#include <numeric>
#include <numeric>
#include <migraph/float_equal.hpp>
#include <migraph
x
/float_equal.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
// Compute the value of a range
// Compute the value of a range
...
@@ -174,5 +174,5 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n
...
@@ -174,5 +174,5 @@ bool verify_range(R1&& r1, R2&& r2, double tolerance = 80, double* out_error = n
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/include/migraph/verify_args.hpp
→
src/include/migraph
x
/verify_args.hpp
View file @
96358e41
#ifndef MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#ifndef MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#define MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#define MIGRAPH_GUARD_RTGLIB_VERIFY_ARGS_HPP
#include <migraph/verify.hpp>
#include <migraph
x
/verify.hpp>
#include <migraph/argument.hpp>
#include <migraph
x
/argument.hpp>
#include <migraph/config.hpp>
#include <migraph
x
/config.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
bool
verify_args
(
const
std
::
string
&
name
,
inline
bool
verify_args
(
const
std
::
string
&
name
,
...
@@ -85,6 +85,6 @@ 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_INLINE_NS
}
// namespace migraph
}
// namespace migraph
x
#endif
#endif
src/instruction.cpp
View file @
96358e41
#include <migraph/instruction.hpp>
#include <migraph
x
/instruction.hpp>
#include <migraph/builtin.hpp>
#include <migraph
x
/builtin.hpp>
#include <migraph/erase.hpp>
#include <migraph
x
/erase.hpp>
namespace
migraph
{
namespace
migraph
x
{
inline
namespace
MIGRAPH_INLINE_NS
{
inline
namespace
MIGRAPH_INLINE_NS
{
instruction
::
instruction
(
operation
o
,
shape
r
,
std
::
vector
<
instruction_ref
>
args
)
instruction
::
instruction
(
operation
o
,
shape
r
,
std
::
vector
<
instruction_ref
>
args
)
...
@@ -70,7 +70,7 @@ bool instruction::valid() const
...
@@ -70,7 +70,7 @@ bool instruction::valid() const
{
{
computed
=
compute_shape
(
op
,
arguments
);
computed
=
compute_shape
(
op
,
arguments
);
}
}
catch
(
migraph
::
exception
&
)
catch
(
migraph
x
::
exception
&
)
{
{
return
false
;
return
false
;
}
}
...
@@ -184,4 +184,4 @@ shape compute_shape(const operation& op, const std::vector<instruction_ref>& arg
...
@@ -184,4 +184,4 @@ shape compute_shape(const operation& op, const std::vector<instruction_ref>& arg
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// 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