Fixed an obscure bug in the 1m implementation.

Details:
- Fixed a bug in the way the bli_gemm1m_cntx_ref() function (defined in
  ref_kernels/bli_cntx_ref.c) initializes its context for 1m execution.
  Previously, the function probed the context that was in the process of
  being updated for use with 1m--this context being previously
  initialized/copied from a native context--for its storage preference
  to determine which "variant" (row- or column-oriented) of 1m would be
  needed. However, the _cntx_ref() function was not updating the method
  field of the context until AFTER this query, and the conditional which
  depended on it, had taken place, meaning the storage preference query
  function would mistakenly think the context was for native execution,
  since the context's method field would still be set to BLIS_NAT. This
  would lead it to incorrectly grab the storage preference of the complex
  domain microkernel rather than the corresponding real domain
  microkernel, which could cause the storage preference predicate to
  evaluate to the wrong value, which would lead to the _cntx_ref()
  function choosing the wrong variant. This could lead to undefined
  behavior at runtime. The method is now explicitly set within the
  context prior to calling the storage preference query function.
- Updated comments in frame/ind/oapi/bli_l3_3m4m1m_oapi.c.
- Fixed a typo in the commented-out CFLAGS in config/zen/make_defs.mk,
  which are appropriate for gcc 6.x and newer. (Mistakenly used
  -march=bdver4 instead of -march=znver1.)
This commit is contained in:
Field G. Van Zee
2018-02-15 18:36:54 -06:00
parent 1f94bb7b96
commit f07b176c84
3 changed files with 28 additions and 16 deletions

View File

@@ -82,9 +82,9 @@ void PASTEMAC(opname,imeth) \
\
/* Query a context for the current induced method. This context is
managed and cached by the gks and should not be freed by the caller.
Note that we pass in the datatype because it will be needed when
bli_gks_query_ind_cntx() eventually calls the bli_ind_cntx_init()
family of functions. */ \
Note that the datatype argument is needed because it will be passed
in when bli_gks_query_ind_cntx() eventually calls the induced method's
_cntx_init() function. */ \
cntx = bli_gks_query_ind_cntx( ind, dt ); \
\
/* Some induced methods execute in multiple "stages". */ \
@@ -162,9 +162,9 @@ void PASTEMAC(opname,imeth) \
\
/* Query a context for the current induced method. This context is
managed and cached by the gks and should not be freed by the caller.
Note that we pass in the datatype because it will be needed when
bli_gks_query_ind_cntx() eventually calls the bli_ind_cntx_init()
family of functions. */ \
Note that the datatype argument is needed because it will be passed
in when bli_gks_query_ind_cntx() eventually calls the induced method's
_cntx_init() function. */ \
cntx = bli_gks_query_ind_cntx( ind, dt ); \
\
/* Some induced methods execute in multiple "stages". */ \
@@ -240,9 +240,9 @@ void PASTEMAC(opname,imeth) \
\
/* Query a context for the current induced method. This context is
managed and cached by the gks and should not be freed by the caller.
Note that we pass in the datatype because it will be needed when
bli_gks_query_ind_cntx() eventually calls the bli_ind_cntx_init()
family of functions. */ \
Note that the datatype argument is needed because it will be passed
in when bli_gks_query_ind_cntx() eventually calls the induced method's
_cntx_init() function. */ \
cntx = bli_gks_query_ind_cntx( ind, dt ); \
\
/* Some induced methods execute in multiple "stages". */ \
@@ -309,9 +309,9 @@ void PASTEMAC(opname,imeth) \
\
/* Query a context for the current induced method. This context is
managed and cached by the gks and should not be freed by the caller.
Note that we pass in the datatype because it will be needed when
bli_gks_query_ind_cntx() eventually calls the bli_ind_cntx_init()
family of functions. */ \
Note that the datatype argument is needed because it will be passed
in when bli_gks_query_ind_cntx() eventually calls the induced method's
_cntx_init() function. */ \
cntx = bli_gks_query_ind_cntx( ind, dt ); \
\
/* Some induced methods execute in multiple "stages". */ \
@@ -364,9 +364,9 @@ void PASTEMAC(opname,imeth) \
\
/* Query a context for the current induced method. This context is
managed and cached by the gks and should not be freed by the caller.
Note that we pass in the datatype because it will be needed when
bli_gks_query_ind_cntx() eventually calls the bli_ind_cntx_init()
family of functions. */ \
Note that the datatype argument is needed because it will be passed
in when bli_gks_query_ind_cntx() eventually calls the induced method's
_cntx_init() function. */ \
cntx = bli_gks_query_ind_cntx( ind, dt ); \
\
{ \