mirror of
https://github.com/amd/blis.git
synced 2026-05-11 01:30:00 +00:00
Implemented dynamic allocation for packing buffers.
Details: - Replaced the old memory allocator, which was based on statically- allocated arrays, with one based on a new internal pool_t type, which, combined with a new bli_pool_*() API, provides a new abstract data type that implements the same memory pool functionality but with blocks from the heap (ie: malloc() or equivalent). Hiding the details of the pool in a separate API also allows for a much simpler bli_mem.c family of functions. - Added a new internal header, bli_config_macro_defs.h, which enables sane defaults for the values previously found in bli_config. Those values can be overridden by #defining them in bli_config.h the same way kernel defaults can be overridden in bli_kernel.h. This file most resembles what was previously a typical configuration's bli_config.h. - Added a new configuration macro, BLIS_POOL_ADDR_ALIGN_SIZE, which defaults to BLIS_PAGE_SIZE, to specify the alignment of individual blocks in the memory pool. Also added a corresponding query routine to the bli_info API. - Deprecated (once again) the micro-panel alignment feature. Upon further reflection, it seems that the goal of more predictable L1 cache replacement behavior is outweighed by the harm caused by non-contiguous micro-panels when k % kc != 0. I honestly don't think anyone will even miss this feature. - Changed bli_ukr_get_funcs() and bli_ukr_get_ref_funcs() to call bli_cntl_init() instead of bli_init(). - Removed query functions from bli_info.c that are no longer applicable given the dynamic memory allocator. - Removed unnecessary definitions from configurations' bli_config.h files, which are now pleasantly sparse. - Fixed incorrect flop counts in addv, subv, scal2v, scal2m testsuite modules. Thanks to Devangi Parikh for pointing out these miscalculations. - Comment, whitespace changes.
This commit is contained in:
@@ -1245,41 +1245,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
// -- Define micro-panel alignment ---------------------------------------------
|
||||
|
||||
// In this section, we consider each datatype-specific alignment sizes for
|
||||
// micro-panels of A and B. If any definition is undefined, we define it to
|
||||
// a safe default value (the size of the datatype).
|
||||
|
||||
// Alignment for micro-panels of A
|
||||
#ifndef BLIS_UPANEL_A_ALIGN_SIZE_S
|
||||
#define BLIS_UPANEL_A_ALIGN_SIZE_S BLIS_SIZEOF_S
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_A_ALIGN_SIZE_D
|
||||
#define BLIS_UPANEL_A_ALIGN_SIZE_D BLIS_SIZEOF_D
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_A_ALIGN_SIZE_C
|
||||
#define BLIS_UPANEL_A_ALIGN_SIZE_C BLIS_SIZEOF_C
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_A_ALIGN_SIZE_Z
|
||||
#define BLIS_UPANEL_A_ALIGN_SIZE_Z BLIS_SIZEOF_Z
|
||||
#endif
|
||||
|
||||
// Alignment for micro-panels of B
|
||||
#ifndef BLIS_UPANEL_B_ALIGN_SIZE_S
|
||||
#define BLIS_UPANEL_B_ALIGN_SIZE_S BLIS_SIZEOF_S
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_B_ALIGN_SIZE_D
|
||||
#define BLIS_UPANEL_B_ALIGN_SIZE_D BLIS_SIZEOF_D
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_B_ALIGN_SIZE_C
|
||||
#define BLIS_UPANEL_B_ALIGN_SIZE_C BLIS_SIZEOF_C
|
||||
#endif
|
||||
#ifndef BLIS_UPANEL_B_ALIGN_SIZE_Z
|
||||
#define BLIS_UPANEL_B_ALIGN_SIZE_Z BLIS_SIZEOF_Z
|
||||
#endif
|
||||
|
||||
|
||||
// -- Kernel blocksize checks --------------------------------------------------
|
||||
|
||||
// Verify that cache blocksizes are whole multiples of register blocksizes.
|
||||
|
||||
Reference in New Issue
Block a user