From ab6988341892c83831eca22b8b291835f559f8cc Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Thu, 24 Sep 2020 13:07:29 +0800 Subject: [PATCH] fix(mgb/core): use thread local for OpenCL recorder GitOrigin-RevId: 76da0c2a24ca944a327cf1b2010aa91ffa512cb4 --- src/core/impl/comp_node/cpu/comp_node.cpp | 2 -- src/core/include/megbrain/comp_node.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/impl/comp_node/cpu/comp_node.cpp b/src/core/impl/comp_node/cpu/comp_node.cpp index c63d102d..fe2ff456 100644 --- a/src/core/impl/comp_node/cpu/comp_node.cpp +++ b/src/core/impl/comp_node/cpu/comp_node.cpp @@ -106,13 +106,11 @@ class CpuCompNode::SeqRecorderImpl final : public CompNodeSeqRecorder { std::vector m_tasks; ThreadPool* m_thread_pool = nullptr; const CompNode m_record_compnode; - /*! * \brief use to check the all ther recording tasks are its self CompNode * related task, void hook other CompNode related task to the recorder. */ void check_the_same_comp_node(const CompNode& comp_node) const; - public: SeqRecorderImpl(SeqRecorderImpl** self_pointer, ThreadPool* thread_pool, const CompNode& comp_node) diff --git a/src/core/include/megbrain/comp_node.h b/src/core/include/megbrain/comp_node.h index 434bd12e..e2920f07 100644 --- a/src/core/include/megbrain/comp_node.h +++ b/src/core/include/megbrain/comp_node.h @@ -577,6 +577,7 @@ public: virtual void exit_fake_exec(const CompNode& comp_node) = 0; virtual void stop(const CompNode& comp_node) = 0; + virtual void replay() = 0; };