Commit 1abe0857 authored by nmostafa's avatar nmostafa

code-style in compiler.cpp

parent cbdb405e
...@@ -387,7 +387,9 @@ void MLIRCompiler::cleanup() ...@@ -387,7 +387,9 @@ void MLIRCompiler::cleanup()
// Free MLIR function builder. // Free MLIR function builder.
if (m_builder) if (m_builder)
{
m_builder.reset(nullptr); m_builder.reset(nullptr);
}
// Free allocated memory for JIT'ed code temps // Free allocated memory for JIT'ed code temps
m_mem_mgr.freeAll(); m_mem_mgr.freeAll();
...@@ -402,7 +404,9 @@ SmallVector<void*, 8> MLIRCompiler::allocate_memref_args(mlir::Function* func) ...@@ -402,7 +404,9 @@ SmallVector<void*, 8> MLIRCompiler::allocate_memref_args(mlir::Function* func)
auto descriptor = allocate_memref_descriptor(arg->getType()); auto descriptor = allocate_memref_descriptor(arg->getType());
if (!descriptor) if (!descriptor)
{
continue; continue;
}
args.push_back(descriptor); args.push_back(descriptor);
} }
return args; return args;
...@@ -412,7 +416,9 @@ mlir::StaticFloatMemRef* MLIRCompiler::allocate_memref_descriptor(mlir::Type typ ...@@ -412,7 +416,9 @@ mlir::StaticFloatMemRef* MLIRCompiler::allocate_memref_descriptor(mlir::Type typ
{ {
auto memRefType = type.dyn_cast<mlir::MemRefType>(); auto memRefType = type.dyn_cast<mlir::MemRefType>();
if (!memRefType) if (!memRefType)
{
return nullptr; return nullptr;
}
NGRAPH_ASSERT(memRefType.getNumDynamicDims() == 0) << "No support for dynamic shapes"; NGRAPH_ASSERT(memRefType.getNumDynamicDims() == 0) << "No support for dynamic shapes";
// We only use StaticFloatMemRef because that's what MLIR currently offers. // We only use StaticFloatMemRef because that's what MLIR currently offers.
......
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