Updated sandbox/ref99 according to f97a86f.

Details:
- Applied changes to ref99 sandbox analagous to those applied to
  framework code in f97a86f. This involves setting the pack schemas of
  A and B objects temporarily to communicate those desired schemas to
  the control tree creation function in blx_gemm_cntl.c. This allows us
  to (henceforth) query the schemas from the control tree rather than
  the context.
This commit is contained in:
Field G. Van Zee
2018-06-14 17:35:23 -05:00
parent 1b5d0424d2
commit 22594e8e9a
4 changed files with 52 additions and 8 deletions

View File

@@ -96,6 +96,27 @@ void blx_gemm_front
bli_obj_induce_trans( &c_local );
}
{
// A sort of hack for communicating the desired pach schemas for A and
// B to bli_gemm_cntl_create() (via bli_l3_thread_decorator() and
// bli_l3_cntl_create_if()). This allows us to access the schemas from
// the control tree, which hopefully reduces some confusion,
// particularly in bli_packm_init().
if ( bli_cntx_method( cntx ) == BLIS_NAT )
{
bli_obj_set_pack_schema( BLIS_PACKED_ROW_PANELS, &a_local );
bli_obj_set_pack_schema( BLIS_PACKED_COL_PANELS, &b_local );
}
else // if ( bli_cntx_method( cntx ) != BLIS_NAT )
{
pack_t schema_a = bli_cntx_schema_a_block( cntx );
pack_t schema_b = bli_cntx_schema_b_panel( cntx );
bli_obj_set_pack_schema( schema_a, &a_local );
bli_obj_set_pack_schema( schema_b, &b_local );
}
}
// Record the threading for each level within the context.
bli_cntx_set_thrloop_from_env
(

View File

@@ -37,17 +37,21 @@
cntl_t* blx_gemm_cntl_create
(
opid_t family
opid_t family,
pack_t schema_a,
pack_t schema_b
)
{
return blx_gemmbp_cntl_create( family );
return blx_gemmbp_cntl_create( family, schema_a, schema_b );
}
// -----------------------------------------------------------------------------
cntl_t* blx_gemmbp_cntl_create
(
opid_t family
opid_t family,
pack_t schema_a,
pack_t schema_b
)
{
void* macro_kernel_p = blx_gemm_ker_var2;
@@ -79,7 +83,7 @@ cntl_t* blx_gemmbp_cntl_create
FALSE, // do NOT invert diagonal
FALSE, // reverse iteration if upper?
FALSE, // reverse iteration if lower?
BLIS_PACKED_ROW_PANELS,
schema_a, // normally BLIS_PACKED_ROW_PANELS
BLIS_BUFFER_FOR_A_BLOCK,
gemm_cntl_bp_bu
);
@@ -103,7 +107,7 @@ cntl_t* blx_gemmbp_cntl_create
FALSE, // do NOT invert diagonal
FALSE, // reverse iteration if upper?
FALSE, // reverse iteration if lower?
BLIS_PACKED_COL_PANELS,
schema_b, // normally BLIS_PACKED_COL_PANELS
BLIS_BUFFER_FOR_B_PANEL,
gemm_cntl_op_bp
);

View File

@@ -34,14 +34,18 @@
cntl_t* blx_gemm_cntl_create
(
opid_t family
opid_t family,
pack_t schema_a,
pack_t schema_b
);
// -----------------------------------------------------------------------------
cntl_t* blx_gemmbp_cntl_create
(
opid_t family
opid_t family,
pack_t schema_a,
pack_t schema_b
);
// -----------------------------------------------------------------------------

View File

@@ -46,11 +46,26 @@ void blx_l3_cntl_create_if
cntl_t** cntl_use
)
{
// This is part of a hack to support mixed domain in bli_gemm_front().
// Sometimes we need to specify a non-standard schema for A and B, and
// we decided to transmit them via the schema field in the obj_t's
// rather than pass them in as function parameters. Once the values
// have been read, we immediately reset them back to their expected
// values for unpacked objects. Notice that we do this even if the
// caller passed in a custom control tree; that's because we still need
// to reset the pack schema of a and b, which were modified by the
// operation's _front() function.
pack_t schema_a = bli_obj_pack_schema( a );
pack_t schema_b = bli_obj_pack_schema( b );
bli_obj_set_pack_schema( BLIS_NOT_PACKED, a );
bli_obj_set_pack_schema( BLIS_NOT_PACKED, b );
// If the control tree pointer is NULL, we construct a default
// tree as a function of the operation family.
if ( cntl_orig == NULL )
{
*cntl_use = blx_gemm_cntl_create( family );
*cntl_use = blx_gemm_cntl_create( family, schema_a, schema_b );
}
else
{