Browse Source

fix(mgb/core): use thread local for OpenCL recorder

GitOrigin-RevId: 76da0c2a24
release-1.1
Megvii Engine Team 4 years ago
parent
commit
ab69883418
2 changed files with 1 additions and 2 deletions
  1. +0
    -2
      src/core/impl/comp_node/cpu/comp_node.cpp
  2. +1
    -0
      src/core/include/megbrain/comp_node.h

+ 0
- 2
src/core/impl/comp_node/cpu/comp_node.cpp View File

@@ -106,13 +106,11 @@ class CpuCompNode::SeqRecorderImpl final : public CompNodeSeqRecorder {
std::vector<TaskElem> 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)


+ 1
- 0
src/core/include/megbrain/comp_node.h View File

@@ -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;
};



Loading…
Cancel
Save