Skip to content

Commit a9d0007

Browse files
committed
src: gpu: intel: jit: pooling: avoid looping when init fails
1 parent f9468c1 commit a9d0007

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gpu/intel/jit/pooling/gen_pooling.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ status_t gen_pooling_fwd_t::init(engine_t *engine) {
153153
try {
154154
kernel_ = make_kernel<pooling_kernel_t>(this, engine, cfg_,
155155
"gen_pooling_fwd", kernel_info_, grf_mode_t::any, *pd());
156+
break;
156157
} catch (const ngen::out_of_registers_exception &exc) {
157158
UNUSED(exc);
158159
ir_warning() << "loop too large: cut and retry!" << std::endl;
@@ -161,6 +162,10 @@ status_t gen_pooling_fwd_t::init(engine_t *engine) {
161162
ir_error_not_expected() << "minimal loop too large!";
162163
break;
163164
}
165+
} catch (const std::exception &exc) {
166+
ir_error_not_expected() << exc.what();
167+
kernel_ = {};
168+
break;
164169
}
165170
}
166171
set_version(cfg_.n_cuts());

0 commit comments

Comments
 (0)