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
ec9854a2
Commit
ec9854a2
authored
Oct 13, 2018
by
gcwenger
Committed by
Scott Cyphers
Oct 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak to GPUPrimitiveEmitter::lookup (#1814)
parent
edbb81a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
gpu_primitive_emitter.cpp
src/ngraph/runtime/gpu/gpu_primitive_emitter.cpp
+4
-3
gpu_primitive_emitter.hpp
src/ngraph/runtime/gpu/gpu_primitive_emitter.hpp
+1
-1
No files found.
src/ngraph/runtime/gpu/gpu_primitive_emitter.cpp
View file @
ec9854a2
...
@@ -64,11 +64,12 @@ size_t GPUPrimitiveEmitter::insert(const gpu::memory_primitive& f)
...
@@ -64,11 +64,12 @@ size_t GPUPrimitiveEmitter::insert(const gpu::memory_primitive& f)
m_gpu_mem_primitives
.
push_back
(
f
);
m_gpu_mem_primitives
.
push_back
(
f
);
return
m_gpu_mem_primitives
.
size
()
-
1
;
return
m_gpu_mem_primitives
.
size
()
-
1
;
}
}
size_t
GPUPrimitiveEmitter
::
lookup
(
std
::
string
hash
)
size_t
GPUPrimitiveEmitter
::
lookup
(
const
std
::
string
&
hash
)
{
{
if
(
m_primitive_map
.
count
(
hash
)
>
0
)
auto
it
=
m_primitive_map
.
find
(
hash
);
if
(
it
!=
m_primitive_map
.
end
())
{
{
return
m_primitive_map
[
hash
]
;
return
it
->
second
;
}
}
return
std
::
numeric_limits
<
size_t
>::
max
();
return
std
::
numeric_limits
<
size_t
>::
max
();
}
}
...
...
src/ngraph/runtime/gpu/gpu_primitive_emitter.hpp
View file @
ec9854a2
...
@@ -44,7 +44,7 @@ namespace ngraph
...
@@ -44,7 +44,7 @@ namespace ngraph
}
}
size_t
insert
(
std
::
unique_ptr
<
gpu
::
primitive
>&&
f
);
size_t
insert
(
std
::
unique_ptr
<
gpu
::
primitive
>&&
f
);
size_t
insert
(
const
gpu
::
memory_primitive
&
f
);
size_t
insert
(
const
gpu
::
memory_primitive
&
f
);
size_t
lookup
(
std
::
string
hash
);
size_t
lookup
(
const
std
::
string
&
hash
);
void
cache
(
const
std
::
string
&
hash
,
const
size_t
&
index
);
void
cache
(
const
std
::
string
&
hash
,
const
size_t
&
index
);
GPUAllocator
get_memory_allocator
()
{
return
m_memory_manager
.
build_allocator
();
}
GPUAllocator
get_memory_allocator
()
{
return
m_memory_manager
.
build_allocator
();
}
void
allocate_primitive_memory
()
{
m_memory_manager
.
allocate
();
}
void
allocate_primitive_memory
()
{
m_memory_manager
.
allocate
();
}
...
...
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