mirror of
https://github.com/amd/blis.git
synced 2026-04-20 15:48:50 +00:00
Merge commit 'cfa3db3f' into amd-main
* commit 'cfa3db3f':
Fixed bug in mixed-dt gemm introduced in e9da642.
Removed support for 3m, 4m induced methods.
Updated do_sde.sh to get SDE from GitHub.
Disable SDE testing of old AMD microarchitectures.
Fixed substitution bug in configure.
Allow use of 1m with mixing of row/col-pref ukrs.
AMD-Internal: [CPUPL-2698]
Change-Id: I961f0066243cf26aeb2e174e388b470133cc4a5f
This commit is contained in:
@@ -32,57 +32,60 @@
|
||||
|
||||
*/
|
||||
|
||||
// Given the current architecture of BLIS sandboxes, bli_gemmnat() is the
|
||||
// Given the current architecture of BLIS sandboxes, bli_gemm_ex() is the
|
||||
// entry point to any sandbox implementation.
|
||||
|
||||
// NOTE: This function is implemented identically to the function that it
|
||||
// overrides in frame/ind/oapi/bli_l3_nat_oapi.c. This means that we are
|
||||
// forgoing the option of customizing the implementations that underlie
|
||||
// bli_gemm() and bli_?gemm(). Any new code defined in this sandbox
|
||||
// directory, however, will be included in the BLIS.
|
||||
// NOTE: This function is implemented functionally identically to the
|
||||
// function that it overrides in frame/3/bli_l3_oapi_ex.c. This means that
|
||||
// we are forgoing the option of customizing the implementations that
|
||||
// underlie bli_gemm() and bli_?gemm() (which both call bli_gemm_ex()).
|
||||
// Any new code defined in this sandbox directory, however, will be
|
||||
// included in the BLIS.
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
#undef GENFRONT
|
||||
#define GENFRONT( opname, cname, imeth ) \
|
||||
\
|
||||
void PASTEMAC(opname,imeth) \
|
||||
( \
|
||||
obj_t* alpha, \
|
||||
obj_t* a, \
|
||||
obj_t* b, \
|
||||
obj_t* beta, \
|
||||
obj_t* c, \
|
||||
cntx_t* cntx, \
|
||||
rntm_t* rntm \
|
||||
) \
|
||||
{ \
|
||||
\
|
||||
/* A switch to easily toggle whether we use the sandbox implementation
|
||||
of bls_gemm() as the implementation for bli_gemm(). (This allows for
|
||||
easy testing of bls_gemm() via the testsuite.) */ \
|
||||
if ( 1 ) \
|
||||
{ \
|
||||
bls_gemm_ex( alpha, a, b, beta, c, cntx, rntm ); \
|
||||
return; \
|
||||
} \
|
||||
\
|
||||
bli_init_once(); \
|
||||
\
|
||||
/* Obtain a valid (native) context from the gks if necessary. */ \
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
|
||||
\
|
||||
/* Initialize a local runtime with global settings if necessary. Note
|
||||
that in the case that a runtime is passed in, we make a local copy. */ \
|
||||
rntm_t rntm_l; \
|
||||
if ( rntm == NULL ) { bli_rntm_init_from_global( &rntm_l ); rntm = &rntm_l; } \
|
||||
else { rntm_l = *rntm; rntm = &rntm_l; } \
|
||||
\
|
||||
/* Invoke the operation's front end. */ \
|
||||
PASTEMAC(opname,_front) \
|
||||
( \
|
||||
alpha, a, b, beta, c, cntx, rntm, NULL \
|
||||
); \
|
||||
void bli_gemm_ex
|
||||
(
|
||||
obj_t* alpha,
|
||||
obj_t* a,
|
||||
obj_t* b,
|
||||
obj_t* beta,
|
||||
obj_t* c,
|
||||
cntx_t* cntx,
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
bli_init_once();
|
||||
|
||||
// A switch to easily toggle whether we use the sandbox implementation
|
||||
// of bls_gemm() as the implementation for bli_gemm(). (This allows for
|
||||
// easy testing of bls_gemm() via the testsuite.) Changing the conditional
|
||||
// to "0" will cause bli_gemm()/bli_gemm_ex() to *not* call the local
|
||||
// sandbox implementation, though that implementation may still be called
|
||||
// directly.
|
||||
if ( 1 )
|
||||
{
|
||||
bls_gemm_ex( alpha, a, b, beta, c, cntx, rntm );
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize a local runtime with global settings if necessary. Note
|
||||
// that in the case that a runtime is passed in, we make a local copy.
|
||||
rntm_t rntm_l;
|
||||
if ( rntm == NULL ) { bli_rntm_init_from_global( &rntm_l ); rntm = &rntm_l; }
|
||||
else { rntm_l = *rntm; rntm = &rntm_l; }
|
||||
|
||||
// Obtain a valid (native) context from the gks if necessary.
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx();
|
||||
|
||||
// Check the operands.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemm_check( alpha, a, b, beta, c, cntx );
|
||||
|
||||
// Invoke the operation's front end.
|
||||
bli_gemm_front
|
||||
(
|
||||
alpha, a, b, beta, c, cntx, rntm, NULL
|
||||
);
|
||||
}
|
||||
|
||||
GENFRONT( gemm, gemm, nat )
|
||||
@@ -72,31 +72,27 @@ void bls_gemm_ex
|
||||
{
|
||||
bli_init_once();
|
||||
|
||||
// -- bli_gemmnat() --------------------------------------------------------
|
||||
|
||||
// Obtain a valid (native) context from the gks if necessary.
|
||||
// NOTE: This must be done before calling the _check() function, since
|
||||
// that function assumes the context pointer is valid.
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx();
|
||||
|
||||
// Initialize a local runtime with global settings if necessary. Note
|
||||
// that in the case that a runtime is passed in, we make a local copy.
|
||||
rntm_t rntm_l;
|
||||
if ( rntm == NULL ) { bli_rntm_init_from_global( &rntm_l ); rntm = &rntm_l; }
|
||||
else { rntm_l = *rntm; rntm = &rntm_l; }
|
||||
|
||||
// Obtain a valid (native) context from the gks if necessary.
|
||||
// NOTE: This must be done before calling the _check() function, since
|
||||
// that function assumes the context pointer is valid.
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx();
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bls_gemm_check( alpha, a, b, beta, c, cntx );
|
||||
|
||||
// -- bli_gemm_front() -----------------------------------------------------
|
||||
|
||||
obj_t a_local;
|
||||
obj_t b_local;
|
||||
obj_t c_local;
|
||||
|
||||
// Check parameters.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
{
|
||||
bls_gemm_check( alpha, a, b, beta, c, cntx );
|
||||
}
|
||||
|
||||
// If C has a zero dimension, return early.
|
||||
if ( bli_obj_has_zero_dim( c ) )
|
||||
{
|
||||
@@ -145,11 +141,6 @@ void bls_gemm_ex
|
||||
bli_obj_induce_trans( &a_local );
|
||||
bli_obj_induce_trans( &b_local );
|
||||
bli_obj_induce_trans( &c_local );
|
||||
|
||||
// NOTE: This is probably not needed within the sandbox.
|
||||
// We must also swap the pack schemas, which were set by bli_gemm_md()
|
||||
// or the inlined code above.
|
||||
//bli_obj_swap_pack_schemas( &a_local, &b_local );
|
||||
}
|
||||
|
||||
// Parse and interpret the contents of the rntm_t object to properly
|
||||
|
||||
@@ -32,47 +32,48 @@
|
||||
|
||||
*/
|
||||
|
||||
// Given the current architecture of BLIS sandboxes, bli_gemmnat() is the
|
||||
// Given the current architecture of BLIS sandboxes, bli_gemm_ex() is the
|
||||
// entry point to any sandbox implementation.
|
||||
|
||||
// NOTE: This function is implemented identically to the function that it
|
||||
// overrides in frame/ind/oapi/bli_l3_nat_oapi.c. This means that we are
|
||||
// forgoing the option of customizing the implementations that underlie
|
||||
// bli_gemm() and bli_?gemm(). Any new code defined in this sandbox
|
||||
// directory, however, will be included in the BLIS.
|
||||
// NOTE: This function is implemented functionally identically to the
|
||||
// function that it overrides in frame/3/bli_l3_oapi_ex.c. This means that
|
||||
// we are forgoing the option of customizing the implementations that
|
||||
// underlie bli_gemm() and bli_?gemm() (which both call bli_gemm_ex()).
|
||||
// Any new code defined in this sandbox directory, however, will be
|
||||
// included in the BLIS.
|
||||
|
||||
#include "blis.h"
|
||||
|
||||
#undef GENFRONT
|
||||
#define GENFRONT( opname, cname, imeth ) \
|
||||
\
|
||||
void PASTEMAC(opname,imeth) \
|
||||
( \
|
||||
obj_t* alpha, \
|
||||
obj_t* a, \
|
||||
obj_t* b, \
|
||||
obj_t* beta, \
|
||||
obj_t* c, \
|
||||
cntx_t* cntx, \
|
||||
rntm_t* rntm \
|
||||
) \
|
||||
{ \
|
||||
bli_init_once(); \
|
||||
\
|
||||
/* Obtain a valid (native) context from the gks if necessary. */ \
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx(); \
|
||||
\
|
||||
/* Initialize a local runtime with global settings if necessary. Note
|
||||
that in the case that a runtime is passed in, we make a local copy. */ \
|
||||
rntm_t rntm_l; \
|
||||
if ( rntm == NULL ) { bli_rntm_init_from_global( &rntm_l ); rntm = &rntm_l; } \
|
||||
else { rntm_l = *rntm; rntm = &rntm_l; } \
|
||||
\
|
||||
/* Invoke the operation's front end. */ \
|
||||
PASTEMAC(opname,_front) \
|
||||
( \
|
||||
alpha, a, b, beta, c, cntx, rntm, NULL \
|
||||
); \
|
||||
void bli_gemm_ex
|
||||
(
|
||||
obj_t* alpha,
|
||||
obj_t* a,
|
||||
obj_t* b,
|
||||
obj_t* beta,
|
||||
obj_t* c,
|
||||
cntx_t* cntx,
|
||||
rntm_t* rntm
|
||||
)
|
||||
{
|
||||
bli_init_once();
|
||||
|
||||
// Initialize a local runtime with global settings if necessary. Note
|
||||
// that in the case that a runtime is passed in, we make a local copy.
|
||||
rntm_t rntm_l;
|
||||
if ( rntm == NULL ) { bli_rntm_init_from_global( &rntm_l ); rntm = &rntm_l; }
|
||||
else { rntm_l = *rntm; rntm = &rntm_l; }
|
||||
|
||||
// Obtain a valid (native) context from the gks if necessary.
|
||||
if ( cntx == NULL ) cntx = bli_gks_query_cntx();
|
||||
|
||||
// Check the operands.
|
||||
if ( bli_error_checking_is_enabled() )
|
||||
bli_gemm_check( alpha, a, b, beta, c, cntx );
|
||||
|
||||
// Invoke the operation's front end.
|
||||
bli_gemm_front
|
||||
(
|
||||
alpha, a, b, beta, c, cntx, rntm, NULL
|
||||
);
|
||||
}
|
||||
|
||||
GENFRONT( gemm, gemm, nat )
|
||||
Reference in New Issue
Block a user