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
eea003a5
"vscode:/vscode.git/clone" did not exist on "f7051bf0af4a7918539eae8ddd6ee8e757b8c557"
Commit
eea003a5
authored
Jul 02, 2018
by
Paul
Browse files
s/rtg/migraph
parent
5f1ea74f
Changes
62
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
144 additions
and
82 deletions
+144
-82
.clang-tidy
.clang-tidy
+1
-1
CMakeLists.txt
CMakeLists.txt
+5
-5
Jenkinsfile
Jenkinsfile
+1
-1
doc/CMakeLists.txt
doc/CMakeLists.txt
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+4
-4
src/generate.cpp
src/generate.cpp
+5
-5
src/include/migraph/argument.hpp
src/include/migraph/argument.hpp
+6
-6
src/include/migraph/builtin.hpp
src/include/migraph/builtin.hpp
+12
-12
src/include/migraph/context.hpp
src/include/migraph/context.hpp
+4
-4
src/include/migraph/dfor.hpp
src/include/migraph/dfor.hpp
+4
-4
src/include/migraph/erase.hpp
src/include/migraph/erase.hpp
+4
-4
src/include/migraph/errors.hpp
src/include/migraph/errors.hpp
+7
-7
src/include/migraph/fallthrough.hpp
src/include/migraph/fallthrough.hpp
+14
-0
src/include/migraph/float_equal.hpp
src/include/migraph/float_equal.hpp
+4
-4
src/include/migraph/generate.hpp
src/include/migraph/generate.hpp
+23
-0
src/include/migraph/instruction.hpp
src/include/migraph/instruction.hpp
+11
-11
src/include/migraph/instruction_ref.hpp
src/include/migraph/instruction_ref.hpp
+13
-0
src/include/migraph/literal.hpp
src/include/migraph/literal.hpp
+8
-8
src/include/migraph/manage_ptr.hpp
src/include/migraph/manage_ptr.hpp
+5
-5
src/include/migraph/onnx.hpp
src/include/migraph/onnx.hpp
+12
-0
No files found.
.clang-tidy
View file @
eea003a5
...
@@ -100,4 +100,4 @@ CheckOptions:
...
@@ -100,4 +100,4 @@ CheckOptions:
# - key: readability-identifier-naming.MacroDefinitionCase
# - key: readability-identifier-naming.MacroDefinitionCase
# value: UPPER_CASE
# value: UPPER_CASE
# - key: readability-identifier-naming.MacroDefinitionPrefix
# - key: readability-identifier-naming.MacroDefinitionPrefix
# value:
RTG
_
# value:
MIGRAPH
_
CMakeLists.txt
View file @
eea003a5
cmake_minimum_required
(
VERSION 3.5
)
cmake_minimum_required
(
VERSION 3.5
)
project
(
rtg
lib
)
project
(
migraph
lib
)
find_package
(
ROCM REQUIRED
)
find_package
(
ROCM REQUIRED
)
option
(
BUILD_SHARED_LIBS
"Build as a shared library"
ON
)
option
(
BUILD_SHARED_LIBS
"Build as a shared library"
ON
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"5.4"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS
"5.4"
)
message
(
FATAL_ERROR
"
RTG
Lib requires at least gcc 5.4"
)
message
(
FATAL_ERROR
"
MIGRAPH
Lib requires at least gcc 5.4"
)
endif
()
endif
()
endif
()
endif
()
if
(
CMAKE_CXX_COMPILER MATCHES
".*hcc"
)
if
(
CMAKE_CXX_COMPILER MATCHES
".*hcc"
)
message
(
STATUS
"Enable miopen backend"
)
message
(
STATUS
"Enable miopen backend"
)
set
(
RTG
_ENABLE_MIOPEN On CACHE BOOL
""
)
set
(
MIGRAPH
_ENABLE_MIOPEN On CACHE BOOL
""
)
else
()
else
()
set
(
RTG
_ENABLE_MIOPEN Off CACHE BOOL
""
)
set
(
MIGRAPH
_ENABLE_MIOPEN Off CACHE BOOL
""
)
endif
()
endif
()
add_compile_options
(
-std=c++14
)
add_compile_options
(
-std=c++14
)
...
@@ -85,7 +85,7 @@ rocm_enable_clang_tidy(
...
@@ -85,7 +85,7 @@ rocm_enable_clang_tidy(
HEADER_FILTER
HEADER_FILTER
".*hpp"
".*hpp"
EXTRA_ARGS
EXTRA_ARGS
-D
RTG
_USE_CLANG_TIDY
-D
MIGRAPH
_USE_CLANG_TIDY
ANALYZE_TEMPORARY_DTORS ON
ANALYZE_TEMPORARY_DTORS ON
)
)
...
...
Jenkinsfile
View file @
eea003a5
def
rocmtestnode
(
variant
,
name
,
body
)
{
def
rocmtestnode
(
variant
,
name
,
body
)
{
def
image
=
'
rtg
lib'
def
image
=
'
migraph
lib'
def
cmake_build
=
{
compiler
,
flags
->
def
cmake_build
=
{
compiler
,
flags
->
def
cmd
=
"""
def
cmd
=
"""
rm -rf build
rm -rf build
...
...
doc/CMakeLists.txt
View file @
eea003a5
...
@@ -16,7 +16,7 @@ add_doxygen_doc(
...
@@ -16,7 +16,7 @@ add_doxygen_doc(
CALL_GRAPH YES
CALL_GRAPH YES
CALLER_GRAPH YES
CALLER_GRAPH YES
BUILTIN_STL_SUPPORT YES
BUILTIN_STL_SUPPORT YES
PROJECT_NAME
RTG
Lib
PROJECT_NAME
MIGRAPH
Lib
SORT_MEMBERS_CTORS_1ST YES
SORT_MEMBERS_CTORS_1ST YES
SOURCE_BROWSER YES
SOURCE_BROWSER YES
GENERATE_TREEVIEW YES
GENERATE_TREEVIEW YES
...
...
src/CMakeLists.txt
View file @
eea003a5
add_library
(
rtg
add_library
(
migraph
generate.cpp
generate.cpp
program.cpp
program.cpp
shape.cpp
shape.cpp
)
)
rocm_clang_tidy_check
(
rtg
)
rocm_clang_tidy_check
(
migraph
)
target_include_directories
(
rtg
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
target_include_directories
(
migraph
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
add_subdirectory
(
onnx
)
add_subdirectory
(
onnx
)
add_subdirectory
(
targets/cpu
)
add_subdirectory
(
targets/cpu
)
if
(
RTG
_ENABLE_MIOPEN
)
if
(
MIGRAPH
_ENABLE_MIOPEN
)
add_subdirectory
(
targets/miopen
)
add_subdirectory
(
targets/miopen
)
endif
()
endif
()
src/generate.cpp
View file @
eea003a5
#include <
rtg
/generate.hpp>
#include <
migraph
/generate.hpp>
namespace
rtg
{
namespace
migraph
{
rtg
::
argument
generate_argument
(
rtg
::
shape
s
,
std
::
mt19937
::
result_type
seed
)
migraph
::
argument
generate_argument
(
migraph
::
shape
s
,
std
::
mt19937
::
result_type
seed
)
{
{
rtg
::
argument
result
;
migraph
::
argument
result
;
s
.
visit_type
([
&
](
auto
as
)
{
s
.
visit_type
([
&
](
auto
as
)
{
using
type
=
typename
decltype
(
as
)
::
type
;
using
type
=
typename
decltype
(
as
)
::
type
;
auto
v
=
generate_tensor_data
<
type
>
(
s
,
seed
);
auto
v
=
generate_tensor_data
<
type
>
(
s
,
seed
);
...
@@ -13,4 +13,4 @@ rtg::argument generate_argument(rtg::shape s, std::mt19937::result_type seed)
...
@@ -13,4 +13,4 @@ rtg::argument generate_argument(rtg::shape s, std::mt19937::result_type seed)
return
result
;
return
result
;
}
}
}
// namespace
rtg
}
// namespace
migraph
src/include/
rtg
/argument.hpp
→
src/include/
migraph
/argument.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_ARGUMENT_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_ARGUMENT_HPP
#define
RTG_GUARD_RTG
LIB_ARGUMENT_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_ARGUMENT_HPP
#include <
rtg
/shape.hpp>
#include <
migraph
/shape.hpp>
#include <
rtg
/raw_data.hpp>
#include <
migraph
/raw_data.hpp>
#include <functional>
#include <functional>
namespace
rtg
{
namespace
migraph
{
/**
/**
* @brief Arguments passed to instructions
* @brief Arguments passed to instructions
...
@@ -49,6 +49,6 @@ struct argument : raw_data<argument>
...
@@ -49,6 +49,6 @@ struct argument : raw_data<argument>
shape
m_shape
;
shape
m_shape
;
};
};
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/builtin.hpp
→
src/include/
migraph
/builtin.hpp
View file @
eea003a5
#ifndef
RTG
_GUARD_BUILTIN_HPP
#ifndef
MIGRAPH
_GUARD_BUILTIN_HPP
#define
RTG
_GUARD_BUILTIN_HPP
#define
MIGRAPH
_GUARD_BUILTIN_HPP
#include <
rtg
/context.hpp>
#include <
migraph
/context.hpp>
#include <
rtg
/errors.hpp>
#include <
migraph
/errors.hpp>
namespace
rtg
{
namespace
migraph
{
namespace
builtin
{
namespace
builtin
{
struct
literal
struct
literal
{
{
std
::
string
name
()
const
{
return
"@literal"
;
}
std
::
string
name
()
const
{
return
"@literal"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
};
};
struct
outline
struct
outline
{
{
shape
s
;
shape
s
;
std
::
string
name
()
const
{
return
"@outline"
;
}
std
::
string
name
()
const
{
return
"@outline"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
};
};
struct
param
struct
param
{
{
std
::
string
parameter
;
std
::
string
parameter
;
std
::
string
name
()
const
{
return
"@param"
;
}
std
::
string
name
()
const
{
return
"@param"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
shape
compute_shape
(
std
::
vector
<
shape
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
RTG
_THROW
(
"builtin"
);
}
argument
compute
(
context
&
,
shape
,
std
::
vector
<
argument
>
)
const
{
MIGRAPH
_THROW
(
"builtin"
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
param
&
op
)
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
param
&
op
)
{
{
os
<<
op
.
name
()
<<
":"
<<
op
.
parameter
;
os
<<
op
.
name
()
<<
":"
<<
op
.
parameter
;
...
@@ -38,6 +38,6 @@ struct param
...
@@ -38,6 +38,6 @@ struct param
}
// namespace builtin
}
// namespace builtin
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/context.hpp
→
src/include/
migraph
/context.hpp
View file @
eea003a5
#ifndef
RTG
_GUARD_CONTEXT_HPP
#ifndef
MIGRAPH
_GUARD_CONTEXT_HPP
#define
RTG
_GUARD_CONTEXT_HPP
#define
MIGRAPH
_GUARD_CONTEXT_HPP
namespace
rtg
{
namespace
migraph
{
/*
/*
* Type-erased interface for:
* Type-erased interface for:
...
@@ -171,6 +171,6 @@ inline const ValueType& any_cast(const context& x)
...
@@ -171,6 +171,6 @@ inline const ValueType& any_cast(const context& x)
return
*
y
;
return
*
y
;
}
}
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/dfor.hpp
→
src/include/
migraph
/dfor.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_DFOR_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_DFOR_HPP
#define
RTG_GUARD_RTG
LIB_DFOR_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_DFOR_HPP
namespace
rtg
{
namespace
migraph
{
// Multidimensional for loop
// Multidimensional for loop
inline
auto
dfor
()
inline
auto
dfor
()
...
@@ -20,6 +20,6 @@ auto dfor(T x, Ts... xs)
...
@@ -20,6 +20,6 @@ auto dfor(T x, Ts... xs)
};
};
}
}
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/erase.hpp
→
src/include/
migraph
/erase.hpp
View file @
eea003a5
#ifndef
RTG
_GUARD_ERASE_HPP
#ifndef
MIGRAPH
_GUARD_ERASE_HPP
#define
RTG
_GUARD_ERASE_HPP
#define
MIGRAPH
_GUARD_ERASE_HPP
namespace
rtg
{
namespace
migraph
{
/**
/**
* @brief Erase all elements from a container
* @brief Erase all elements from a container
...
@@ -29,6 +29,6 @@ auto erase_if(R&& r, P&& pred)
...
@@ -29,6 +29,6 @@ auto erase_if(R&& r, P&& pred)
return
r
.
erase
(
std
::
remove_if
(
r
.
begin
(),
r
.
end
(),
pred
),
r
.
end
());
return
r
.
erase
(
std
::
remove_if
(
r
.
begin
(),
r
.
end
(),
pred
),
r
.
end
());
}
}
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/errors.hpp
→
src/include/
migraph
/errors.hpp
View file @
eea003a5
#ifndef
RTG
_GUARD_ERRORS_HPP
#ifndef
MIGRAPH
_GUARD_ERRORS_HPP
#define
RTG
_GUARD_ERRORS_HPP
#define
MIGRAPH
_GUARD_ERRORS_HPP
#include <exception>
#include <exception>
#include <stdexcept>
#include <stdexcept>
#include <string>
#include <string>
namespace
rtg
{
namespace
migraph
{
/// Represents exceptions that can be thrown by
rtg
lib
/// Represents exceptions that can be thrown by
migraph
lib
struct
exception
:
std
::
runtime_error
struct
exception
:
std
::
runtime_error
{
{
exception
(
std
::
string
msg
=
""
)
:
std
::
runtime_error
(
msg
)
{}
exception
(
std
::
string
msg
=
""
)
:
std
::
runtime_error
(
msg
)
{}
...
@@ -41,9 +41,9 @@ inline std::string make_source_context(const std::string& file, int line)
...
@@ -41,9 +41,9 @@ inline std::string make_source_context(const std::string& file, int line)
/**
/**
* @brief Throw an exception with context information
* @brief Throw an exception with context information
*/
*/
#define
RTG
_THROW(...) \
#define
MIGRAPH
_THROW(...) \
throw
rtg
::make_exception(
rtg
::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
throw
migraph
::make_exception(
migraph
::make_source_context(__FILE__, __LINE__), __VA_ARGS__)
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/migraph/fallthrough.hpp
0 → 100644
View file @
eea003a5
#ifndef MIGRAPH_GUARD_FALLTHROUGH_HPP
#define MIGRAPH_GUARD_FALLTHROUGH_HPP
namespace
migraph
{
#ifdef __clang__
#define MIGRAPH_FALLTHROUGH [[clang::fallthrough]]
#else
#define MIGRAPH_FALLTHROUGH
#endif
}
// namespace migraph
#endif
src/include/
rtg
/float_equal.hpp
→
src/include/
migraph
/float_equal.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_FLOAT_EQUAL_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_FLOAT_EQUAL_HPP
#define
RTG_GUARD_RTG
LIB_FLOAT_EQUAL_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_FLOAT_EQUAL_HPP
#include <algorithm>
#include <algorithm>
#include <cmath>
#include <cmath>
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
#include <iso646.h>
#include <iso646.h>
#endif
#endif
namespace
rtg
{
namespace
migraph
{
template
<
class
...
Ts
>
template
<
class
...
Ts
>
using
common_type
=
typename
std
::
common_type
<
Ts
...
>::
type
;
using
common_type
=
typename
std
::
common_type
<
Ts
...
>::
type
;
...
@@ -32,6 +32,6 @@ struct float_equal_fn
...
@@ -32,6 +32,6 @@ struct float_equal_fn
static
constexpr
float_equal_fn
float_equal
{};
static
constexpr
float_equal_fn
float_equal
{};
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/generate.hpp
→
src/include/
migraph
/generate.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_GENERATE_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_GENERATE_HPP
#define
RTG_GUARD_RTG
LIB_GENERATE_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_GENERATE_HPP
#include <
rtg
/argument.hpp>
#include <
migraph
/argument.hpp>
#include <random>
#include <random>
namespace
rtg
{
namespace
migraph
{
template
<
class
T
>
template
<
class
T
>
std
::
vector
<
T
>
generate_tensor_data
(
rtg
::
shape
s
,
std
::
mt19937
::
result_type
seed
=
0
)
std
::
vector
<
T
>
generate_tensor_data
(
migraph
::
shape
s
,
std
::
mt19937
::
result_type
seed
=
0
)
{
{
std
::
vector
<
T
>
result
(
s
.
elements
());
std
::
vector
<
T
>
result
(
s
.
elements
());
std
::
mt19937
engine
{
seed
};
std
::
mt19937
engine
{
seed
};
...
@@ -16,8 +16,8 @@ std::vector<T> generate_tensor_data(rtg::shape s, std::mt19937::result_type seed
...
@@ -16,8 +16,8 @@ std::vector<T> generate_tensor_data(rtg::shape s, std::mt19937::result_type seed
return
result
;
return
result
;
}
}
rtg
::
argument
generate_argument
(
rtg
::
shape
s
,
std
::
mt19937
::
result_type
seed
=
0
);
migraph
::
argument
generate_argument
(
migraph
::
shape
s
,
std
::
mt19937
::
result_type
seed
=
0
);
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/instruction.hpp
→
src/include/
migraph
/instruction.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_INSTRUCTION_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_INSTRUCTION_HPP
#define
RTG_GUARD_RTG
LIB_INSTRUCTION_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_INSTRUCTION_HPP
#include <
rtg
/literal.hpp>
#include <
migraph
/literal.hpp>
#include <
rtg
/shape.hpp>
#include <
migraph
/shape.hpp>
#include <
rtg
/builtin.hpp>
#include <
migraph
/builtin.hpp>
#include <
rtg
/instruction_ref.hpp>
#include <
migraph
/instruction_ref.hpp>
#include <
rtg
/erase.hpp>
#include <
migraph
/erase.hpp>
#include <string>
#include <string>
namespace
rtg
{
namespace
migraph
{
shape
compute_shape
(
operation
op
,
std
::
vector
<
instruction_ref
>
args
);
shape
compute_shape
(
operation
op
,
std
::
vector
<
instruction_ref
>
args
);
...
@@ -52,7 +52,7 @@ struct instruction
...
@@ -52,7 +52,7 @@ struct instruction
{
{
for
(
auto
&&
arg
:
arguments
)
for
(
auto
&&
arg
:
arguments
)
{
{
rtg
::
erase
(
arg
->
output
,
*
this
);
migraph
::
erase
(
arg
->
output
,
*
this
);
}
}
}
}
...
@@ -103,6 +103,6 @@ inline shape compute_shape(operation op, std::vector<instruction_ref> args)
...
@@ -103,6 +103,6 @@ inline shape compute_shape(operation op, std::vector<instruction_ref> args)
return
op
.
compute_shape
(
shapes
);
return
op
.
compute_shape
(
shapes
);
}
}
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/instruction_ref.hpp
→
src/include/
migraph
/instruction_ref.hpp
View file @
eea003a5
#ifndef
RTG
_GUARD_INSTRUCTION_REF_HPP
#ifndef
MIGRAPH
_GUARD_INSTRUCTION_REF_HPP
#define
RTG
_GUARD_INSTRUCTION_REF_HPP
#define
MIGRAPH
_GUARD_INSTRUCTION_REF_HPP
#include <list>
#include <list>
namespace
rtg
{
namespace
migraph
{
struct
instruction
;
struct
instruction
;
using
instruction_ref
=
std
::
list
<
instruction
>::
iterator
;
using
instruction_ref
=
std
::
list
<
instruction
>::
iterator
;
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/literal.hpp
→
src/include/
migraph
/literal.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
LIB_LITERAL_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
LIB_LITERAL_HPP
#define
RTG_GUARD_RTG
LIB_LITERAL_HPP
#define
MIGRAPH_GUARD_MIGRAPH
LIB_LITERAL_HPP
#include <
rtg
/shape.hpp>
#include <
migraph
/shape.hpp>
#include <
rtg
/argument.hpp>
#include <
migraph
/argument.hpp>
#include <
rtg
/tensor_view.hpp>
#include <
migraph
/tensor_view.hpp>
#include <
rtg
/raw_data.hpp>
#include <
migraph
/raw_data.hpp>
namespace
rtg
{
namespace
migraph
{
/**
/**
* @brief Represents a raw literal
* @brief Represents a raw literal
...
@@ -68,6 +68,6 @@ struct literal : raw_data<literal>
...
@@ -68,6 +68,6 @@ struct literal : raw_data<literal>
shape
m_shape
;
shape
m_shape
;
};
};
}
// namespace
rtg
}
// namespace
migraph
#endif
#endif
src/include/
rtg
/manage_ptr.hpp
→
src/include/
migraph
/manage_ptr.hpp
View file @
eea003a5
#ifndef
RTG_GUARD_RTG
_MANAGE_PTR_HPP
#ifndef
MIGRAPH_GUARD_MIGRAPH
_MANAGE_PTR_HPP
#define
RTG_GUARD_RTG
_MANAGE_PTR_HPP
#define
MIGRAPH_GUARD_MIGRAPH
_MANAGE_PTR_HPP
#include <memory>
#include <memory>
#include <type_traits>
#include <type_traits>
namespace
rtg
{
namespace
migraph
{
template
<
class
F
,
F
f
>
// NOLINT
template
<
class
F
,
F
f
>
// NOLINT
struct
manage_deleter
struct
manage_deleter
...
@@ -49,8 +49,8 @@ shared<T> share(T p)
...
@@ -49,8 +49,8 @@ shared<T> share(T p)
return
shared
<
T
>
{
std
::
move
(
p
)};
return
shared
<
T
>
{
std
::
move
(
p
)};
}
}
}
// namespace
rtg
}
// namespace
migraph
#define
RTG
_MANAGE_PTR(T, F)
rtg
::manage_ptr<std::remove_pointer_t<T>, decltype(&F), &F> // NOLINT
#define
MIGRAPH
_MANAGE_PTR(T, F)
migraph
::manage_ptr<std::remove_pointer_t<T>, decltype(&F), &F> // NOLINT
#endif
#endif
src/include/migraph/onnx.hpp
0 → 100644
View file @
eea003a5
#ifndef GUARD_MIGRAPHLIB_ONNX_HPP
#define GUARD_MIGRAPHLIB_ONNX_HPP
#include <migraph/program.hpp>
namespace
migraph
{
program
parse_onnx
(
const
std
::
string
&
name
);
}
// namespace migraph
#endif
Prev
1
2
3
4
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