Browse Source

docs(cpu/comp_node): note cpu_default()

GitOrigin-RevId: 3e3dbced65
release-1.1
Megvii Engine Team 4 years ago
parent
commit
005ead5aea
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/core/impl/comp_node/cpu/comp_node.cpp

+ 6
- 1
src/core/impl/comp_node/cpu/comp_node.cpp View File

@@ -885,7 +885,12 @@ bool CpuCompNode::CompNodeImpl::check_global_finalized(const char* reason) {
}

/* ======================== CompNode methods ======================== */

// CompNode get by default_cpu() is different from the CompNode which is
// produced by CompNode::load("cpu:default")
// default_cpu() is used for static infer and it is not allowed to send up the
// compute kernel
// CompNode::load("cpu:default") is "inplace cpu" which is in the
// CpuCompNode::Pool
CompNode CompNode::default_cpu() {
static Locator locator{DeviceType::CPU, Locator::DEVICE_CPU_DEFAULT, {-1}};
static auto empty_queue =


Loading…
Cancel
Save