MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / init_atlas

Method init_atlas

src/core/impl/comp_node_env.cpp:236–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235CompNodeEnv::AtlasEnv::InitStatus CompNodeEnv::AtlasEnv::init_status;
236void CompNodeEnv::init_atlas(CompNode comp_node, const AtlasEnv& env) {
237 m_comp_node = comp_node;
238 m_atlas_env = env;
239 m_property.type = DeviceType::ATLAS;
240 m_property.mem_alignment = 64;
241
242 m_atlas_env.activate();
243 MGB_ATLAS_CHECK(aclrtCreateStream(&m_atlas_env.stream));
244 m_user_data_container = std::make_unique<UserDataContainer>();
245 mgb_assert(
246 m_property.mem_alignment ==
247 MegDNNHandle::get(*this).handle()->alignment_requirement());
248}
249#endif
250
251#if MGB_ROCM

Callers 1

initMethod · 0.80

Calls 4

getFunction · 0.85
activateMethod · 0.45
alignment_requirementMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected