@@ -215,6 +215,7 @@ bool CLRuntime::CheckFromPrecompiledBinary(const std::string& program_key,
215
215
" and you have Write&Read permission. Jump to build program "
216
216
" from source." ;
217
217
} else {
218
+ LOG (INFO) << " Load opencl kernel bin file: " << bin_file;
218
219
ret = Deserialize (bin_file, &programs_precompiled_binary_);
219
220
CHECK (ret) << " Deserialize failed." ;
220
221
@@ -236,9 +237,9 @@ bool CLRuntime::CheckFromPrecompiledBinary(const std::string& program_key,
236
237
} else if (host::memcmp (((sn_iter->second )[0 ]).data (),
237
238
GetSN (build_option).data (),
238
239
GetSN (build_option).length ())) {
239
- LOG (INFO) << " size of sn_info: " << ((sn_iter->second )[0 ]).size ();
240
- LOG (INFO) << " size of GetSN: " << GetSN (build_option).length ();
241
- LOG (INFO) << " GetSN : " << GetSN (build_option);
240
+ LOG (INFO) << " size of sn_info: " << ((sn_iter->second )[0 ]).size ()
241
+ << " \n size of GetSN: " << GetSN (build_option).length ()
242
+ << " \n GetSN : " << GetSN (build_option);
242
243
LOG (WARNING) << " The precompiled OpenCL binary[" << bin_file
243
244
<< " ] is invalid!" ;
244
245
delete_bin_flag = true ;
@@ -264,19 +265,17 @@ bool CLRuntime::CheckFromPrecompiledBinary(const std::string& program_key,
264
265
std::unique_ptr<cl::Program> ptr (new cl::Program (program));
265
266
programs_[prog_key] = std::move (ptr);
266
267
}
267
- }
268
268
269
- auto it = programs_.find (program_key);
270
- if (it != programs_.end ()) {
271
- #ifdef LITE_WITH_LOG
272
- VLOG (3 ) << " --- program -> " << program_key
273
- << " has been built in binary --- " ;
274
- #endif
275
- gotten_bin_flag_ = true ;
276
- ret = true ;
277
- } else {
278
- delete_bin_flag = true ;
279
- // Jump to build from source
269
+ auto it = programs_.find (program_key);
270
+ if (it != programs_.end ()) {
271
+ VLOG (3 ) << " --- program -> " << program_key
272
+ << " has been built in binary --- " ;
273
+ gotten_bin_flag_ = true ;
274
+ ret = true ;
275
+ } else {
276
+ delete_bin_flag = true ;
277
+ // Jump to build from source
278
+ }
280
279
}
281
280
}
282
281
0 commit comments