MCPcopy Create free account
hub / github.com/MegEngine/MegCC / Runner

Method Runner

compiler/test/kernel/common/runner.h:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23public:
24 using Param = typename Opr::Param;
25 Runner(KernelGen::Arch arch = KernelGen::Arch::BAREMETAL, const int dnn_level = 2)
26 : m_arch(arch) {
27 megcore_check(megcoreCreateDeviceHandle(&m_device_handle, megcorePlatformCPU));
28 megcore_check(megcoreCreateComputingHandle(&m_compute_handle, m_device_handle));
29 m_dnn_handle = std::move(megdnn::Handle::make(m_compute_handle, dnn_level));
30 m_default_rng = std::move(std::make_unique<NormalRNG>());
31 }
32
33 ~Runner() {
34 megcore_check(megcoreDestroyComputingHandle(m_compute_handle));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected