Skip to content

Commit f0ff7cd

Browse files
committed
ensure thrinfo is valid at the end of bli_l3_sup_thread_decorator_entry
1 parent b5d5783 commit f0ff7cd

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

frame/3/bli_l3_sup_decor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void bli_l3_sup_thread_decorator_entry( thrcomm_t* gl_comm, dim_t tid, co
8282
c,
8383
cntx,
8484
rntm,
85-
thread
85+
&thread
8686
);
8787

8888
// Free the current thread's thrinfo_t structure.

frame/3/bli_l3_sup_decor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ typedef err_t (*l3supint_ft)
4848
const obj_t* c,
4949
const cntx_t* cntx,
5050
const rntm_t* rntm,
51-
thrinfo_t* thread
51+
thrinfo_t** thread
5252
);
5353

5454
// Level-3 sup thread decorator prototype.

frame/3/bli_l3_sup_int.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ err_t bli_gemmsup_int
4343
const obj_t* c,
4444
const cntx_t* cntx,
4545
const rntm_t* rntm,
46-
thrinfo_t* thread
46+
thrinfo_t** thread
4747
)
4848
{
4949
#if 0
@@ -139,31 +139,31 @@ err_t bli_gemmsup_int
139139
// new ways of parallelism value for the jc loop.
140140
rntm_t rntm_l = *rntm;
141141
bli_rntm_set_ways_only( jc_new, 1, ic_new, 1, 1, &rntm_l );
142-
bli_l3_sup_thrinfo_update( &rntm_l, &thread );
142+
bli_l3_sup_thrinfo_update( &rntm_l, thread );
143143
}
144144

145145

146146
if ( use_bp )
147147
{
148148
#ifdef TRACEVAR
149-
if ( bli_thrinfo_am_chief( thread ) )
149+
if ( bli_thrinfo_am_chief( *thread ) )
150150
printf( "bli_l3_sup_int(): var2m primary\n" );
151151
#endif
152152
// block-panel macrokernel; m -> mc, mr; n -> nc, nr: var2()
153153
bli_gemmsup_ref_var2m( BLIS_NO_TRANSPOSE,
154154
alpha, a, b, beta, c,
155-
stor_id, cntx, rntm, thread );
155+
stor_id, cntx, rntm, *thread );
156156
}
157157
else // use_pb
158158
{
159159
#ifdef TRACEVAR
160-
if ( bli_thrinfo_am_chief( thread ) )
160+
if ( bli_thrinfo_am_chief( *thread ) )
161161
printf( "bli_l3_sup_int(): var1n primary\n" );
162162
#endif
163163
// panel-block macrokernel; m -> nc*,mr; n -> mc*,nr: var1()
164164
bli_gemmsup_ref_var1n( BLIS_NO_TRANSPOSE,
165165
alpha, a, b, beta, c,
166-
stor_id, cntx, rntm, thread );
166+
stor_id, cntx, rntm, *thread );
167167
// *requires nudging of nc up to be a multiple of mr.
168168
}
169169
}
@@ -205,31 +205,31 @@ err_t bli_gemmsup_int
205205
// new ways of parallelism value for the jc loop.
206206
rntm_t rntm_l = *rntm;
207207
bli_rntm_set_ways_only( jc_new, 1, ic_new, 1, 1, &rntm_l );
208-
bli_l3_sup_thrinfo_update( &rntm_l, &thread );
208+
bli_l3_sup_thrinfo_update( &rntm_l, thread );
209209
}
210210

211211

212212
if ( use_bp )
213213
{
214214
#ifdef TRACEVAR
215-
if ( bli_thrinfo_am_chief( thread ) )
215+
if ( bli_thrinfo_am_chief( *thread ) )
216216
printf( "bli_l3_sup_int(): var2m non-primary\n" );
217217
#endif
218218
// panel-block macrokernel; m -> nc, nr; n -> mc, mr: var2() + trans
219219
bli_gemmsup_ref_var2m( BLIS_TRANSPOSE,
220220
alpha, a, b, beta, c,
221-
stor_id, cntx, rntm, thread );
221+
stor_id, cntx, rntm, *thread );
222222
}
223223
else // use_pb
224224
{
225225
#ifdef TRACEVAR
226-
if ( bli_thrinfo_am_chief( thread ) )
226+
if ( bli_thrinfo_am_chief( *thread ) )
227227
printf( "bli_l3_sup_int(): var1n non-primary\n" );
228228
#endif
229229
// block-panel macrokernel; m -> mc*,nr; n -> nc*,mr: var1() + trans
230230
bli_gemmsup_ref_var1n( BLIS_TRANSPOSE,
231231
alpha, a, b, beta, c,
232-
stor_id, cntx, rntm, thread );
232+
stor_id, cntx, rntm, *thread );
233233
// *requires nudging of mc up to be a multiple of nr.
234234
}
235235
}
@@ -249,7 +249,7 @@ err_t bli_gemmtsup_int
249249
const obj_t* c,
250250
const cntx_t* cntx,
251251
const rntm_t* rntm,
252-
thrinfo_t* thread
252+
thrinfo_t** thread
253253
)
254254
{
255255
const stor3_t stor_id = bli_obj_stor3_from_strides( c, a, b );
@@ -315,14 +315,14 @@ err_t bli_gemmtsup_int
315315
// new ways of parallelism value for the jc loop.
316316
rntm_t rntm_l = *rntm;
317317
bli_rntm_set_ways_only( jc_new, 1, ic_new, 1, 1, &rntm_l );
318-
bli_l3_sup_thrinfo_update( &rntm_l, &thread );
318+
bli_l3_sup_thrinfo_update( &rntm_l, thread );
319319
}
320320

321321

322322
if ( use_bp )
323323
{
324324
#ifdef TRACEVAR
325-
if ( bli_thrinfo_am_chief( thread ) )
325+
if ( bli_thrinfo_am_chief( *thread ) )
326326
printf( "bli_l3_sup_int(): var2m primary\n" );
327327
#endif
328328
// block-panel macrokernel; m -> mc, mr; n -> nc, nr: var2()
@@ -335,7 +335,7 @@ err_t bli_gemmtsup_int
335335
else // use_pb
336336
{
337337
#ifdef TRACEVAR
338-
if ( bli_thrinfo_am_chief( thread ) )
338+
if ( bli_thrinfo_am_chief( *thread ) )
339339
printf( "bli_l3_sup_int(): var1n primary\n" );
340340
#endif
341341
// panel-block macrokernel; m -> nc*,mr; n -> mc*,nr: var1()
@@ -385,14 +385,14 @@ err_t bli_gemmtsup_int
385385
// new ways of parallelism value for the jc loop.
386386
rntm_t rntm_l = *rntm;
387387
bli_rntm_set_ways_only( jc_new, 1, ic_new, 1, 1, &rntm_l );
388-
bli_l3_sup_thrinfo_update( &rntm_l, &thread );
388+
bli_l3_sup_thrinfo_update( &rntm_l, thread );
389389
}
390390

391391

392392
if ( use_bp )
393393
{
394394
#ifdef TRACEVAR
395-
if ( bli_thrinfo_am_chief( thread ) )
395+
if ( bli_thrinfo_am_chief( *thread ) )
396396
printf( "bli_l3_sup_int(): var2m non-primary\n" );
397397
#endif
398398
// panel-block macrokernel; m -> nc, nr; n -> mc, mr: var2() + trans
@@ -405,7 +405,7 @@ err_t bli_gemmtsup_int
405405
else // use_pb
406406
{
407407
#ifdef TRACEVAR
408-
if ( bli_thrinfo_am_chief( thread ) )
408+
if ( bli_thrinfo_am_chief( *thread ) )
409409
printf( "bli_l3_sup_int(): var1n non-primary\n" );
410410
#endif
411411
// block-panel macrokernel; m -> mc*,nr; n -> nc*,mr: var1() + trans

frame/3/bli_l3_sup_int.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ err_t bli_gemmsup_int
4141
const obj_t* c,
4242
const cntx_t* cntx,
4343
const rntm_t* rntm,
44-
thrinfo_t* thread
44+
thrinfo_t** thread
4545
);
4646

4747
err_t bli_gemmtsup_int
@@ -53,5 +53,5 @@ err_t bli_gemmtsup_int
5353
const obj_t* c,
5454
const cntx_t* cntx,
5555
const rntm_t* rntm,
56-
thrinfo_t* thread
56+
thrinfo_t** thread
5757
);

0 commit comments

Comments
 (0)