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
4c031df7
Commit
4c031df7
authored
Nov 09, 2018
by
wsttiger
Browse files
Fixed conflicts
parents
d32653a5
ed5f9897
Changes
164
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
66 additions
and
1 deletion
+66
-1
src/include/migraph/make_shared_array.hpp
src/include/migraph/make_shared_array.hpp
+3
-0
src/include/migraph/manage_ptr.hpp
src/include/migraph/manage_ptr.hpp
+3
-0
src/include/migraph/matcher.hpp
src/include/migraph/matcher.hpp
+3
-1
src/include/migraph/memory_coloring.hpp
src/include/migraph/memory_coloring.hpp
+5
-0
src/include/migraph/onnx.hpp
src/include/migraph/onnx.hpp
+3
-0
src/include/migraph/operation.hpp
src/include/migraph/operation.hpp
+3
-0
src/include/migraph/operators.hpp
src/include/migraph/operators.hpp
+4
-0
src/include/migraph/pass.hpp
src/include/migraph/pass.hpp
+3
-0
src/include/migraph/pass_config.hpp
src/include/migraph/pass_config.hpp
+4
-0
src/include/migraph/program.hpp
src/include/migraph/program.hpp
+4
-0
src/include/migraph/ranges.hpp
src/include/migraph/ranges.hpp
+3
-0
src/include/migraph/rank.hpp
src/include/migraph/rank.hpp
+4
-0
src/include/migraph/raw_data.hpp
src/include/migraph/raw_data.hpp
+3
-0
src/include/migraph/reflect.hpp
src/include/migraph/reflect.hpp
+3
-0
src/include/migraph/requires.hpp
src/include/migraph/requires.hpp
+3
-0
src/include/migraph/shape.hpp
src/include/migraph/shape.hpp
+3
-0
src/include/migraph/shape_for_each.hpp
src/include/migraph/shape_for_each.hpp
+3
-0
src/include/migraph/simplify_algebra.hpp
src/include/migraph/simplify_algebra.hpp
+3
-0
src/include/migraph/simplify_reshapes.hpp
src/include/migraph/simplify_reshapes.hpp
+3
-0
src/include/migraph/streamutils.hpp
src/include/migraph/streamutils.hpp
+3
-0
No files found.
src/include/migraph/make_shared_array.hpp
View file @
4c031df7
...
...
@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_MAKE_SHARED_ARRAY_HPP
#include <memory>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
typename
T
>
std
::
shared_ptr
<
T
>
make_shared_array
(
size_t
size
)
...
...
@@ -11,6 +13,7 @@ std::shared_ptr<T> make_shared_array(size_t size)
return
std
::
shared_ptr
<
T
>
(
new
T
[
size
],
std
::
default_delete
<
T
[]
>
());
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/manage_ptr.hpp
View file @
4c031df7
...
...
@@ -3,8 +3,10 @@
#include <memory>
#include <type_traits>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
F
,
F
f
>
// NOLINT
struct
manage_deleter
...
...
@@ -49,6 +51,7 @@ shared<T> share(T p)
return
shared
<
T
>
{
std
::
move
(
p
)};
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#define MIGRAPH_MANAGE_PTR(T, F) \
...
...
src/include/migraph/matcher.hpp
View file @
4c031df7
...
...
@@ -6,9 +6,11 @@
#include <migraph/instruction.hpp>
#include <migraph/program.hpp>
#include <migraph/iterator_for.hpp>
#include <migraph/config.hpp>
#include <unordered_map>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
match
{
...
...
@@ -338,7 +340,7 @@ inline auto either_arg(std::size_t i, std::size_t j)
}
}
// namespace match
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/memory_coloring.hpp
View file @
4c031df7
...
...
@@ -3,16 +3,21 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
struct
memory_coloring
{
std
::
string
allocation_op
{};
bool
verify
=
false
;
std
::
string
name
()
const
{
return
"memory coloring"
;
}
void
apply
(
program
&
p
)
const
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/onnx.hpp
View file @
4c031df7
...
...
@@ -2,12 +2,15 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_ONNX_HPP
#include <migraph/program.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
/// Create a program from an onnx file
program
parse_onnx
(
const
std
::
string
&
name
);
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/operation.hpp
View file @
4c031df7
...
...
@@ -13,8 +13,10 @@
#include <migraph/argument.hpp>
#include <migraph/context.hpp>
#include <migraph/auto_any_cast.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
#ifdef DOXYGEN
...
...
@@ -385,6 +387,7 @@ inline bool operator!=(const operation& x, const operation& y) { return !(x == y
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/operators.hpp
View file @
4c031df7
...
...
@@ -6,10 +6,12 @@
#include <migraph/check_shapes.hpp>
#include <migraph/stringutils.hpp>
#include <migraph/streamutils.hpp>
#include <migraph/config.hpp>
#include <cmath>
#include <utility>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
op
{
struct
not_computable
...
...
@@ -611,6 +613,7 @@ struct identity
{
return
{
std
::
move
(
output_shape
),
std
::
move
(
args
.
at
(
0
).
data
)};
}
int
output_alias
(
const
std
::
vector
<
shape
>&
)
const
{
return
0
;
}
};
struct
abs
:
unary
...
...
@@ -901,6 +904,7 @@ struct outline
};
}
// namespace op
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/pass.hpp
View file @
4c031df7
...
...
@@ -7,8 +7,10 @@
#include <memory>
#include <type_traits>
#include <utility>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
...
...
@@ -216,6 +218,7 @@ inline const ValueType& any_cast(const pass& x)
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/pass_config.hpp
View file @
4c031df7
...
...
@@ -3,9 +3,13 @@
#define MIGRAPH_GUARD_PASS_CONFIG_HPP
#include <migraph/env.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
MIGRAPH_DECLARE_ENV_VAR
(
MIGRAPH_DISABLE_MEMORY_COLORING
)
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif // MIGRAPH_GUARD_PASS_CONFIG_HPP
src/include/migraph/program.hpp
View file @
4c031df7
...
...
@@ -9,10 +9,12 @@
#include <migraph/instruction_ref.hpp>
#include <migraph/target.hpp>
#include <migraph/tracer.hpp>
#include <migraph/config.hpp>
#include <algorithm>
#include <iostream>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program_impl
;
...
...
@@ -106,6 +108,8 @@ struct program
private:
std
::
unique_ptr
<
program_impl
>
impl
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/ranges.hpp
View file @
4c031df7
...
...
@@ -4,8 +4,10 @@
#include <algorithm>
#include <initializer_list>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
...
...
@@ -104,6 +106,7 @@ iterator_range<Iterator> range(std::pair<Iterator, Iterator> p)
return
{
p
.
first
,
p
.
second
};
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/rank.hpp
View file @
4c031df7
#ifndef MIGRAPH_GUARD_RTGLIB_RANK_HPP
#define MIGRAPH_GUARD_RTGLIB_RANK_HPP
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
int
N
>
struct
rank
:
rank
<
N
-
1
>
...
...
@@ -13,6 +16,7 @@ struct rank<0>
{
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/raw_data.hpp
View file @
4c031df7
...
...
@@ -4,8 +4,10 @@
#include <migraph/tensor_view.hpp>
#include <migraph/requires.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
raw_data_base
{
...
...
@@ -203,6 +205,7 @@ auto visit_all(T&& x, Ts&&... xs)
};
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/reflect.hpp
View file @
4c031df7
...
...
@@ -3,9 +3,11 @@
#include <migraph/functional.hpp>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
#include <functional>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
namespace
detail
{
...
...
@@ -45,6 +47,7 @@ void reflect_each(T& x, F f)
});
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/requires.hpp
View file @
4c031df7
...
...
@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_REQUIRES_HPP
#include <type_traits>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
bool
...
Bs
>
struct
and_
:
std
::
is_same
<
and_
<
Bs
...
>
,
and_
<
(
Bs
||
true
)...
>>
// NOLINT
...
...
@@ -44,6 +46,7 @@ struct requires_enum
#endif
#endif
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/shape.hpp
View file @
4c031df7
...
...
@@ -9,8 +9,10 @@
#include <migraph/errors.hpp>
#include <migraph/half.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
shape_impl
;
...
...
@@ -161,6 +163,7 @@ struct shape
std
::
string
type_string
()
const
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/shape_for_each.hpp
View file @
4c031df7
...
...
@@ -2,9 +2,11 @@
#define MIGRAPH_GUARD_MIGRAPHLIB_SHAPE_FOR_EACH_HPP
#include <migraph/shape.hpp>
#include <migraph/config.hpp>
#include <algorithm>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
F
>
void
shape_for_each
(
const
migraph
::
shape
&
s
,
F
f
)
...
...
@@ -26,6 +28,7 @@ void shape_for_each(const migraph::shape& s, F f)
}
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/simplify_algebra.hpp
View file @
4c031df7
...
...
@@ -2,8 +2,10 @@
#define MIGRAPH_GUARD_RTGLIB_SIMPLIFY_ALGEBRA_HPP
#include <string>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
...
...
@@ -13,6 +15,7 @@ struct simplify_algebra
void
apply
(
program
&
p
)
const
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/simplify_reshapes.hpp
View file @
4c031df7
...
...
@@ -3,8 +3,10 @@
#include <string>
#include <migraph/instruction_ref.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
struct
program
;
...
...
@@ -14,6 +16,7 @@ struct simplify_reshapes
void
apply
(
program
&
p
)
const
;
};
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
src/include/migraph/streamutils.hpp
View file @
4c031df7
...
...
@@ -4,8 +4,10 @@
#include <ostream>
#include <algorithm>
#include <migraph/rank.hpp>
#include <migraph/config.hpp>
namespace
migraph
{
inline
namespace
MIGRAPH_INLINE_NS
{
template
<
class
T
>
struct
stream_range_container
...
...
@@ -54,6 +56,7 @@ void stream_write_value(std::ostream& os, const T& x)
detail
::
stream_write_value_impl
(
rank
<
1
>
{},
os
,
x
);
}
}
// namespace MIGRAPH_INLINE_NS
}
// namespace migraph
#endif
Prev
1
2
3
4
5
6
7
…
9
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