MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / save_to_file

Method save_to_file

src/runtime/CL/CLTuner.cpp:350–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350bool CLTuner::save_to_file(const std::string &filename) const
351{
352 if (!_tune_new_kernels || _tuning_params_table.empty() || filename.empty())
353 {
354 return false;
355 }
356 std::ofstream fs;
357 fs.exceptions(std::ifstream::failbit | std::ifstream::badbit);
358 fs.open(filename, std::ios::out);
359 std::string header_string = "";
360 header_string += "lws";
361 if (_tuning_info.tune_wbsm)
362 {
363 if (!header_string.empty())
364 {
365 header_string += " ";
366 }
367 header_string += "wbsm";
368 }
369 fs << header_string << std::endl;
370 for (auto const &kernel_data : _tuning_params_table)
371 {
372 CLTuningParams tun_pams(kernel_data.second);
373 fs << kernel_data.first << tun_pams.to_string(_tuning_info) << std::endl;
374 }
375 fs.close();
376 return true;
377}
378} // namespace arm_compute

Callers 2

~CLDeviceBackendMethod · 0.80
mainFunction · 0.80

Calls 4

emptyMethod · 0.45
openMethod · 0.45
to_stringMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected