@@ -199,6 +199,9 @@ odla_status _odla_computation::init(bool is_compile) {
199
199
std::lock_guard<std::mutex> guard (init_mutex_);
200
200
if (!session) {
201
201
POPLAR_TRY
202
+ // only continue to init the computation when no failure
203
+ if (ODLA_SUCCESS != QManager::instance ()->get_status ())
204
+ return QManager::instance ()->get_status ();
202
205
odla_status status = set_opts ();
203
206
if (status != ODLA_SUCCESS) {
204
207
popart::logging::err (" set computation option failed" );
@@ -213,7 +216,7 @@ odla_status _odla_computation::init(bool is_compile) {
213
216
popart::AnchorReturnType (" All" ));
214
217
// Acquire IPU
215
218
if (opts.use_ipu_model ) {
216
- popart::logging::info (" Using IPU Model to run." );
219
+ popart::logging::warn (" Using IPU Model to run." );
217
220
std::map<std::string, std::string> deviceOpts{
218
221
{" numIPUs" , std::to_string (opts.ipu_num )}, {" tilesPerIPU" , " 1216" }};
219
222
device =
@@ -230,6 +233,7 @@ odla_status _odla_computation::init(bool is_compile) {
230
233
throw std::runtime_error (
231
234
" Failed to get a device when initializing odla_computation" );
232
235
}
236
+ popart::logging::warn (" Device acquired to run model" );
233
237
234
238
// Create and config SessionOptions
235
239
set_session_opts ();
@@ -255,6 +259,9 @@ odla_status _odla_computation::init(bool is_compile) {
255
259
// Create InferenceSession
256
260
new_session = std::move (popart::InferenceSession::createFromOnnxModel (
257
261
proto, data_flow, device, popart::InputShapeInfo (), session_opts_));
262
+ popart::logging::warn (
263
+ " New session: {} has been created for computation: {}" ,
264
+ new_session.get (), this );
258
265
259
266
if (!is_compile) {
260
267
if (PopartConfig::instance ()->load_or_save_cache ()) {
@@ -404,7 +411,7 @@ bool _odla_computation::hold() {
404
411
} else {
405
412
std::stringstream ss_holder;
406
413
ss_holder << thread_id_of_holder;
407
- popart::logging::warn (
414
+ popart::logging::info (
408
415
" The odla_computation {} has been held by thread: {}"
409
416
" , when thread {} try to hold it." ,
410
417
this , thread_id_of_holder, this_thread_id);
0 commit comments