Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
3cef466f
Unverified
Commit
3cef466f
authored
Oct 02, 2018
by
Adam Procter
Committed by
GitHub
Oct 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into aprocter/partial-shape
parents
01b94186
ee712ae8
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
63 additions
and
67 deletions
+63
-67
CMakeLists.txt
src/ngraph/runtime/gpu/CMakeLists.txt
+2
-2
gpu_backend.cpp
src/ngraph/runtime/gpu/gpu_backend.cpp
+5
-5
gpu_emitter.cpp
src/ngraph/runtime/gpu/gpu_emitter.cpp
+1
-1
gpu_emitter.hpp
src/ngraph/runtime/gpu/gpu_emitter.hpp
+2
-2
gpu_external_function.cpp
src/ngraph/runtime/gpu/gpu_external_function.cpp
+13
-13
gpu_external_function.hpp
src/ngraph/runtime/gpu/gpu_external_function.hpp
+3
-3
gpu_kernel_emitters.cpp
src/ngraph/runtime/gpu/gpu_kernel_emitters.cpp
+5
-5
gpu_kernel_emitters.hpp
src/ngraph/runtime/gpu/gpu_kernel_emitters.hpp
+6
-6
gpu_tensor.cpp
src/ngraph/runtime/gpu/gpu_tensor.cpp
+9
-10
gpu_tensor.hpp
src/ngraph/runtime/gpu/gpu_tensor.hpp
+5
-7
gpu_tensor_wrapper.cpp
src/ngraph/runtime/gpu/gpu_tensor_wrapper.cpp
+9
-9
gpu_tensor_wrapper.hpp
src/ngraph/runtime/gpu/gpu_tensor_wrapper.hpp
+3
-4
No files found.
src/ngraph/runtime/gpu/CMakeLists.txt
View file @
3cef466f
...
...
@@ -33,8 +33,8 @@ set(SRC
gpu_memory_manager.cpp
gpu_primitive_emitter.cpp
gpu_runtime_context.cpp
gpu_tensor_
view_
wrapper.cpp
gpu_tensor
_view
.cpp
gpu_tensor_wrapper.cpp
gpu_tensor.cpp
gpu_util.cpp
type_info.cpp
pass/gpu_layout.cpp
...
...
src/ngraph/runtime/gpu/gpu_backend.cpp
View file @
3cef466f
...
...
@@ -23,7 +23,7 @@
#include "ngraph/runtime/gpu/gpu_backend.hpp"
#include "ngraph/runtime/gpu/gpu_external_function.hpp"
#include "ngraph/runtime/gpu/gpu_primitive_emitter.hpp"
#include "ngraph/runtime/gpu/gpu_tensor
_view
.hpp"
#include "ngraph/runtime/gpu/gpu_tensor.hpp"
#include "ngraph/util.hpp"
using
namespace
ngraph
;
...
...
@@ -101,13 +101,13 @@ runtime::gpu::GPU_Backend::BackendContext::~BackendContext()
shared_ptr
<
runtime
::
Tensor
>
runtime
::
gpu
::
GPU_Backend
::
create_tensor
(
const
element
::
Type
&
element_type
,
const
Shape
&
shape
)
{
return
make_shared
<
runtime
::
gpu
::
GPU
_TensorView
>
(
element_type
,
shape
);
return
make_shared
<
runtime
::
gpu
::
GPU
Tensor
>
(
element_type
,
shape
);
}
shared_ptr
<
runtime
::
Tensor
>
runtime
::
gpu
::
GPU_Backend
::
create_tensor
(
const
element
::
Type
&
element_type
,
const
Shape
&
shape
,
void
*
memory_pointer
)
{
return
make_shared
<
runtime
::
gpu
::
GPU
_TensorView
>
(
element_type
,
shape
,
memory_pointer
);
return
make_shared
<
runtime
::
gpu
::
GPU
Tensor
>
(
element_type
,
shape
,
memory_pointer
);
}
bool
runtime
::
gpu
::
GPU_Backend
::
compile
(
shared_ptr
<
Function
>
func
)
...
...
@@ -130,8 +130,8 @@ void runtime::gpu::GPU_Backend::initialize_io(void** target,
{
for
(
size_t
i
=
0
;
i
<
source
.
size
();
i
++
)
{
shared_ptr
<
runtime
::
gpu
::
GPU
_TensorView
>
tv
=
dynamic_pointer_cast
<
runtime
::
gpu
::
GPU
_TensorView
>
(
source
[
i
]);
shared_ptr
<
runtime
::
gpu
::
GPU
Tensor
>
tv
=
dynamic_pointer_cast
<
runtime
::
gpu
::
GPU
Tensor
>
(
source
[
i
]);
if
(
tv
)
{
target
[
i
]
=
tv
->
m_allocated_buffer_pool
;
...
...
src/ngraph/runtime/gpu/gpu_emitter.cpp
View file @
3cef466f
...
...
@@ -1579,7 +1579,7 @@ void runtime::gpu::GPU_Emitter::emit_TopK(EMIT_ARGS)
throw
unsupported_op
(
"Unsupported op '"
+
node
->
description
()
+
"'"
);
}
string
runtime
::
gpu
::
GPU_Emitter
::
node_names
(
const
vector
<
GPU
_TensorView
Wrapper
>&
args
,
string
runtime
::
gpu
::
GPU_Emitter
::
node_names
(
const
vector
<
GPU
Tensor
Wrapper
>&
args
,
initializer_list
<
int
>
arg_indexes
)
{
vector
<
string
>
names
;
...
...
src/ngraph/runtime/gpu/gpu_emitter.hpp
View file @
3cef466f
...
...
@@ -22,7 +22,7 @@
#include "ngraph/codegen/code_writer.hpp"
#include "ngraph/node.hpp"
#include "ngraph/runtime/gpu/gpu_external_function.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_wrapper.hpp"
namespace
ngraph
{
...
...
@@ -81,7 +81,7 @@ namespace ngraph
/// \param arg_indexes a list of indexes into args for which args to include in
/// the output list, so {1, 2} will include args 1 and 2 and skip 0.
/// \ return returns a string containing "arg0_name, arg1_name, etc."
static
std
::
string
node_names
(
const
std
::
vector
<
GPU
_TensorView
Wrapper
>&
args
,
static
std
::
string
node_names
(
const
std
::
vector
<
GPU
Tensor
Wrapper
>&
args
,
std
::
initializer_list
<
int
>
arg_indexes
=
{});
};
...
...
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
3cef466f
...
...
@@ -110,7 +110,7 @@
#include "ngraph/runtime/gpu/gpu_external_function.hpp"
#include "ngraph/runtime/gpu/gpu_kernel_emitters.hpp"
#include "ngraph/runtime/gpu/gpu_runtime_context.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_wrapper.hpp"
#include "ngraph/runtime/gpu/pass/gpu_layout.hpp"
#include "ngraph/runtime/gpu/pass/tensor_memory_reservation.hpp"
...
...
@@ -167,8 +167,8 @@ static GPUStaticInitializers s_static_initializers;
void
runtime
::
gpu
::
GPU_ExternalFunction
::
emit_op
(
GPU_ExternalFunction
*
external_function
,
codegen
::
CodeWriter
&
writer
,
const
ngraph
::
Node
*
node
,
const
std
::
vector
<
GPU
_TensorView
Wrapper
>&
args
,
const
std
::
vector
<
GPU
_TensorView
Wrapper
>&
out
)
const
std
::
vector
<
GPU
Tensor
Wrapper
>&
args
,
const
std
::
vector
<
GPU
Tensor
Wrapper
>&
out
)
{
auto
emit_function
=
GPU_Emitter
::
get_emit_function
(
*
node
);
emit_function
(
external_function
,
writer
,
node
,
args
,
out
);
...
...
@@ -468,21 +468,21 @@ void runtime::gpu::GPU_ExternalFunction::emit_functions()
for
(
shared_ptr
<
Node
>
node
:
m_function_ordered_ops
.
at
(
current_function
))
{
vector
<
GPU
_TensorView
Wrapper
>
in
;
vector
<
GPU
Tensor
Wrapper
>
in
;
vector
<
string
>
node_input_names
;
vector
<
string
>
node_output_names
;
for
(
const
descriptor
::
Input
&
input
:
node
->
get_inputs
())
{
const
descriptor
::
Output
&
output
=
input
.
get_output
();
shared_ptr
<
descriptor
::
Tensor
>
tv
=
output
.
get_tensor_ptr
();
in
.
push_back
(
GPU
_TensorView
Wrapper
(
tv
,
m_variable_name_map
[
tv
->
get_name
()]));
in
.
push_back
(
GPU
Tensor
Wrapper
(
tv
,
m_variable_name_map
[
tv
->
get_name
()]));
node_input_names
.
emplace_back
(
tv
->
get_name
());
}
vector
<
GPU
_TensorView
Wrapper
>
out
;
vector
<
GPU
Tensor
Wrapper
>
out
;
for
(
const
descriptor
::
Output
&
output
:
node
->
get_outputs
())
{
shared_ptr
<
descriptor
::
Tensor
>
tv
=
output
.
get_tensor_ptr
();
out
.
push_back
(
GPU
_TensorView
Wrapper
(
tv
,
m_variable_name_map
[
tv
->
get_name
()]));
out
.
push_back
(
GPU
Tensor
Wrapper
(
tv
,
m_variable_name_map
[
tv
->
get_name
()]));
node_output_names
.
emplace_back
(
tv
->
get_name
());
}
...
...
@@ -509,11 +509,11 @@ void runtime::gpu::GPU_ExternalFunction::emit_functions()
string
func_name
=
ngraph
::
pass
::
CommonFunctionCollection
::
create_function_name
(
*
it
->
second
);
vector
<
string
>
names
;
for
(
const
GPU
_TensorView
Wrapper
&
tv
:
in
)
for
(
const
GPU
Tensor
Wrapper
&
tv
:
in
)
{
names
.
push_back
(
tv
.
get_name
());
}
for
(
const
GPU
_TensorView
Wrapper
&
tv
:
out
)
for
(
const
GPU
Tensor
Wrapper
&
tv
:
out
)
{
names
.
push_back
(
tv
.
get_name
());
}
...
...
@@ -642,14 +642,14 @@ string runtime::gpu::GPU_ExternalFunction::emit_op_as_function(const Node& node,
codegen
::
CodeWriter
writer
;
writer
<<
"static void "
<<
function_name
<<
"("
;
writer
.
indent
++
;
vector
<
GPU
_TensorView
Wrapper
>
in
;
vector
<
GPU
Tensor
Wrapper
>
in
;
size_t
arg_index
=
0
;
set
<
string
>
arg_names
;
for
(
const
descriptor
::
Input
&
input
:
node
.
get_inputs
())
{
const
descriptor
::
Output
&
output
=
input
.
get_output
();
shared_ptr
<
descriptor
::
Tensor
>
tv
=
output
.
get_tensor_ptr
();
GPU
_TensorView
Wrapper
tvw
{
tv
,
"_arg"
+
to_string
(
arg_index
)};
GPU
Tensor
Wrapper
tvw
{
tv
,
"_arg"
+
to_string
(
arg_index
)};
if
(
!
contains
(
arg_names
,
tvw
.
get_name
()))
{
arg_names
.
insert
(
tvw
.
get_name
());
...
...
@@ -662,11 +662,11 @@ string runtime::gpu::GPU_ExternalFunction::emit_op_as_function(const Node& node,
}
in
.
push_back
(
tvw
);
}
vector
<
GPU
_TensorView
Wrapper
>
out
;
vector
<
GPU
Tensor
Wrapper
>
out
;
for
(
const
descriptor
::
Output
&
output
:
node
.
get_outputs
())
{
shared_ptr
<
descriptor
::
Tensor
>
tv
=
output
.
get_tensor_ptr
();
GPU
_TensorView
Wrapper
tvw
{
tv
,
"_out"
+
to_string
(
arg_index
)};
GPU
Tensor
Wrapper
tvw
{
tv
,
"_out"
+
to_string
(
arg_index
)};
if
(
arg_index
++
>
0
)
{
writer
<<
","
;
...
...
src/ngraph/runtime/gpu/gpu_external_function.hpp
View file @
3cef466f
...
...
@@ -33,12 +33,12 @@
#include "ngraph/pass/memory_layout.hpp"
#include "ngraph/runtime/gpu/gpu_backend.hpp"
#include "ngraph/runtime/gpu/gpu_primitive_emitter.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_wrapper.hpp"
#define EMIT_ARGS \
runtime::gpu::GPU_ExternalFunction *external_function, codegen::CodeWriter &writer, \
const Node *node, const std::vector<runtime::gpu::GPU
_TensorViewWrapper> &args,
\
const std::vector<runtime::gpu::GPU
_TensorView
Wrapper> &out
const Node *node, const std::vector<runtime::gpu::GPU
TensorWrapper> &args,
\
const std::vector<runtime::gpu::GPU
Tensor
Wrapper> &out
namespace
ngraph
{
...
...
src/ngraph/runtime/gpu/gpu_kernel_emitters.cpp
View file @
3cef466f
...
...
@@ -24,7 +24,7 @@
using
namespace
ngraph
;
void
runtime
::
gpu
::
kernel
::
emit_memset
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
dst
,
const
GPU
Tensor
Wrapper
&
dst
,
int
value
,
size_t
buffer_size
)
{
...
...
@@ -37,8 +37,8 @@ void runtime::gpu::kernel::emit_memset(codegen::CodeWriter& writer,
}
void
runtime
::
gpu
::
kernel
::
emit_memcpyDtD
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
dst
,
const
GPU
_TensorView
Wrapper
&
src
,
const
GPU
Tensor
Wrapper
&
dst
,
const
GPU
Tensor
Wrapper
&
src
,
size_t
buffer_size
)
{
if
(
buffer_size
==
0
)
...
...
@@ -192,8 +192,8 @@ void runtime::gpu::kernel::emit_cudnnTensorNdDescriptor(codegen::CodeWriter& wri
}
void
runtime
::
gpu
::
kernel
::
emit_cudnnReduceTensor
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
in
,
const
GPU
_TensorView
Wrapper
&
out
,
const
GPU
Tensor
Wrapper
&
in
,
const
GPU
Tensor
Wrapper
&
out
,
const
std
::
string
&
reduce_op
,
const
std
::
string
&
data_type
,
const
std
::
string
&
nan_prop
,
...
...
src/ngraph/runtime/gpu/gpu_kernel_emitters.hpp
View file @
3cef466f
...
...
@@ -19,7 +19,7 @@
#include "ngraph/codegen/code_writer.hpp"
#include "ngraph/coordinate_transform.hpp"
#include "ngraph/node.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_wrapper.hpp"
namespace
ngraph
{
...
...
@@ -30,13 +30,13 @@ namespace ngraph
namespace
kernel
{
void
emit_memset
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
dst
,
const
GPU
Tensor
Wrapper
&
dst
,
int
value
,
size_t
buffer_size
=
0
);
void
emit_memcpyDtD
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
dst
,
const
GPU
_TensorView
Wrapper
&
src
,
const
GPU
Tensor
Wrapper
&
dst
,
const
GPU
Tensor
Wrapper
&
src
,
size_t
buffer_size
=
0
);
void
emit_cudnnConvolutionDescriptor
(
codegen
::
CodeWriter
&
writer
,
...
...
@@ -73,8 +73,8 @@ namespace ngraph
const
std
::
vector
<
size_t
>&
strides
);
void
emit_cudnnReduceTensor
(
codegen
::
CodeWriter
&
writer
,
const
GPU
_TensorView
Wrapper
&
in
,
const
GPU
_TensorView
Wrapper
&
out
,
const
GPU
Tensor
Wrapper
&
in
,
const
GPU
Tensor
Wrapper
&
out
,
const
std
::
string
&
reduce_op
,
const
std
::
string
&
data_type
,
const
std
::
string
&
nan_prop
,
...
...
src/ngraph/runtime/gpu/gpu_tensor
_view
.cpp
→
src/ngraph/runtime/gpu/gpu_tensor.cpp
View file @
3cef466f
...
...
@@ -21,15 +21,15 @@
#include "ngraph/descriptor/layout/dense_tensor_layout.hpp"
#include "ngraph/runtime/gpu/cuda_error_check.hpp"
#include "ngraph/runtime/gpu/gpu_backend.hpp"
#include "ngraph/runtime/gpu/gpu_tensor
_view
.hpp"
#include "ngraph/runtime/gpu/gpu_tensor.hpp"
#include "ngraph/runtime/gpu/gpu_util.hpp"
using
namespace
ngraph
;
using
namespace
std
;
runtime
::
gpu
::
GPU
_TensorView
::
GPU_TensorView
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
,
void
*
memory_pointer
)
runtime
::
gpu
::
GPU
Tensor
::
GPUTensor
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
,
void
*
memory_pointer
)
:
runtime
::
Tensor
(
std
::
make_shared
<
ngraph
::
descriptor
::
Tensor
>
(
element_type
,
shape
,
"external"
))
,
m_custom_memory
(
false
)
{
...
...
@@ -48,13 +48,12 @@ runtime::gpu::GPU_TensorView::GPU_TensorView(const ngraph::element::Type& elemen
}
}
runtime
::
gpu
::
GPU_TensorView
::
GPU_TensorView
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
)
:
GPU_TensorView
(
element_type
,
shape
,
nullptr
)
runtime
::
gpu
::
GPUTensor
::
GPUTensor
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
)
:
GPUTensor
(
element_type
,
shape
,
nullptr
)
{
}
runtime
::
gpu
::
GPU
_TensorView
::~
GPU_TensorView
()
runtime
::
gpu
::
GPU
Tensor
::~
GPUTensor
()
{
if
(
!
m_custom_memory
&&
(
m_allocated_buffer_pool
!=
nullptr
))
{
...
...
@@ -62,12 +61,12 @@ runtime::gpu::GPU_TensorView::~GPU_TensorView()
}
}
void
runtime
::
gpu
::
GPU
_TensorView
::
write
(
const
void
*
source
,
size_t
tensor_offset
,
size_t
n
)
void
runtime
::
gpu
::
GPU
Tensor
::
write
(
const
void
*
source
,
size_t
tensor_offset
,
size_t
n
)
{
CUDA_RT_SAFE_CALL
(
cudaMemcpy
(
m_allocated_buffer_pool
,
source
,
n
,
cudaMemcpyHostToDevice
));
}
void
runtime
::
gpu
::
GPU
_TensorView
::
read
(
void
*
target
,
size_t
tensor_offset
,
size_t
n
)
const
void
runtime
::
gpu
::
GPU
Tensor
::
read
(
void
*
target
,
size_t
tensor_offset
,
size_t
n
)
const
{
CUDA_RT_SAFE_CALL
(
cudaMemcpy
(
target
,
m_allocated_buffer_pool
,
n
,
cudaMemcpyDeviceToHost
));
}
src/ngraph/runtime/gpu/gpu_tensor
_view
.hpp
→
src/ngraph/runtime/gpu/gpu_tensor.hpp
View file @
3cef466f
...
...
@@ -28,19 +28,17 @@ namespace ngraph
{
namespace
gpu
{
class
GPU
_TensorView
;
class
GPU
Tensor
;
}
}
}
class
ngraph
::
runtime
::
gpu
::
GPU
_TensorView
:
public
ngraph
::
runtime
::
Tensor
class
ngraph
::
runtime
::
gpu
::
GPU
Tensor
:
public
ngraph
::
runtime
::
Tensor
{
public
:
GPU_TensorView
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
);
GPU_TensorView
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
,
void
*
memory_pointer
);
virtual
~
GPU_TensorView
();
GPUTensor
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
);
GPUTensor
(
const
ngraph
::
element
::
Type
&
element_type
,
const
Shape
&
shape
,
void
*
memory_pointer
);
virtual
~
GPUTensor
();
/// \brief Write bytes directly into the tensor
/// \param p Pointer to source of data
...
...
src/ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.cpp
→
src/ngraph/runtime/gpu/gpu_tensor_wrapper.cpp
View file @
3cef466f
...
...
@@ -14,41 +14,41 @@
// limitations under the License.
//*****************************************************************************
#include "ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_wrapper.hpp"
#include "ngraph/descriptor/layout/tensor_layout.hpp"
#include "ngraph/descriptor/tensor.hpp"
using
namespace
std
;
using
namespace
ngraph
;
runtime
::
gpu
::
GPU
_TensorViewWrapper
::
GPU_TensorView
Wrapper
(
const
shared_ptr
<
descriptor
::
Tensor
>&
tv
,
const
string
&
alias
)
runtime
::
gpu
::
GPU
TensorWrapper
::
GPUTensor
Wrapper
(
const
shared_ptr
<
descriptor
::
Tensor
>&
tv
,
const
string
&
alias
)
:
m_tensor
(
tv
)
,
m_alias
(
alias
)
{
}
size_t
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_size
()
const
size_t
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_size
()
const
{
return
m_tensor
->
get_tensor_layout
()
->
get_size
();
}
const
Shape
&
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_shape
()
const
const
Shape
&
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_shape
()
const
{
return
m_tensor
->
get_tensor_layout
()
->
get_shape
();
}
Strides
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_strides
()
const
Strides
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_strides
()
const
{
return
m_tensor
->
get_tensor_layout
()
->
get_strides
();
}
const
element
::
Type
&
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_element_type
()
const
const
element
::
Type
&
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_element_type
()
const
{
return
m_tensor
->
get_tensor_layout
()
->
get_element_type
();
}
const
std
::
string
&
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_name
()
const
const
std
::
string
&
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_name
()
const
{
if
(
m_alias
.
empty
())
{
...
...
@@ -60,7 +60,7 @@ const std::string& runtime::gpu::GPU_TensorViewWrapper::get_name() const
}
}
const
std
::
string
&
runtime
::
gpu
::
GPU
_TensorView
Wrapper
::
get_type
()
const
const
std
::
string
&
runtime
::
gpu
::
GPU
Tensor
Wrapper
::
get_type
()
const
{
return
get_element_type
().
c_type_string
();
}
src/ngraph/runtime/gpu/gpu_tensor_
view_
wrapper.hpp
→
src/ngraph/runtime/gpu/gpu_tensor_wrapper.hpp
View file @
3cef466f
...
...
@@ -27,16 +27,15 @@ namespace ngraph
{
namespace
gpu
{
class
GPU
_TensorView
Wrapper
;
class
GPU
Tensor
Wrapper
;
}
}
}
class
ngraph
::
runtime
::
gpu
::
GPU
_TensorView
Wrapper
class
ngraph
::
runtime
::
gpu
::
GPU
Tensor
Wrapper
{
public
:
GPU_TensorViewWrapper
(
const
std
::
shared_ptr
<
descriptor
::
Tensor
>&
,
const
std
::
string
&
alias
=
""
);
GPUTensorWrapper
(
const
std
::
shared_ptr
<
descriptor
::
Tensor
>&
,
const
std
::
string
&
alias
=
""
);
size_t
get_size
()
const
;
const
Shape
&
get_shape
()
const
;
...
...
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