mirror of
https://github.com/amd/blis.git
synced 2026-04-19 23:28:52 +00:00
Tweaks to get BLIS compiling again on clarksville.
Details: - Updated header files and make_defs.mk in config/clarksville. - Fixes to bl2_mem.c (now that SMEM_M, SMEM_N are gone). - Moved definition of blksz_t from bl2_cntl.h to bl2_type_defs.h. - Shuffled include statements in blis2.h.
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
#define BLIS_MEMORY_ALIGNMENT_BOUNDARY 16
|
||||
#endif
|
||||
|
||||
// Static memory pool size.
|
||||
#define BLIS_STATIC_MEM_POOL_SIZE (256 * 5000 * sizeof(double))
|
||||
|
||||
|
||||
// Enable mixed domain operations?
|
||||
//#define BLIS_ENABLE_MIXED_DOMAIN_SUPPORT
|
||||
|
||||
|
||||
@@ -57,6 +57,24 @@
|
||||
|
||||
|
||||
|
||||
// -- LEVEL-1M KERNEL DEFINITIONS ----------------------------------------------
|
||||
|
||||
// -- packm --
|
||||
|
||||
#define PACKM_2XK_KERNEL packm_ref_2xk
|
||||
#define PACKM_4XK_KERNEL packm_ref_4xk
|
||||
#define PACKM_6XK_KERNEL packm_ref_6xk
|
||||
#define PACKM_8XK_KERNEL packm_ref_8xk
|
||||
|
||||
// -- unpackm --
|
||||
|
||||
#define UNPACKM_2XK_KERNEL unpackm_ref_2xk
|
||||
#define UNPACKM_4XK_KERNEL unpackm_ref_4xk
|
||||
#define UNPACKM_6XK_KERNEL unpackm_ref_6xk
|
||||
#define UNPACKM_8XK_KERNEL unpackm_ref_8xk
|
||||
|
||||
|
||||
|
||||
// -- LEVEL-1F KERNEL DEFINITIONS ----------------------------------------------
|
||||
|
||||
#include "bl2_axpy2v_opt_var1.h"
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#
|
||||
|
||||
# Only include this block of code once.
|
||||
ifndef CONFIG_MK_INCLUDED
|
||||
CONFIG_MK_INCLUDED := yes
|
||||
ifndef MAKE_DEFS_MK_INCLUDED
|
||||
MAKE_DEFS_MK_INCLUDED := yes
|
||||
|
||||
|
||||
|
||||
@@ -42,19 +42,10 @@ CONFIG_MK_INCLUDED := yes
|
||||
# --- Build definitions --------------------------------------------------------
|
||||
#
|
||||
|
||||
# This variable will identify the machine architecture (ie: i686, x86_64, etc.)
|
||||
# It will be used to construct a string that is appended to the BLIS library
|
||||
# name.
|
||||
ARCH := x86_64
|
||||
|
||||
# The install prefix tell us where to install the libraries and header file
|
||||
# directory. Notice that we support the use of DESTDIR so that advanced users
|
||||
# may install to a temporary location.
|
||||
PREFIX := $(HOME)/flame
|
||||
INSTALL_PREFIX := $(DESTDIR)$(PREFIX)
|
||||
|
||||
# Variables corresponding to other configure-time options.
|
||||
BLIS_ENABLE_VERBOSE_MAKE_OUTPUT := no
|
||||
BLIS_ENABLE_STATIC_BUILD := yes
|
||||
BLIS_ENABLE_DYNAMIC_BUILD := no
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +64,10 @@ XARGS := xargs
|
||||
RANLIB := ranlib
|
||||
INSTALL := install -c
|
||||
|
||||
# Used to refresh CHANGELOG.
|
||||
GIT := git
|
||||
GIT_LOG := $(GIT) log --decorate
|
||||
|
||||
|
||||
|
||||
#
|
||||
@@ -81,11 +76,11 @@ INSTALL := install -c
|
||||
|
||||
# --- Determine the C compiler and related flags ---
|
||||
CC := gcc
|
||||
CPPROCFLAGS :=
|
||||
CPPROCFLAGS :=
|
||||
CMISCFLAGS := -std=c99 # -fopenmp -pg
|
||||
CDBGFLAGS := # -g
|
||||
CWARNFLAGS := -Wall -Wno-comment
|
||||
COPTFLAGS := -O2
|
||||
CDBGFLAGS := -g
|
||||
CWARNFLAGS := -Wall
|
||||
COPTFLAGS := -O2 #-malign-double
|
||||
CVECFLAGS := -msse3 -march=nocona -mfpmath=sse
|
||||
|
||||
# Aggregate all of the flags into two groups: one for optimizable code, and
|
||||
@@ -103,5 +98,5 @@ LDFLAGS :=
|
||||
|
||||
|
||||
|
||||
# end of ifndef CONFIG_MK_INCLUDED conditional block
|
||||
# end of ifndef MAKE_DEFS_MK_INCLUDED conditional block
|
||||
endif
|
||||
|
||||
@@ -34,8 +34,9 @@
|
||||
|
||||
#include "blis2.h"
|
||||
|
||||
#define N_ELEM_SMEM ( BLIS_STATIC_MEM_POOL_SIZE / sizeof( double ) )
|
||||
|
||||
double smem[ BLIS_STATIC_MEM_POOL_SIZE / sizeof( double ) ];
|
||||
double smem[ N_ELEM_SMEM ];
|
||||
|
||||
double* mc = smem;
|
||||
int counter = 0;
|
||||
@@ -109,7 +110,7 @@ void* bl2_malloc_s( siz_t buf_size )
|
||||
rmem = ( void* )mc;
|
||||
mc += ( buf_size / sizeof( double ) );
|
||||
|
||||
if ( mc >= smem + ( SMEM_M * SMEM_N ) )
|
||||
if ( mc >= smem + ( N_ELEM_SMEM ) )
|
||||
bl2_abort();
|
||||
|
||||
++counter;
|
||||
@@ -127,7 +128,7 @@ void bl2_free_s( void* p )
|
||||
|
||||
void bl2_mm_clear_smem( void )
|
||||
{
|
||||
dim_t n = SMEM_M * SMEM_N;
|
||||
dim_t n = N_ELEM_SMEM;
|
||||
dim_t i;
|
||||
|
||||
for ( i = 0; i < n; ++i )
|
||||
|
||||
@@ -55,11 +55,6 @@ typedef enum
|
||||
BLIS_VARIANT9,
|
||||
} varnum_t;
|
||||
|
||||
typedef struct blksz_s
|
||||
{
|
||||
dim_t v[BLIS_NUM_FP_TYPES];
|
||||
} blksz_t;
|
||||
|
||||
|
||||
void bl2_cntl_obj_free( void* cntl );
|
||||
|
||||
|
||||
@@ -71,6 +71,13 @@ typedef struct mem_s
|
||||
dim_t n;
|
||||
} mem_t;
|
||||
|
||||
// Blocksize object type
|
||||
|
||||
typedef struct blksz_s
|
||||
{
|
||||
dim_t v[BLIS_NUM_FP_TYPES];
|
||||
} blksz_t;
|
||||
|
||||
// Atom type
|
||||
// Note: atom types are used to hold "bufferless" scalar object values. Note
|
||||
// that it needs to be as large as the largest possible scalar value we might
|
||||
|
||||
@@ -53,7 +53,6 @@ extern "C" {
|
||||
|
||||
#include "bl2_config.h"
|
||||
#include "bl2_arch.h"
|
||||
#include "bl2_kernel.h"
|
||||
|
||||
|
||||
// -- System headers --
|
||||
@@ -72,11 +71,12 @@ extern "C" {
|
||||
#include "bl2_type_defs.h"
|
||||
#include "bl2_macro_defs.h"
|
||||
#include "bl2_const_defs.h"
|
||||
#include "bl2_cntl.h"
|
||||
|
||||
#include "bl2_extern_defs.h"
|
||||
|
||||
#include "bl2_f2c.h"
|
||||
|
||||
// -- BLIS architecture / kernel definitions --
|
||||
|
||||
#include "bl2_kernel.h"
|
||||
|
||||
|
||||
// -- Base operation prototypes --
|
||||
@@ -92,8 +92,12 @@ extern "C" {
|
||||
#include "bl2_clock.h"
|
||||
#include "bl2_check.h"
|
||||
#include "bl2_error.h"
|
||||
#include "bl2_f2c.h"
|
||||
#include "bl2_machval.h"
|
||||
|
||||
// Control tree definitions.
|
||||
#include "bl2_cntl.h"
|
||||
|
||||
|
||||
// -- Level-0 operations --
|
||||
|
||||
|
||||
Reference in New Issue
Block a user