Commit 35067b2b authored by nmostafa's avatar nmostafa

Couple of KW fixes

parent c401fe7b
...@@ -266,7 +266,6 @@ void MLIRCompiler::build_ng_dialect() ...@@ -266,7 +266,6 @@ void MLIRCompiler::build_ng_dialect()
create_return(); create_return();
} }
namespace ngraph namespace ngraph
{ {
namespace runtime namespace runtime
...@@ -347,6 +346,7 @@ void MLIRCompiler::bind_arguments() ...@@ -347,6 +346,7 @@ void MLIRCompiler::bind_arguments()
// malloc here since that's what allocateMemRefArguments use // malloc here since that's what allocateMemRefArguments use
// TODO (nmostafa): Better way of doing this ? Use builder allocator ? // TODO (nmostafa): Better way of doing this ? Use builder allocator ?
MLIRMemMgr** mem_mgr_arg = reinterpret_cast<MLIRMemMgr**>(malloc(sizeof(void*))); MLIRMemMgr** mem_mgr_arg = reinterpret_cast<MLIRMemMgr**>(malloc(sizeof(void*)));
NGRAPH_CHECK(mem_mgr_arg != nullptr);
*mem_mgr_arg = &get_mem_mgr(); *mem_mgr_arg = &get_mem_mgr();
// inserting memory manager ptr in right location ? // inserting memory manager ptr in right location ?
NGRAPH_CHECK(m_invoke_args.size() == get_mem_mgr_arg_id(func)); NGRAPH_CHECK(m_invoke_args.size() == get_mem_mgr_arg_id(func));
...@@ -434,6 +434,7 @@ mlir::StaticFloatMemRef* MLIRCompiler::allocate_memref_descriptor(mlir::Type typ ...@@ -434,6 +434,7 @@ mlir::StaticFloatMemRef* MLIRCompiler::allocate_memref_descriptor(mlir::Type typ
// We should expand this with different types and dynamic MemRefs // We should expand this with different types and dynamic MemRefs
auto* descriptor = auto* descriptor =
reinterpret_cast<mlir::StaticFloatMemRef*>(malloc(sizeof(mlir::StaticFloatMemRef))); reinterpret_cast<mlir::StaticFloatMemRef*>(malloc(sizeof(mlir::StaticFloatMemRef)));
NGRAPH_CHECK(descriptor != nullptr, "NULL MemRef descriptor");
descriptor->data = nullptr; descriptor->data = nullptr;
return descriptor; return descriptor;
} }
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <vector>
namespace ngraph namespace ngraph
{ {
namespace runtime namespace runtime
......
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