Commit 75bf66e4 authored by Robert Kimball's avatar Robert Kimball

address review issues

parent 0014de5f
...@@ -65,12 +65,6 @@ static HeaderCache s_header_cache; ...@@ -65,12 +65,6 @@ static HeaderCache s_header_cache;
static StaticCompiler s_static_compiler; static StaticCompiler s_static_compiler;
static std::mutex m_mutex; static std::mutex m_mutex;
shared_ptr<SectionMemoryManager> get_mm()
{
NGRAPH_INFO;
return std::make_shared<SectionMemoryManager>();
}
Compiler::Compiler() Compiler::Compiler()
{ {
} }
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <iostream>
#include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/ExecutionEngine/SectionMemoryManager.h> #include <llvm/ExecutionEngine/SectionMemoryManager.h>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include <cstdlib>
#include <fstream> #include <fstream>
#include <memory> #include <memory>
#include <string> #include <string>
...@@ -170,7 +171,7 @@ runtime::cpu::CPU_ExternalFunction::CPU_ExternalFunction( ...@@ -170,7 +171,7 @@ runtime::cpu::CPU_ExternalFunction::CPU_ExternalFunction(
const shared_ptr<ngraph::Function>& function, bool release_function) const shared_ptr<ngraph::Function>& function, bool release_function)
: ngraph::runtime::ExternalFunction(function, release_function) : ngraph::runtime::ExternalFunction(function, release_function)
, m_compiled_function(nullptr) , m_compiled_function(nullptr)
, m_emit_debug(true) , m_emit_timing(std::getenv("NGRAPH_CPU_EMIT_TIMING") != nullptr)
{ {
} }
...@@ -227,7 +228,7 @@ using namespace ngraph::runtime; ...@@ -227,7 +228,7 @@ using namespace ngraph::runtime;
writer << "void *__dso_handle = 0;\n\n"; writer << "void *__dso_handle = 0;\n\n";
if (m_emit_debug) if (m_emit_timing)
{ {
writer << "// Declare debug timers\n"; writer << "// Declare debug timers\n";
vector<string> names; vector<string> names;
...@@ -410,12 +411,12 @@ using namespace ngraph::runtime; ...@@ -410,12 +411,12 @@ using namespace ngraph::runtime;
auto tv = output.get_tensor_view(); auto tv = output.get_tensor_view();
out.push_back(TensorViewWrapper(tv)); out.push_back(TensorViewWrapper(tv));
} }
if (m_emit_debug) if (m_emit_timing)
{ {
emit_debug_function_entry(writer, node.get(), in, out); emit_debug_function_entry(writer, node.get(), in, out);
} }
handler->second(&emitter, node.get(), in, out); handler->second(&emitter, node.get(), in, out);
if (m_emit_debug) if (m_emit_timing)
{ {
emit_debug_function_exit(writer, node.get(), in, out); emit_debug_function_exit(writer, node.get(), in, out);
} }
......
...@@ -72,7 +72,7 @@ namespace ngraph ...@@ -72,7 +72,7 @@ namespace ngraph
std::unique_ptr<codegen::Compiler> m_compiler; std::unique_ptr<codegen::Compiler> m_compiler;
std::unique_ptr<codegen::ExecutionEngine> m_execution_engine; std::unique_ptr<codegen::ExecutionEngine> m_execution_engine;
bool m_emit_debug; bool m_emit_timing;
}; };
} }
} }
......
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