Commit b474dbef authored by pruthvi's avatar pruthvi

- Use AlignedBuffer instead of CPUAlignedBuffer

parent a07588df
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <algorithm> #include <algorithm>
#include "ngraph/runtime/aligned_buffer.hpp" #include "ngraph/runtime/aligned_buffer.hpp"
#include "ngraph/runtime/cpu/cpu_aligned_buffer.hpp"
#include "ngraph/runtime/cpu/cpu_call_frame.hpp" #include "ngraph/runtime/cpu/cpu_call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_external_function.hpp" #include "ngraph/runtime/cpu/cpu_external_function.hpp"
#include "ngraph/runtime/cpu/cpu_tensor_view.hpp" #include "ngraph/runtime/cpu/cpu_tensor_view.hpp"
...@@ -146,6 +145,7 @@ void runtime::cpu::CPU_CallFrame::setup_runtime_context() ...@@ -146,6 +145,7 @@ void runtime::cpu::CPU_CallFrame::setup_runtime_context()
size_t alignment = runtime::cpu::CPU_ExternalFunction::s_memory_pool_alignment; size_t alignment = runtime::cpu::CPU_ExternalFunction::s_memory_pool_alignment;
ngraph::runtime::cpu::CPUAllocator* allocator = nullptr; ngraph::runtime::cpu::CPUAllocator* allocator = nullptr;
ngraph::runtime::Allocator* _allocator = nullptr;
if (m_framework_allocator && m_framework_deallocator) if (m_framework_allocator && m_framework_deallocator)
{ {
auto fw_allocator = auto fw_allocator =
...@@ -160,7 +160,7 @@ void runtime::cpu::CPU_CallFrame::setup_runtime_context() ...@@ -160,7 +160,7 @@ void runtime::cpu::CPU_CallFrame::setup_runtime_context()
for (auto buffer_size : m_external_function->get_memory_buffer_sizes()) for (auto buffer_size : m_external_function->get_memory_buffer_sizes())
{ {
auto buffer = new CPUAlignedBuffer(buffer_size, alignment, allocator); auto buffer = new AlignedBuffer(buffer_size, alignment, _allocator);
ctx->memory_buffers.push_back(buffer); ctx->memory_buffers.push_back(buffer);
} }
const auto& mkldnn_emitter = m_external_function->get_mkldnn_emitter(); const auto& mkldnn_emitter = m_external_function->get_mkldnn_emitter();
......
...@@ -39,10 +39,7 @@ namespace ngraph ...@@ -39,10 +39,7 @@ namespace ngraph
{ {
namespace runtime namespace runtime
{ {
namespace cpu class AlignedBuffer;
{
class CPUAlignedBuffer;
}
} }
class State; class State;
} }
...@@ -64,7 +61,7 @@ namespace ngraph ...@@ -64,7 +61,7 @@ namespace ngraph
bool* p_en; bool* p_en;
bool first_iteration; bool first_iteration;
mkldnn::primitive* const* mkldnn_primitives; mkldnn::primitive* const* mkldnn_primitives;
std::vector<CPUAlignedBuffer*> memory_buffers; std::vector<AlignedBuffer*> memory_buffers;
char* const* mkldnn_workspaces; char* const* mkldnn_workspaces;
tbb::flow::graph* G; tbb::flow::graph* G;
tbb::global_control* c; tbb::global_control* c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment