| 23 | public: |
| 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)); |
nothing calls this directly
no outgoing calls
no test coverage detected