| 101 | engine::core::ModuleBuildContext ctx{}; |
| 102 | |
| 103 | CpuModuleRunner() { |
| 104 | backend = engine::core::init_backend(backend_config); |
| 105 | ggml_init_params params{}; |
| 106 | params.mem_size = kTestGraphBytes; |
| 107 | params.mem_buffer = nullptr; |
| 108 | params.no_alloc = true; |
| 109 | ggml = ggml_init(params); |
| 110 | if (ggml == nullptr) { |
| 111 | throw std::runtime_error("failed to init test ggml context"); |
| 112 | } |
| 113 | ctx.ggml = ggml; |
| 114 | ctx.module_instance_name = "encoder_module_test"; |
| 115 | } |
| 116 | |
| 117 | ~CpuModuleRunner() { |
| 118 | if (buffer != nullptr) { |
nothing calls this directly
no test coverage detected