Commit 285a24ae authored by nmostafa's avatar nmostafa

PR fixes

parent 180329bf
...@@ -750,8 +750,8 @@ void MLIRCompiler::bindArguments(std::vector<void*>& externalTensors) ...@@ -750,8 +750,8 @@ void MLIRCompiler::bindArguments(std::vector<void*>& externalTensors)
// Assign external tensor pointers to invocation arguments. // Assign external tensor pointers to invocation arguments.
for (size_t i = 0, numArgs = m_invokeArgs.size(); i < numArgs; ++i) for (size_t i = 0, numArgs = m_invokeArgs.size(); i < numArgs; ++i)
{ {
auto* memRefArg = *((mlir::StaticFloatMemRef**)m_invokeArgs[i]); auto* memRefArg = *(reinterpret_cast<mlir::StaticFloatMemRef**>(m_invokeArgs[i]));
memRefArg->data = (float*)(*m_externalTensors)[i]; memRefArg->data = reinterpret_cast<float*>((*m_externalTensors)[i]);
} }
} }
...@@ -777,7 +777,7 @@ void MLIRCompiler::cleanup() ...@@ -777,7 +777,7 @@ void MLIRCompiler::cleanup()
// Free void double pointer arguments without freeing external tensor data. // Free void double pointer arguments without freeing external tensor data.
for (auto* arg : m_invokeArgs) for (auto* arg : m_invokeArgs)
{ {
auto* memRefArg = *((mlir::StaticFloatMemRef**)arg); auto* memRefArg = *(reinterpret_cast<mlir::StaticFloatMemRef**>(arg));
free(memRefArg); free(memRefArg);
free(arg); free(arg);
} }
......
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