Better thread safety; added threading to testsuite.

Details:
- Replaced critical sections that were conditional upon multithreading
  being enabled (via pthreads or OpenMP) with unconditional use of
  pthreads mutexes. (Why pthreads? Because BLIS already requires it
  for its initialization mechanism: pthread_once().) This was done in
  bli_error.c, bli_gks.c, bli_l3_ind.c. Also, replaced usage of BLIS's
  mtx_t object and bli_mutex_*() API with pthread mutexes in
  bli_thread.c. The previous status quo could result in a race condition
  if the application called BLIS from more than one thread. The new
  pthread-based code should be completely agnostic to the application's
  threading configuration. Thanks to AMD for bringing to our attention
  the need for a thread-safety review.
- Added an option to the testsuite to simulate application-level
  multithreading. Specifically, each thread maintains a counter that is
  incremented after each experiment. The thread only executes the
  experiment if: counter % n_threads == thread_id. In other words, the
  threads simply take turns executing each problem experiment. Also,
  POSIX guarantees that fprintf() will not intermingle output, so
  output was switched to fprintf() instead of libblis_test_fprintf().
- Changed membrk_t objects to use pthread_mutex_t intead of mtx_t and
  replaced use of bli_mutex_init()/_finalize() in bli_membrk.c with
  wrappers to pthread_mutex_init()/_destroy().
- Changed the implementation of bli_l3_ind_oper_enable_only() to fix
  a race condition; specifically, two threads calling the function with
  the same parameters could lead to a non-deterministic outcome.
- Added #include <pthread.h> to bli_cpuid.c and moved the same in
  bli_arch.c.
- Added 'const' to declaration of OPT_MARKER in bli_getopt.c.
- Added #include <pthread.h> to bli_system.h.
- Added add-copyright.py script to automate adding new copyright lines
  to (and updating existing lines of) source files.
This commit is contained in:
Field G. Van Zee
2018-08-26 20:34:30 -05:00
parent 36ff92ce0d
commit 10d07357af
125 changed files with 1544 additions and 630 deletions

View File

@@ -4,8 +4,8 @@ NOTE: Portions of this project's code are copyrighted by
while other portions are copyrighted by
Advanced Micro Devices, Inc.
Hewlett Packard Enterprise Development LP
Advanced Micro Devices, Inc.
with some overlap. Please see file-level license headers for file-specific
copyright info. All parties provide their portions of the code under the
@@ -13,9 +13,9 @@ copyright info. All parties provide their portions of the code under the
---
Copyright (C) 2017, Advanced Micro Devices, Inc.
Copyright (C) 2018, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

354
build/add-copyright.py Executable file
View File

@@ -0,0 +1,354 @@
#!/usr/bin/env python3
#
# BLIS
# An object-based framework for developing high-performance BLAS-like
# libraries.
#
# Copyright (C) 2018, The University of Texas at Austin
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of The University of Texas at Austin nor the names
# of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# Import modules
import os
import sys
import getopt
import re
import subprocess
import datetime
def print_usage():
my_print( " " )
my_print( " %s" % script_name )
my_print( " " )
my_print( " Field G. Van Zee" )
my_print( " " )
my_print( " Update copyright lines of all created or modified source files currently" )
my_print( " staged in the git index, and also insert new copyright lines where they" )
my_print( " currently are missing. This script targets copyright lines for one" )
my_print( " organization at a time." )
my_print( " " )
my_print( " Usage:" )
my_print( " " )
my_print( " %s [options]" % script_name )
my_print( " " )
my_print( " Arguments:" )
my_print( " " )
my_print( " " )
my_print( " The following options are accepted:" )
my_print( " " )
my_print( " -o org organization name" )
my_print( " Update and add copyrights for an organization named <org>." )
my_print( " By default, <org> is 'Advanced Micro Devices, Inc.'" )
my_print( " " )
my_print( " -u update only" )
my_print( " Update existing copyrights to reflect the current year," )
my_print( " but do not add any additional copyright lines. With this" )
my_print( " option, the script still only updates copyright lines for" )
my_print( " the specified (or default) organization. The default is" )
my_print( " to update but also add copyright lines where missing." )
my_print( " " )
my_print( " -d dry run" )
my_print( " Go through all of the motions, but don't actually modify" )
my_print( " any files. The default behavior is to not enable dry run." )
my_print( " " )
my_print( " -q quiet" )
my_print( " Do not output feedback while processing each file. The" )
my_print( " default behavior is to output one line of text to stdout" )
my_print( " per file updated." )
my_print( " " )
my_print( " -h help" )
my_print( " Output this information and exit." )
my_print( " " )
# ------------------------------------------------------------------------------
def my_print( s ):
sys.stdout.write( "%s\n" % s )
#sys.stdout.flush()
def my_echo( s ):
if not quiet:
sys.stdout.write( "%s: %s\n" % ( output_name, s ) )
#sys.stdout.flush()
# ------------------------------------------------------------------------------
def main():
global script_name
global output_name
global quiet
# Obtain the script name.
path, script_name = os.path.split(sys.argv[0])
output_name = script_name
# Default values for optional arguments.
the_org = 'Advanced Micro Devices, Inc.'
update_only = False
dry_run = False
quiet = False
# Process our command line options.
try:
opts, args = getopt.getopt( sys.argv[1:], "do:uhq" )
except getopt.GetoptError as err:
# print help information and exit:
my_print( str(err) ) # will print something like "option -a not recognized"
print_usage()
sys.exit(2)
for opt, optarg in opts:
if opt == "-o":
the_org = optarg
elif opt == "-u":
update_only = True
elif opt == "-d":
dry_run = True
elif opt == "-q":
quiet = True
elif opt == "-h":
print_usage()
sys.exit()
else:
print_usage()
sys.exit()
# Print usage if we don't have exactly zero arguments.
if len( args ) != 0:
print_usage()
sys.exit()
# Acquire our only mandatory argument.
#driverfile = args[0]
# Query the current year.
the_time = datetime.datetime.now()
cur_year = str(the_time.year)
# We run 'git status' with --porcelain to make the output easily parseable.
gitstatus = 'git status --porcelain'
# Run the 'git status' command and capture the output.
p = subprocess.run( gitstatus, stdout=subprocess.PIPE, shell=True )
git_lines = p.stdout.decode().splitlines()
git_num_lines = int( len( git_lines ) )
# Consider each line of output from 'git status'
for i in range( git_num_lines ):
# Parse the current line to find the performance value.
git_line = git_lines[i]
git_words = git_line.split()
mod_char = git_line[0]
# Check the first character of the git output. We want to only update
# files that are new ('A'), modified ('M'), or renamed ('R').
if mod_char != 'A' and \
mod_char != 'M' and \
mod_char != 'R': continue
# Identify the filename for the current line of 'git status' output.
if mod_char == 'R':
# For renamed files, we need to reference them by their new names,
# which appear after the "->" char sequence in git_words[2].
filename = git_words[3]
else:
filename = git_words[1]
# Start by opening the file. (We can assume it exists since it
# was found by 'git status', so no need to check for existence.)
# Read all lines in the file and then close it.
f = open( filename, "r" )
file_lines = f.readlines()
f.close()
# Concatenate all lines in the file into one string.
file_string = "".join( file_lines )
# Search for an existing copyright line.
has_cr = re.search( 'Copyright \(C\)', file_string )
# If the file does not have any copyright notice in it already, we
# assume we don't need to update it.
if not has_cr:
my_echo( "[skipped] %s" % filename )
continue
# Check whether the file already has a copyright for the_org. We may
# need to use this information later.
has_org_cr = re.search( 'Copyright \(C\) ([0-9][0-9][0-9][0-9]), %s' % the_org, file_string )
# Initialize the list of processed (potentially modified) file lines.
mod_file_lines = []
# At this point we know that the file has at least one copyright, and
# has_org_cr encodes whether already has a copyright for the_org.
# We process the files that we know already have copyrights for the_org
# differently from the files that do not yet have them.
if has_org_cr:
# Iterate through the lines in the current file.
for line in file_lines:
result = re.search( 'Copyright \(C\) ([0-9][0-9][0-9][0-9]), %s' % the_org, line )
# If the current line matches a copyright line for the_org...
if result:
# Extract the year saved as the first/only group in the
# regular expression.
old_year = result.group(1)
# Don't need to update the year if it's already up-to-date.
if old_year != cur_year:
# Substitute the old year for the current year.
find_line = ' %s, ' % old_year
repl_line = ' %s, ' % cur_year
line_ny = re.sub( find_line, repl_line, line )
my_echo( "[updated] %s" % filename )
# Add the updated line to the running list.
mod_file_lines += line_ny
else:
# Add the unchanged line to the running list.
mod_file_lines += line
else:
# Add the unchanged line to the running list.
mod_file_lines += line
# endif result
# endfor
else:
# Don't go any further if we're only updating existing copyright
# lines.
if update_only:
my_echo( "[skipped] %s" % filename )
continue
num_file_lines = len( file_lines )
# Iterate through the lines in the current file.
for i in range( int(num_file_lines) ):
line = file_lines[i]
# Only look at the next line if we are not at the last line.
if i < int(num_file_lines) - 1:
line_next = file_lines[i+1]
else:
line_next = file_lines[i]
# Try to match both the current line and the next line.
result = re.search( 'Copyright \(C\) ([0-9][0-9][0-9][0-9]), (.*)', line )
resnext = re.search( 'Copyright \(C\) ([0-9][0-9][0-9][0-9]), (.*)', line_next )
# Parse the results.
if result:
if resnext:
# The current line matches but so does the next. Add the
# current line unchanged to the running list.
mod_file_lines += line
else:
# The current line matches but the next does not. Thus,
# this branch only executes for the *last* copyright line
# in the file.
# Extract the year and organization from the matched
# string.
old_year = result.group(1)
old_org = result.group(2)
# Set up search/replace strings to convert the current
# line into one that serves as copyright for the_org.
find_line = '%s, %s' % (old_year, old_org)
repl_line = '%s, %s' % (cur_year, the_org)
line_nyno = re.sub( find_line, repl_line, line )
# Add the current line and then also insert our new
# copyright line for the_org into the running list.
mod_file_lines += line
mod_file_lines += line_nyno
my_echo( "[added ] %s" % filename )
# endif resnext
else:
# The current line does not match. Pass it through unchanged.
mod_file_lines += line
# endif result
# endfor
# endif has_org_cr
if not dry_run:
# Open the file for writing.
f = open( filename, "w" )
# Join the modified file lines into a single string.
final_string = "".join( mod_file_lines )
# Write the lines to the file.
f.write( final_string )
# Close the file.
f.close()
# endif not dry_run
# Return from main().
return 0
if __name__ == "__main__":
main()

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -35,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#include "bli_type_defs.h"
#include "bli_arch.h"

7
configure vendored
View File

@@ -5,6 +5,7 @@
# libraries.
#
# Copyright (C) 2014, The University of Texas at Austin
# Copyright (C) 2018, Advanced Micro Devices, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -933,13 +934,8 @@ auto_detect()
bli_typed_h_path=${bli_typed_h_filepath%/${bli_typed_h}}
# Locate other headers needed by bli_type_defs.h.
bli_mutex_h="bli_mutex.h"
bli_malloc_h="bli_malloc.h"
bli_mutex_h_filepath=$(find ${dist_path}/frame -name "${bli_mutex_h}")
bli_malloc_h_filepath=$(find ${dist_path}/frame -name "${bli_malloc_h}")
bli_mutex_h_path=${bli_mutex_h_filepath%/${bli_mutex_h}}
bli_malloc_h_path=${bli_malloc_h_filepath%/${bli_malloc_h}}
# Define the executable name.
@@ -961,7 +957,6 @@ auto_detect()
-I${bli_cpuid_h_path} \
-I${bli_arch_h_path} \
-I${bli_typed_h_path} \
-I${bli_mutex_h_path} \
-I${bli_malloc_h_path} \
-std=c99 \
${cflags} \

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -38,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>
#include "bli_type_defs.h"
#include "bli_arch.h"
#include "bli_cpuid.h"
@@ -59,8 +61,6 @@ arch_t bli_arch_query_id( void )
// -----------------------------------------------------------------------------
#include <pthread.h>
// A pthread structure used in pthread_once(). pthread_once() is guaranteed to
// execute exactly once among all threads that pass in this control object.
static pthread_once_t once_id = PTHREAD_ONCE_INIT;

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -53,6 +54,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>
#include "bli_type_defs.h"
#include "bli_cpuid.h"
#endif
@@ -486,6 +488,7 @@ bool_t bli_cpuid_is_cortexa9
Copyright (C) 2017, The University of Texas at Austin
Copyright (C) 2017, Devin Matthews
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -197,9 +198,8 @@ void bli_abort( void )
// -----------------------------------------------------------------------------
#ifdef BLIS_ENABLE_PTHREADS
// A mutex to allow synchronous access to bli_err_chk_level.
static pthread_mutex_t err_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
// Current error checking level.
static errlev_t bli_err_chk_level = BLIS_FULL_ERROR_CHECKING;
@@ -216,12 +216,8 @@ void bli_error_checking_level_set( errlev_t new_level )
e_val = bli_check_valid_error_level( new_level );
bli_check_error_code( e_val );
#ifdef BLIS_ENABLE_OPENMP
_Pragma( "omp critical (err)" )
#endif
#ifdef BLIS_ENABLE_PTHREADS
// Acquire the mutex protecting bli_err_chk_level.
pthread_mutex_lock( &err_mutex );
#endif
// BEGIN CRITICAL SECTION
{
@@ -229,9 +225,8 @@ void bli_error_checking_level_set( errlev_t new_level )
}
// END CRITICAL SECTION
#ifdef BLIS_ENABLE_PTHREADS
// Release the mutex protecting bli_err_chk_level.
pthread_mutex_unlock( &err_mutex );
#endif
}
bool_t bli_error_checking_is_enabled( void )

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,7 +35,7 @@
#include "blis.h"
static char OPT_MARKER = '-';
static const char OPT_MARKER = '-';
void bli_getopt_init_state( int opterr, getopt_t* state )
{

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -46,10 +47,6 @@ static void* cntx_ind_init[ BLIS_NUM_ARCHS ];
// functions for reference kernels.
static void* cntx_ref_init[ BLIS_NUM_ARCHS ];
#ifdef BLIS_ENABLE_PTHREADS
pthread_mutex_t gks_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
// Define a function pointer type for context initialization functions.
typedef void (*nat_cntx_init_ft)( cntx_t* cntx );
typedef void (*ref_cntx_init_ft)( cntx_t* cntx );
@@ -414,6 +411,10 @@ cntx_t* bli_gks_query_cntx_noinit( void )
// -----------------------------------------------------------------------------
// A mutex to allow synchronous access to the gks when it needs to be updated
// with a new entry corresponding to a context for an ind_t value.
static pthread_mutex_t gks_mutex = PTHREAD_MUTEX_INITIALIZER;
cntx_t* bli_gks_query_ind_cntx
(
ind_t ind,
@@ -465,12 +466,8 @@ cntx_t* bli_gks_query_ind_cntx
// gks[ id ] is non-NULL and gks[ id ][ BLIS_NAT ] is also non-NULL
// and refers to a context initialized with valid data).
#ifdef BLIS_ENABLE_OPENMP
_Pragma( "omp critical (gks)" )
#endif
#ifdef BLIS_ENABLE_PTHREADS
// Acquire the mutex protecting the gks.
pthread_mutex_lock( &gks_mutex );
#endif
// BEGIN CRITICAL SECTION
{
@@ -507,9 +504,8 @@ cntx_t* bli_gks_query_ind_cntx
}
// END CRITICAL SECTION
#ifdef BLIS_ENABLE_PTHREADS
// Release the mutex protecting the gks.
pthread_mutex_unlock( &gks_mutex );
#endif
// Return the address of the newly-allocated/initialized context.
return gks_id_ind;

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2017, Advanced Micro Devices, Inc.
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -94,8 +94,6 @@ void bli_finalize_apis( void )
// -----------------------------------------------------------------------------
#include <pthread.h>
// A pthread_once_t variable is a pthread structure used in pthread_once().
// pthread_once() is guaranteed to execute exactly once among all threads that
// pass in this control object. Thus, we need one for initialization and a

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -41,7 +42,7 @@ void bli_membrk_init
membrk_t* membrk
)
{
bli_mutex_init( bli_membrk_mutex( membrk ) );
bli_membrk_init_mutex( membrk );
#ifdef BLIS_ENABLE_PACKBUF_POOLS
bli_membrk_init_pools( cntx, membrk );
#endif
@@ -59,7 +60,7 @@ void bli_membrk_finalize
#ifdef BLIS_ENABLE_PACKBUF_POOLS
bli_membrk_finalize_pools( membrk );
#endif
bli_mutex_finalize( bli_membrk_mutex( membrk ) );
bli_membrk_finalize_mutex( membrk );
}
void bli_membrk_acquire_m
@@ -121,8 +122,10 @@ void bli_membrk_acquire_m
// Extract the address of the pblk_t struct within the mem_t.
pblk = bli_mem_pblk( mem );
// BEGIN CRITICAL SECTION
// Acquire the mutex associated with the membrk object.
bli_membrk_lock( membrk );
// BEGIN CRITICAL SECTION
{
// Checkout a block from the pool. If the pool's blocks are too
@@ -143,9 +146,11 @@ void bli_membrk_acquire_m
block_size = bli_pool_block_size( pool );
}
bli_membrk_unlock( membrk );
// END CRITICAL SECTION
// Release the mutex associated with the membrk object.
bli_membrk_unlock( membrk );
// Initialize the mem_t object with:
// - the buffer type (a packbuf_t value),
// - the address of the memory pool to which it belongs,

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -36,6 +37,18 @@
#ifndef BLIS_MEMBRK_H
#define BLIS_MEMBRK_H
// membrk init
static void bli_membrk_init_mutex( membrk_t* membrk )
{
pthread_mutex_init( &(membrk->mutex), NULL );
}
static void bli_membrk_finalize_mutex( membrk_t* membrk )
{
pthread_mutex_destroy( &(membrk->mutex) );
}
// membrk query
static pool_t* bli_membrk_pool( dim_t pool_index, membrk_t* membrk )
@@ -43,11 +56,6 @@ static pool_t* bli_membrk_pool( dim_t pool_index, membrk_t* membrk )
return &(membrk->pools[ pool_index ]);
}
static mtx_t* bli_membrk_mutex( membrk_t* membrk )
{
return &(membrk->mutex);
}
static malloc_ft bli_membrk_malloc_fp( membrk_t* membrk )
{
return membrk->malloc_fp;
@@ -74,12 +82,12 @@ static void bli_membrk_set_free_fp( free_ft free_fp, membrk_t* membrk )
static void bli_membrk_lock( membrk_t* membrk )
{
bli_mutex_lock( &(membrk->mutex) );
pthread_mutex_lock( &(membrk->mutex) );
}
static void bli_membrk_unlock( membrk_t* membrk )
{
bli_mutex_unlock( &(membrk->mutex) );
pthread_mutex_unlock( &(membrk->mutex) );
}
static void* bli_membrk_malloc( size_t size, membrk_t* membrk )

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -100,5 +101,9 @@
#include <time.h>
#endif
// POSIX threads are unconditionally required, regardless of whether
// multithreading is enabled via pthreads or OpenMP (or disabled).
#include <pthread.h>
#endif

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -899,21 +900,18 @@ typedef struct
} pool_t;
// -- Mutex object type --
#include "bli_mutex.h"
#include "bli_malloc.h"
// -- Memory broker object type --
#include <pthread.h>
#include "bli_malloc.h"
typedef struct membrk_s
{
pool_t pools[3];
mtx_t mutex;
pool_t pools[3];
pthread_mutex_t mutex;
malloc_ft malloc_fp;
free_ft free_fp;
malloc_ft malloc_fp;
free_ft free_fp;
} membrk_t;

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2017, Advanced Micro Devices, Inc.
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -178,11 +178,23 @@ void bli_l3_ind_set_enable_dt( ind_t method, num_t dt, bool_t status )
void bli_l3_ind_oper_enable_only( opid_t oper, ind_t method, num_t dt )
{
ind_t im;
if ( !bli_is_complex( dt ) ) return;
if ( !bli_opid_is_level3( oper ) ) return;
bli_l3_ind_oper_set_enable_all( oper, dt, FALSE );
bli_l3_ind_oper_set_enable( oper, method, dt, TRUE );
for ( im = 0; im < BLIS_NUM_IND_METHODS; ++im )
{
// Native execution should always stay enabled.
if ( im == BLIS_NAT ) continue;
// When we come upon the requested method, enable it for the given
// operation and datatype. Otherwise, disable it.
if ( im == method )
bli_l3_ind_oper_set_enable( oper, im, dt, TRUE );
else
bli_l3_ind_oper_set_enable( oper, im, dt, FALSE );
}
}
void bli_l3_ind_oper_set_enable_all( opid_t oper, num_t dt, bool_t status )
@@ -202,9 +214,8 @@ void bli_l3_ind_oper_set_enable_all( opid_t oper, num_t dt, bool_t status )
// -----------------------------------------------------------------------------
#ifdef BLIS_ENABLE_PTHREADS
static pthread_mutex_t l3_ind_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
// A mutex to allow synchronous access to the bli_l3_ind_oper_st array.
static pthread_mutex_t oper_st_mutex = PTHREAD_MUTEX_INITIALIZER;
void bli_l3_ind_oper_set_enable( opid_t oper, ind_t method, num_t dt, bool_t status )
{
@@ -218,12 +229,8 @@ void bli_l3_ind_oper_set_enable( opid_t oper, ind_t method, num_t dt, bool_t sta
idt = bli_ind_map_cdt_to_index( dt );
#ifdef BLIS_ENABLE_OPENMP
_Pragma( "omp critical (l3_ind)" )
#endif
#ifdef BLIS_ENABLE_PTHREADS
pthread_mutex_lock( &l3_ind_mutex );
#endif
// Acquire the mutex protecting bli_l3_ind_oper_st.
pthread_mutex_lock( &oper_st_mutex );
// BEGIN CRITICAL SECTION
{
@@ -231,9 +238,8 @@ void bli_l3_ind_oper_set_enable( opid_t oper, ind_t method, num_t dt, bool_t sta
}
// END CRITICAL SECTION
#ifdef BLIS_ENABLE_PTHREADS
pthread_mutex_unlock( &l3_ind_mutex );
#endif
// Release the mutex protecting bli_l3_ind_oper_st.
pthread_mutex_unlock( &oper_st_mutex );
}
bool_t bli_l3_ind_oper_get_enable( opid_t oper, ind_t method, num_t dt )

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -38,13 +39,9 @@ thrinfo_t BLIS_PACKM_SINGLE_THREADED = {};
thrinfo_t BLIS_GEMM_SINGLE_THREADED = {};
thrcomm_t BLIS_SINGLE_COMM = {};
// The global rntm_t structure, which holds the global thread
// settings.
// The global rntm_t structure, which holds the global thread settings.
static rntm_t global_rntm;
// A mutex to allow synchronous access to the global rntm_t structure.
static mtx_t global_rntm_mutex;
// -----------------------------------------------------------------------------
void bli_thread_init( void )
@@ -53,9 +50,6 @@ void bli_thread_init( void )
bli_packm_thrinfo_init_single( &BLIS_PACKM_SINGLE_THREADED );
bli_l3_thrinfo_init_single( &BLIS_GEMM_SINGLE_THREADED );
// Initialize the mutex protecting global_rntm.
bli_mutex_init( &global_rntm_mutex );
// Read the environment variables and use them to initialize the
// global runtime object.
bli_thread_init_rntm_from_env( &global_rntm );
@@ -63,7 +57,6 @@ void bli_thread_init( void )
void bli_thread_finalize( void )
{
bli_mutex_finalize( &global_rntm_mutex );
}
// -----------------------------------------------------------------------------
@@ -1302,32 +1295,29 @@ dim_t bli_thread_get_num_threads( void )
// ----------------------------------------------------------------------------
// A mutex to allow synchronous access to global_rntm.
static pthread_mutex_t global_rntm_mutex = PTHREAD_MUTEX_INITIALIZER;
void bli_thread_set_ways( dim_t jc, dim_t pc, dim_t ic, dim_t jr, dim_t ir )
{
// We must ensure that global_rntm_mutex has been initialized.
bli_init_once();
// Acquire the mutex protecting global_rntm.
bli_mutex_lock( &global_rntm_mutex );
pthread_mutex_lock( &global_rntm_mutex );
bli_rntm_set_ways_only( jc, pc, ic, jr, ir, &global_rntm );
// Release the mutex protecting global_rntm.
bli_mutex_unlock( &global_rntm_mutex );
pthread_mutex_unlock( &global_rntm_mutex );
}
void bli_thread_set_num_threads( dim_t n_threads )
{
// We must ensure that global_rntm_mutex has been initialized.
bli_init_once();
// Acquire the mutex protecting global_rntm.
bli_mutex_lock( &global_rntm_mutex );
pthread_mutex_lock( &global_rntm_mutex );
bli_rntm_set_num_threads_only( n_threads, &global_rntm );
// Release the mutex protecting global_rntm.
bli_mutex_unlock( &global_rntm_mutex );
pthread_mutex_unlock( &global_rntm_mutex );
}
// ----------------------------------------------------------------------------
@@ -1335,12 +1325,12 @@ void bli_thread_set_num_threads( dim_t n_threads )
void bli_thread_init_rntm( rntm_t* rntm )
{
// Acquire the mutex protecting global_rntm.
bli_mutex_lock( &global_rntm_mutex );
pthread_mutex_lock( &global_rntm_mutex );
*rntm = global_rntm;
// Release the mutex protecting global_rntm.
bli_mutex_unlock( &global_rntm_mutex );
pthread_mutex_unlock( &global_rntm_mutex );
}
// ----------------------------------------------------------------------------

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -6,6 +6,7 @@
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2016, Hewlett Packard Enterprise Development LP
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

View File

@@ -28,7 +28,7 @@ sdcz # Datatype(s) to test:
100 # Problem size: first to test
500 # Problem size: maximum to test
100 # Problem size: increment between experiments
# Complex level-3 implementations to test
# Complex level-3 implementations to test:
0 # 3mh ('1' = enable; '0' = disable)
0 # 3m1 ('1' = enable; '0' = disable)
0 # 4mh ('1' = enable; '0' = disable)
@@ -36,6 +36,9 @@ sdcz # Datatype(s) to test:
0 # 4m1a ('1' = enable; '0' = disable)
1 # 1m ('1' = enable; '0' = disable)
1 # native ('1' = enable; '0' = disable)
1 # Simulate application-level threading:
# '1' = disable / use one testsuite thread;
# 'n' = enable and use n testsuite threads
1 # Error-checking level:
# '0' = disable error checking; '1' = full error checking
i # Reaction to test failure:

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_addm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -86,18 +88,20 @@ void libblis_test_addm_check
void libblis_test_addm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setm( params, &(op->ops->setm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_setm( tdata, params, &(op->ops->setm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
}
void libblis_test_addm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -111,12 +115,13 @@ void libblis_test_addm
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_addm_deps( params, op );
if ( TRUE ) libblis_test_addm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_addm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_addv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -85,18 +87,20 @@ void libblis_test_addv_check
void libblis_test_addv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
}
void libblis_test_addv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -110,12 +114,13 @@ void libblis_test_addv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_addv_deps( params, op );
if ( TRUE ) libblis_test_addv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_addv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_amaxv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -90,17 +92,19 @@ void bli_amaxv_test
void libblis_test_amaxv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
}
void libblis_test_amaxv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -114,12 +118,13 @@ void libblis_test_amaxv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_amaxv_deps( params, op );
if ( TRUE ) libblis_test_amaxv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_amaxv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_axpbyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -89,25 +91,27 @@ void libblis_test_axpbyv_check
void libblis_test_axpbyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_addv( params, &(op->ops->addv) );
libblis_test_axpyv( params, &(op->ops->axpyv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_scal2v( params, &(op->ops->scal2v) );
libblis_test_xpbyv( params, &(op->ops->xpbyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_addv( tdata, params, &(op->ops->addv) );
libblis_test_axpyv( tdata, params, &(op->ops->axpyv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_scal2v( tdata, params, &(op->ops->scal2v) );
libblis_test_xpbyv( tdata, params, &(op->ops->xpbyv) );
}
void libblis_test_axpbyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -121,12 +125,13 @@ void libblis_test_axpbyv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_axpbyv_deps( params, op );
if ( TRUE ) libblis_test_axpbyv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_axpbyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_axpy2v_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -92,22 +94,24 @@ void libblis_test_axpy2v_check
void libblis_test_axpy2v_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_addv( params, &(op->ops->addv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_addv( tdata, params, &(op->ops->addv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
}
void libblis_test_axpy2v
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -121,12 +125,13 @@ void libblis_test_axpy2v
libblis_test_l1f_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_axpy2v_deps( params, op );
if ( TRUE ) libblis_test_axpy2v_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_axpy2v
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_axpyf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -90,22 +92,24 @@ void libblis_test_axpyf_check
void libblis_test_axpyf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_axpyv( params, &(op->ops->axpyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_axpyv( tdata, params, &(op->ops->axpyv) );
}
void libblis_test_axpyf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -119,12 +123,13 @@ void libblis_test_axpyf
libblis_test_l1f_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_axpyf_deps( params, op );
if ( TRUE ) libblis_test_axpyf_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_axpyf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_axpym_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -87,22 +89,24 @@ void libblis_test_axpym_check
void libblis_test_axpym_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_addm( params, &(op->ops->addm) );
libblis_test_subm( params, &(op->ops->subm) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
libblis_test_addm( tdata, params, &(op->ops->addm) );
libblis_test_subm( tdata, params, &(op->ops->subm) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
}
void libblis_test_axpym
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -116,12 +120,13 @@ void libblis_test_axpym
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_axpym_deps( params, op );
if ( TRUE ) libblis_test_axpym_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_axpym
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_axpyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -87,22 +89,24 @@ void libblis_test_axpyv_check
void libblis_test_axpyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_addv( params, &(op->ops->addv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_addv( tdata, params, &(op->ops->addv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
}
void libblis_test_axpyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -116,12 +120,13 @@ void libblis_test_axpyv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_axpyv_deps( params, op );
if ( TRUE ) libblis_test_axpyv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_axpyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_copym_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -84,19 +86,21 @@ void libblis_test_copym_check
void libblis_test_copym_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_subm( params, &(op->ops->subm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_subm( tdata, params, &(op->ops->subm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
}
void libblis_test_copym
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -110,12 +114,13 @@ void libblis_test_copym
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_copym_deps( params, op );
if ( TRUE ) libblis_test_copym_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_copym
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_copyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -84,19 +86,21 @@ void libblis_test_copyv_check
void libblis_test_copyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
}
void libblis_test_copyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -110,12 +114,13 @@ void libblis_test_copyv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_copyv_deps( params, op );
if ( TRUE ) libblis_test_copyv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_copyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_dotaxpyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -94,22 +96,24 @@ void libblis_test_dotaxpyv_check
void libblis_test_dotaxpyv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_dotv( params, &(op->ops->dotv) );
libblis_test_axpyv( params, &(op->ops->axpyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_dotv( tdata, params, &(op->ops->dotv) );
libblis_test_axpyv( tdata, params, &(op->ops->axpyv) );
}
void libblis_test_dotaxpyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -123,12 +127,13 @@ void libblis_test_dotaxpyv
libblis_test_l1f_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_dotaxpyv_deps( params, op );
if ( TRUE ) libblis_test_dotaxpyv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_dotaxpyv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_dotv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -86,19 +88,21 @@ void libblis_test_dotv_check
void libblis_test_dotv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
}
void libblis_test_dotv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -112,12 +116,13 @@ void libblis_test_dotv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_dotv_deps( params, op );
if ( TRUE ) libblis_test_dotv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_dotv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_dotxaxpyf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -99,23 +101,25 @@ void libblis_test_dotxaxpyf_check
void libblis_test_dotxaxpyf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_axpyv( params, &(op->ops->axpyv) );
libblis_test_dotxv( params, &(op->ops->dotxv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_axpyv( tdata, params, &(op->ops->axpyv) );
libblis_test_dotxv( tdata, params, &(op->ops->dotxv) );
}
void libblis_test_dotxaxpyf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -129,12 +133,13 @@ void libblis_test_dotxaxpyf
libblis_test_l1f_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_dotxaxpyf_deps( params, op );
if ( TRUE ) libblis_test_dotxaxpyf_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_dotxaxpyf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 5e-04, 5e-05 }, // warn, pass
// Local prototypes.
void libblis_test_dotxf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -92,22 +94,24 @@ void libblis_test_dotxf_check
void libblis_test_dotxf_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_dotxv( params, &(op->ops->dotxv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_dotxv( tdata, params, &(op->ops->dotxv) );
}
void libblis_test_dotxf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -121,12 +125,13 @@ void libblis_test_dotxf
libblis_test_l1f_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_dotxf_deps( params, op );
if ( TRUE ) libblis_test_dotxf_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_dotxf
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_dotxv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -91,19 +93,21 @@ void libblis_test_dotxv_check
void libblis_test_dotxv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
}
void libblis_test_dotxv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -117,12 +121,13 @@ void libblis_test_dotxv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_dotxv_deps( params, op );
if ( TRUE ) libblis_test_dotxv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_dotxv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_gemm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -91,25 +93,27 @@ void libblis_test_gemm_check
void libblis_test_gemm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_gemm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -123,12 +127,13 @@ void libblis_test_gemm
libblis_test_l3_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_gemm_deps( params, op );
if ( TRUE ) libblis_test_gemm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_gemm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_gemm_ukr_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -92,25 +94,27 @@ void libblis_test_gemm_ukr_check
void libblis_test_gemm_ukr_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_gemm_ukr
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -124,12 +128,13 @@ void libblis_test_gemm_ukr
libblis_test_l3ukr_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_gemm_ukr_deps( params, op );
if ( TRUE ) libblis_test_gemm_ukr_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_UKERNEL,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_gemm_ukr
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_gemmtrsm_ukr_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -106,26 +108,28 @@ void bli_gemmtrsm_ukr_make_subparts
void libblis_test_gemmtrsm_ukr_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_trsv( params, &(op->ops->trsv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
libblis_test_trsv( tdata, params, &(op->ops->trsv) );
}
void libblis_test_gemmtrsm_ukr
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -139,12 +143,13 @@ void libblis_test_gemmtrsm_ukr
libblis_test_l3ukr_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_gemmtrsm_ukr_deps( params, op );
if ( TRUE ) libblis_test_gemmtrsm_ukr_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_UKERNEL,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_gemmtrsm_ukr
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_gemv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -92,21 +94,23 @@ void libblis_test_gemv_check
void libblis_test_gemv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
}
void libblis_test_gemv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -120,12 +124,13 @@ void libblis_test_gemv
libblis_test_l2_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_gemv_deps( params, op );
if ( TRUE ) libblis_test_gemv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_gemv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_ger_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -89,22 +91,24 @@ void libblis_test_ger_check
void libblis_test_ger_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scal2v( params, &(op->ops->scal2v) );
libblis_test_dotv( params, &(op->ops->dotv) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scal2v( tdata, params, &(op->ops->scal2v) );
libblis_test_dotv( tdata, params, &(op->ops->dotv) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_ger
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -118,12 +122,13 @@ void libblis_test_ger
libblis_test_l2_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_ger_deps( params, op );
if ( TRUE ) libblis_test_ger_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_ger
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_hemm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -93,26 +95,28 @@ void libblis_test_hemm_check
void libblis_test_hemm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_hemv( params, &(op->ops->hemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
libblis_test_hemv( tdata, params, &(op->ops->hemv) );
}
void libblis_test_hemm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -126,12 +130,13 @@ void libblis_test_hemm
libblis_test_l3_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_hemm_deps( params, op );
if ( TRUE ) libblis_test_hemm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_hemm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_hemv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -91,23 +93,25 @@ void libblis_test_hemv_check
void libblis_test_hemv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_hemv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -121,12 +125,13 @@ void libblis_test_hemv
libblis_test_l2_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_hemv_deps( params, op );
if ( TRUE ) libblis_test_hemv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_hemv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_her_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -87,24 +89,26 @@ void libblis_test_her_check
void libblis_test_her_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scal2v( params, &(op->ops->scal2v) );
libblis_test_dotv( params, &(op->ops->dotv) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scal2v( tdata, params, &(op->ops->scal2v) );
libblis_test_dotv( tdata, params, &(op->ops->dotv) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_her
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -118,12 +122,13 @@ void libblis_test_her
libblis_test_l2_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_her_deps( params, op );
if ( TRUE ) libblis_test_her_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_her
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_her2_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -89,24 +91,26 @@ void libblis_test_her2_check
void libblis_test_her2_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scal2v( params, &(op->ops->scal2v) );
libblis_test_dotv( params, &(op->ops->dotv) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scal2v( tdata, params, &(op->ops->scal2v) );
libblis_test_dotv( tdata, params, &(op->ops->dotv) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
}
void libblis_test_her2
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -120,12 +124,13 @@ void libblis_test_her2
libblis_test_l2_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_her2_deps( params, op );
if ( TRUE ) libblis_test_her2_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_her2
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_her2k_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -91,26 +93,28 @@ void libblis_test_her2k_check
void libblis_test_her2k_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_hemv( params, &(op->ops->hemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
libblis_test_hemv( tdata, params, &(op->ops->hemv) );
}
void libblis_test_her2k
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -124,12 +128,13 @@ void libblis_test_her2k
libblis_test_l3_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_her2k_deps( params, op );
if ( TRUE ) libblis_test_her2k_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_her2k
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_herk_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -89,26 +91,28 @@ void libblis_test_herk_check
void libblis_test_herk_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_hemv( params, &(op->ops->hemv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
libblis_test_hemv( tdata, params, &(op->ops->hemv) );
}
void libblis_test_herk
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -122,12 +126,13 @@ void libblis_test_herk
libblis_test_l3_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_herk_deps( params, op );
if ( TRUE ) libblis_test_herk_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_herk
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -70,27 +71,10 @@ int main( int argc, char** argv )
// Read the operations parameter file.
libblis_test_read_ops_file( libblis_test_operations_filename, &ops );
// Test the utility operations.
libblis_test_utility_ops( &params, &ops );
// Test the level-1v operations.
libblis_test_level1v_ops( &params, &ops );
// Test the level-1m operations.
libblis_test_level1m_ops( &params, &ops );
// Test the level-1f operations.
libblis_test_level1f_ops( &params, &ops );
// Test the level-2 operations.
libblis_test_level2_ops( &params, &ops );
// Test the level-3 micro-kernels.
libblis_test_level3_ukrs( &params, &ops );
// Test the level-3 operations.
libblis_test_level3_ops( &params, &ops );
// Walk through all test modules.
//libblis_test_all_ops( &params, &ops );
libblis_test_thread_decorator( &params, &ops );
// Finalize libblis.
//bli_finalize();
@@ -100,96 +84,213 @@ int main( int argc, char** argv )
}
void libblis_test_utility_ops( test_params_t* params, test_ops_t* ops )
#if 0
typedef struct thread_data
{
libblis_test_randv( params, &(ops->randv) );
libblis_test_randm( params, &(ops->randm) );
test_params_t* params;
test_ops_t* ops;
unsigned int nt;
unsigned int id;
unsigned int xc;
//pthread_mutex_t* mutex;
pthread_barrier_t* barrier;
} thread_data_t;
#endif
void* libblis_test_thread_entry( void* tdata_void )
{
thread_data_t* tdata = tdata_void;
test_params_t* params = tdata->params;
test_ops_t* ops = tdata->ops;
// Walk through all test modules.
libblis_test_all_ops( tdata, params, ops );
return NULL;
}
void libblis_test_level1v_ops( test_params_t* params, test_ops_t* ops )
void libblis_test_thread_decorator( test_params_t* params, test_ops_t* ops )
{
libblis_test_addv( params, &(ops->addv) );
libblis_test_amaxv( params, &(ops->amaxv) );
libblis_test_axpbyv( params, &(ops->axpbyv) );
libblis_test_axpyv( params, &(ops->axpyv) );
libblis_test_copyv( params, &(ops->copyv) );
libblis_test_dotv( params, &(ops->dotv) );
libblis_test_dotxv( params, &(ops->dotxv) );
libblis_test_normfv( params, &(ops->normfv) );
libblis_test_scalv( params, &(ops->scalv) );
libblis_test_scal2v( params, &(ops->scal2v) );
libblis_test_setv( params, &(ops->setv) );
libblis_test_subv( params, &(ops->subv) );
libblis_test_xpbyv( params, &(ops->xpbyv) );
// Query the total number of threads to simulate.
size_t nt = ( size_t )params->n_app_threads;
// Allocate an array of pthread objects and auxiliary data structs to pass
// to the thread entry functions.
pthread_t* pthread = bli_malloc_intl( sizeof( pthread_t ) * nt );
thread_data_t* tdata = bli_malloc_intl( sizeof( thread_data_t ) * nt );
// Allocate a mutex for the threads to share.
//pthread_mutex_t* mutex = bli_malloc_intl( sizeof( pthread_mutex_t ) );
// Allocate a barrier for the threads to share.
pthread_barrier_t* barrier = bli_malloc_intl( sizeof( pthread_barrier_t ) );
// Initialize the mutex.
//pthread_mutex_init( mutex, NULL );
// Initialize the barrier for nt threads.
pthread_barrier_init( barrier, NULL, nt );
// NOTE: We must iterate backwards so that the chief thread (thread id 0)
// can spawn all other threads before proceeding with its own computation.
// ALSO: Since we need to let the counter go negative, id must be a signed
// integer here.
for ( signed int id = nt - 1; 0 <= id; id-- )
{
tdata[id].params = params;
tdata[id].ops = ops;
tdata[id].nt = nt;
tdata[id].id = id;
tdata[id].xc = 0;
//tdata[id].mutex = mutex;
tdata[id].barrier = barrier;
// Spawn additional threads for ids greater than 1.
if ( id != 0 )
pthread_create( &pthread[id], NULL, libblis_test_thread_entry, &tdata[id] );
else
libblis_test_thread_entry( ( void* )(&tdata[0]) );
}
// Thread 0 waits for additional threads to finish.
for ( unsigned int id = 1; id < nt; id++ )
{
pthread_join( pthread[id], NULL );
}
// Destroy the mutex.
//pthread_mutex_destroy( mutex );
// Destroy the barrier.
pthread_barrier_destroy( barrier );
// Free the pthread-related memory.
bli_free_intl( pthread );
bli_free_intl( tdata );
//bli_free_intl( mutex );
bli_free_intl( barrier );
}
void libblis_test_level1m_ops( test_params_t* params, test_ops_t* ops )
void libblis_test_all_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_addm( params, &(ops->addm) );
libblis_test_axpym( params, &(ops->axpym) );
libblis_test_copym( params, &(ops->copym) );
libblis_test_normfm( params, &(ops->normfm) );
libblis_test_scalm( params, &(ops->scalm) );
libblis_test_scal2m( params, &(ops->scal2m) );
libblis_test_setm( params, &(ops->setm) );
libblis_test_subm( params, &(ops->subm) );
// Test the utility operations.
libblis_test_utility_ops( tdata, params, ops );
// Test the level-1v operations.
libblis_test_level1v_ops( tdata, params, ops );
// Test the level-1m operations.
libblis_test_level1m_ops( tdata, params, ops );
// Test the level-1f operations.
libblis_test_level1f_ops( tdata, params, ops );
// Test the level-2 operations.
libblis_test_level2_ops( tdata, params, ops );
// Test the level-3 micro-kernels.
libblis_test_level3_ukrs( tdata, params, ops );
// Test the level-3 operations.
libblis_test_level3_ops( tdata, params, ops );
}
void libblis_test_level1f_ops( test_params_t* params, test_ops_t* ops )
void libblis_test_utility_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_axpy2v( params, &(ops->axpy2v) );
libblis_test_dotaxpyv( params, &(ops->dotaxpyv) );
libblis_test_axpyf( params, &(ops->axpyf) );
libblis_test_dotxf( params, &(ops->dotxf) );
libblis_test_dotxaxpyf( params, &(ops->dotxaxpyf) );
libblis_test_randv( tdata, params, &(ops->randv) );
libblis_test_randm( tdata, params, &(ops->randm) );
}
void libblis_test_level2_ops( test_params_t* params, test_ops_t* ops )
void libblis_test_level1v_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemv( params, &(ops->gemv) );
libblis_test_ger( params, &(ops->ger) );
libblis_test_hemv( params, &(ops->hemv) );
libblis_test_her( params, &(ops->her) );
libblis_test_her2( params, &(ops->her2) );
libblis_test_symv( params, &(ops->symv) );
libblis_test_syr( params, &(ops->syr) );
libblis_test_syr2( params, &(ops->syr2) );
libblis_test_trmv( params, &(ops->trmv) );
libblis_test_trsv( params, &(ops->trsv) );
libblis_test_addv( tdata, params, &(ops->addv) );
libblis_test_amaxv( tdata, params, &(ops->amaxv) );
libblis_test_axpbyv( tdata, params, &(ops->axpbyv) );
libblis_test_axpyv( tdata, params, &(ops->axpyv) );
libblis_test_copyv( tdata, params, &(ops->copyv) );
libblis_test_dotv( tdata, params, &(ops->dotv) );
libblis_test_dotxv( tdata, params, &(ops->dotxv) );
libblis_test_normfv( tdata, params, &(ops->normfv) );
libblis_test_scalv( tdata, params, &(ops->scalv) );
libblis_test_scal2v( tdata, params, &(ops->scal2v) );
libblis_test_setv( tdata, params, &(ops->setv) );
libblis_test_subv( tdata, params, &(ops->subv) );
libblis_test_xpbyv( tdata, params, &(ops->xpbyv) );
}
void libblis_test_level3_ukrs( test_params_t* params, test_ops_t* ops )
void libblis_test_level1m_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemm_ukr( params, &(ops->gemm_ukr) );
libblis_test_trsm_ukr( params, &(ops->trsm_ukr) );
libblis_test_gemmtrsm_ukr( params, &(ops->gemmtrsm_ukr) );
libblis_test_addm( tdata, params, &(ops->addm) );
libblis_test_axpym( tdata, params, &(ops->axpym) );
libblis_test_copym( tdata, params, &(ops->copym) );
libblis_test_normfm( tdata, params, &(ops->normfm) );
libblis_test_scalm( tdata, params, &(ops->scalm) );
libblis_test_scal2m( tdata, params, &(ops->scal2m) );
libblis_test_setm( tdata, params, &(ops->setm) );
libblis_test_subm( tdata, params, &(ops->subm) );
}
void libblis_test_level3_ops( test_params_t* params, test_ops_t* ops )
void libblis_test_level1f_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemm( params, &(ops->gemm) );
libblis_test_hemm( params, &(ops->hemm) );
libblis_test_herk( params, &(ops->herk) );
libblis_test_her2k( params, &(ops->her2k) );
libblis_test_symm( params, &(ops->symm) );
libblis_test_syrk( params, &(ops->syrk) );
libblis_test_syr2k( params, &(ops->syr2k) );
libblis_test_trmm( params, &(ops->trmm) );
libblis_test_trmm3( params, &(ops->trmm3) );
libblis_test_trsm( params, &(ops->trsm) );
libblis_test_axpy2v( tdata, params, &(ops->axpy2v) );
libblis_test_dotaxpyv( tdata, params, &(ops->dotaxpyv) );
libblis_test_axpyf( tdata, params, &(ops->axpyf) );
libblis_test_dotxf( tdata, params, &(ops->dotxf) );
libblis_test_dotxaxpyf( tdata, params, &(ops->dotxaxpyf) );
}
void libblis_test_level2_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemv( tdata, params, &(ops->gemv) );
libblis_test_ger( tdata, params, &(ops->ger) );
libblis_test_hemv( tdata, params, &(ops->hemv) );
libblis_test_her( tdata, params, &(ops->her) );
libblis_test_her2( tdata, params, &(ops->her2) );
libblis_test_symv( tdata, params, &(ops->symv) );
libblis_test_syr( tdata, params, &(ops->syr) );
libblis_test_syr2( tdata, params, &(ops->syr2) );
libblis_test_trmv( tdata, params, &(ops->trmv) );
libblis_test_trsv( tdata, params, &(ops->trsv) );
}
void libblis_test_level3_ukrs( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemm_ukr( tdata, params, &(ops->gemm_ukr) );
libblis_test_trsm_ukr( tdata, params, &(ops->trsm_ukr) );
libblis_test_gemmtrsm_ukr( tdata, params, &(ops->gemmtrsm_ukr) );
}
void libblis_test_level3_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops )
{
libblis_test_gemm( tdata, params, &(ops->gemm) );
libblis_test_hemm( tdata, params, &(ops->hemm) );
libblis_test_herk( tdata, params, &(ops->herk) );
libblis_test_her2k( tdata, params, &(ops->her2k) );
libblis_test_symm( tdata, params, &(ops->symm) );
libblis_test_syrk( tdata, params, &(ops->syrk) );
libblis_test_syr2k( tdata, params, &(ops->syr2k) );
libblis_test_trmm( tdata, params, &(ops->trmm) );
libblis_test_trmm3( tdata, params, &(ops->trmm3) );
libblis_test_trsm( tdata, params, &(ops->trsm) );
}
@@ -429,6 +530,39 @@ void libblis_test_read_params_file( char* input_filename, test_params_t* params
libblis_test_read_next_line( buffer, input_stream );
sscanf( buffer, "%u ", &(params->ind_enable[ BLIS_NAT ]) );
// Read whether to simulate application-level threading.
libblis_test_read_next_line( buffer, input_stream );
sscanf( buffer, "%u ", &(params->n_app_threads) );
// Silently interpret non-positive numbers the same as 1.
if ( params->n_app_threads < 1 ) params->n_app_threads = 1;
// Disable induced methods when simulating more than one application
// threads.
if ( params->n_app_threads > 1 )
{
if ( params->ind_enable[ BLIS_3MH ] ||
params->ind_enable[ BLIS_3M1 ] ||
params->ind_enable[ BLIS_4MH ] ||
params->ind_enable[ BLIS_4M1B ] ||
params->ind_enable[ BLIS_4M1A ] ||
params->ind_enable[ BLIS_1M ]
)
{
// Due to an inherent race condition in the way induced methods
// are enabled and disabled at runtime, all induced methods must be
// disabled when simulating multiple application threads.
libblis_test_printf_infoc( "simulating multiple application threads; disabling induced methods.\n" );
params->ind_enable[ BLIS_3MH ] = 0;
params->ind_enable[ BLIS_3M1 ] = 0;
params->ind_enable[ BLIS_4MH ] = 0;
params->ind_enable[ BLIS_4M1B ] = 0;
params->ind_enable[ BLIS_4M1A ] = 0;
params->ind_enable[ BLIS_1M ] = 0;
}
}
// Read the requested error-checking level.
libblis_test_read_next_line( buffer, input_stream );
sscanf( buffer, "%u ", &(params->error_checking_level) );
@@ -950,6 +1084,7 @@ void libblis_test_output_params_struct( FILE* os, test_params_t* params )
libblis_test_fprintf_c( os, " 4m1a (4m1)? %u\n", params->ind_enable[ BLIS_4M1A ] );
libblis_test_fprintf_c( os, " 1m? %u\n", params->ind_enable[ BLIS_1M ] );
libblis_test_fprintf_c( os, " native? %u\n", params->ind_enable[ BLIS_NAT ] );
libblis_test_fprintf_c( os, "simulated app-level threads %u\n", params->n_app_threads );
libblis_test_fprintf_c( os, "error-checking level %u\n", params->error_checking_level );
libblis_test_fprintf_c( os, "reaction to failure %c\n", params->reaction_to_failure );
libblis_test_fprintf_c( os, "output in matlab format? %u\n", params->output_matlab_format );
@@ -1219,7 +1354,8 @@ void carryover( unsigned int* c,
void libblis_test_op_driver( test_params_t* params,
void libblis_test_op_driver( thread_data_t* tdata,
test_params_t* params,
test_op_t* op,
iface_t iface,
char* op_str,
@@ -1447,23 +1583,27 @@ void libblis_test_op_driver( test_params_t* params,
// Output a heading and the contents of the op struct.
libblis_test_fprintf_c( stdout, "--- %s ---\n", op_str );
libblis_test_fprintf_c( stdout, "\n" );
libblis_test_output_op_struct( stdout, op, op_str );
// Also output to a matlab file if requested (and successfully opened).
if ( output_stream )
// These statements should only be executed by one thread.
if ( tdata->id == 0 )
{
// For file output, we also include the contents of the global
// parameter struct. We do this per operation so that the parameters
// are included in each file, whereas we only output it once to
// stdout (at the end of libblis_test_read_parameter_file()).
libblis_test_output_params_struct( output_stream, params );
// Output a heading and the contents of the op struct.
libblis_test_fprintf_c( stdout, "--- %s ---\n", op_str );
libblis_test_fprintf_c( stdout, "\n" );
libblis_test_output_op_struct( stdout, op, op_str );
libblis_test_fprintf_c( output_stream, "--- %s ---\n", op_str );
libblis_test_fprintf_c( output_stream, "\n" );
libblis_test_output_op_struct( output_stream, op, op_str );
// Also output to a matlab file if requested (and successfully opened).
if ( output_stream )
{
// For file output, we also include the contents of the global
// parameter struct. We do this per operation so that the parameters
// are included in each file, whereas we only output it once to
// stdout (at the end of libblis_test_read_parameter_file()).
libblis_test_output_params_struct( output_stream, params );
libblis_test_fprintf_c( output_stream, "--- %s ---\n", op_str );
libblis_test_fprintf_c( output_stream, "\n" );
libblis_test_output_op_struct( output_stream, op, op_str );
}
}
@@ -1479,13 +1619,17 @@ void libblis_test_op_driver( test_params_t* params,
// Build a commented column label string.
libblis_test_build_col_labels_string( params, op, label_str );
// Output the column label string.
libblis_test_fprintf( stdout, "%s\n", label_str );
// These statements should only be executed by one thread.
if ( tdata->id == 0 )
{
// Output the column label string.
libblis_test_fprintf( stdout, "%s\n", label_str );
// Also output to a matlab file if requested (and successfully
// opened).
if ( output_stream )
libblis_test_fprintf( output_stream, "%s\n", label_str );
// Also output to a matlab file if requested (and successfully
// opened).
if ( output_stream )
libblis_test_fprintf( output_stream, "%s\n", label_str );
}
// Start by assuming we will only test native execution.
ind_t ind_first = BLIS_NAT;
@@ -1522,6 +1666,17 @@ void libblis_test_op_driver( test_params_t* params,
// Loop over the requested problem sizes.
for ( p_cur = p_first, pi = 1; p_cur <= p_max; p_cur += p_inc, ++pi )
{
// Skip this experiment (for this problem size) according to
// to the counter, number of threads, and thread id.
if ( tdata->xc % tdata->nt != tdata->id )
{
tdata->xc++;
continue;
}
// Call the given experiment function. perf and resid will
// contain the resulting performance and residual values,
// respectively.
f_exp( params,
op,
iface,
@@ -1566,39 +1721,46 @@ void libblis_test_op_driver( test_params_t* params,
n_dims_print = libblis_test_get_n_dims_from_string( dims_str );
// Output the results of the test. Use matlab format if requested.
// NOTE: Here we use fprintf() over libblis_test_fprintf() so
// that on POSIX systems the output is not intermingled. If we
// used libblis_test_fprintf(), we would need to enclose this
// conditional with the acquisition of a mutex shared among all
// threads to prevent intermingled output.
if ( params->output_matlab_format )
{
libblis_test_fprintf( stdout,
"%s%s( %3u, 1:%u ) = [%s %7.2lf %8.2le ]; %c %s\n",
funcname_str, blank_str, pi, n_dims_print + 2,
dims_str, perf, resid,
OUTPUT_COMMENT_CHAR,
pass_str );
fprintf( stdout,
"%s%s( %3u, 1:%u ) = [%s %7.2lf %8.2le ]; %c %s\n",
funcname_str, blank_str, pi, n_dims_print + 2,
dims_str, perf, resid,
OUTPUT_COMMENT_CHAR,
pass_str );
// Also output to a file if requested (and successfully opened).
// Also output to a file if requested (and successfully
// opened).
if ( output_stream )
libblis_test_fprintf( output_stream,
"%s%s( %3u, 1:%u ) = [%s %7.2lf %8.2le ]; %c %s\n",
funcname_str, blank_str, pi, n_dims_print + 2,
dims_str, perf, resid,
OUTPUT_COMMENT_CHAR,
pass_str );
fprintf( output_stream,
"%s%s( %3u, 1:%u ) = [%s %7.2lf %8.2le ]; %c %s\n",
funcname_str, blank_str, pi, n_dims_print + 2,
dims_str, perf, resid,
OUTPUT_COMMENT_CHAR,
pass_str );
}
else
{
libblis_test_fprintf( stdout,
"%s%s %s %7.2lf %8.2le %s\n",
funcname_str, blank_str,
dims_str, perf, resid,
pass_str );
fprintf( stdout,
"%s%s %s %7.2lf %8.2le %s\n",
funcname_str, blank_str,
dims_str, perf, resid,
pass_str );
// Also output to a file if requested (and successfully opened).
// Also output to a file if requested (and successfully
// opened).
if ( output_stream )
libblis_test_fprintf( output_stream,
"%s%s %s %7.2lf %8.2le %s\n",
funcname_str, blank_str,
dims_str, perf, resid,
pass_str );
fprintf( output_stream,
"%s%s %s %7.2lf %8.2le %s\n",
funcname_str, blank_str,
dims_str, perf, resid,
pass_str );
}
// If we need to check whether to do something on failure,
@@ -1613,14 +1775,25 @@ void libblis_test_op_driver( test_params_t* params,
if ( strstr( pass_str, BLIS_TEST_FAIL_STRING ) == pass_str )
libblis_test_abort();
}
// Increment the experiment counter (regardless of whether
// the thread executed or skipped the current experiment).
tdata->xc += 1;
}
}
}
libblis_test_fprintf( stdout, "\n" );
// Wait for all other threads so that the output stays organized.
pthread_barrier_wait( tdata->barrier );
if ( output_stream )
libblis_test_fprintf( output_stream, "\n" );
// These statements should only be executed by one thread.
if ( tdata->id == 0 )
{
libblis_test_fprintf( stdout, "\n" );
if ( output_stream )
libblis_test_fprintf( output_stream, "\n" );
}
}
}

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -51,6 +52,9 @@
#include <unistd.h>
#endif
// For pthreads API.
#include <pthread.h>
//
// --- Constants and types -----------------------------------------------------
//
@@ -154,7 +158,6 @@ typedef enum
typedef struct
{
unsigned int n_repeats;
@@ -172,6 +175,7 @@ typedef struct
unsigned int p_max;
unsigned int p_inc;
unsigned int ind_enable[ BLIS_NUM_IND_METHODS ];
unsigned int n_app_threads;
char reaction_to_failure;
unsigned int output_matlab_format;
unsigned int output_files;
@@ -289,17 +293,33 @@ typedef struct
} thresh_t;
typedef struct thread_data
{
test_params_t* params;
test_ops_t* ops;
unsigned int nt;
unsigned int id;
unsigned int xc;
//pthread_mutex_t* mutex;
pthread_barrier_t* barrier;
} thread_data_t;
//
// --- Prototypes --------------------------------------------------------------
//
void libblis_test_utility_ops( test_params_t* params, test_ops_t* ops );
void libblis_test_level1m_ops( test_params_t* params, test_ops_t* ops );
void libblis_test_level1v_ops( test_params_t* params, test_ops_t* ops );
void libblis_test_level1f_ops( test_params_t* params, test_ops_t* ops );
void libblis_test_level2_ops( test_params_t* params, test_ops_t* ops );
void libblis_test_level3_ukrs( test_params_t* params, test_ops_t* ops );
void libblis_test_level3_ops( test_params_t* params, test_ops_t* ops );
void* libblis_test_thread_entry( void* tdata_void );
void libblis_test_thread_decorator( test_params_t* params, test_ops_t* ops );
void libblis_test_all_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_utility_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level1m_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level1v_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level1f_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level2_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level3_ukrs( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_level3_ops( thread_data_t* tdata, test_params_t* params, test_ops_t* ops );
void libblis_test_read_params_file( char* input_filename, test_params_t* params );
void libblis_test_read_ops_file( char* input_filename, test_ops_t* ops );
@@ -344,7 +364,8 @@ void carryover( unsigned int* c,
// --- Operation driver ---
void libblis_test_op_driver( test_params_t* params,
void libblis_test_op_driver( thread_data_t* tdata,
test_params_t* params,
test_op_t* op,
iface_t iface,
char* op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_normfm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -85,17 +87,19 @@ void libblis_test_normfm_check
void libblis_test_normfm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setm( params, &(op->ops->setm) );
libblis_test_setm( tdata, params, &(op->ops->setm) );
}
void libblis_test_normfm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -109,12 +113,13 @@ void libblis_test_normfm
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_normfm_deps( params, op );
if ( TRUE ) libblis_test_normfm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_normfm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_normfv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -85,17 +87,19 @@ void libblis_test_normfv_check
void libblis_test_normfv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
}
void libblis_test_normfv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -109,12 +113,13 @@ void libblis_test_normfv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_normfv_deps( params, op );
if ( TRUE ) libblis_test_normfv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_normfv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_randm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -82,6 +84,7 @@ void libblis_test_randm_check
void libblis_test_randm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -93,6 +96,7 @@ void libblis_test_randm_deps
void libblis_test_randm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -106,12 +110,13 @@ void libblis_test_randm
libblis_test_util_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_randm_deps( params, op );
if ( TRUE ) libblis_test_randm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_randm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_randv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -82,6 +84,7 @@ void libblis_test_randv_check
void libblis_test_randv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -93,6 +96,7 @@ void libblis_test_randv_deps
void libblis_test_randv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -106,12 +110,13 @@ void libblis_test_randv
libblis_test_util_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_randv_deps( params, op );
if ( TRUE ) libblis_test_randv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_randv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_scal2m_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -87,21 +89,23 @@ void libblis_test_scal2m_check
void libblis_test_scal2m_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_subm( params, &(op->ops->subm) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
libblis_test_subm( tdata, params, &(op->ops->subm) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
}
void libblis_test_scal2m
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -115,12 +119,13 @@ void libblis_test_scal2m
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_scal2m_deps( params, op );
if ( TRUE ) libblis_test_scal2m_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_scal2m
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_scal2v_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -87,21 +89,23 @@ void libblis_test_scal2v_check
void libblis_test_scal2v_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
}
void libblis_test_scal2v
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -115,12 +119,13 @@ void libblis_test_scal2v
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_scal2v_deps( params, op );
if ( TRUE ) libblis_test_scal2v_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_scal2v
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_scalm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -85,19 +87,21 @@ void libblis_test_scalm_check
void libblis_test_scalm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
}
void libblis_test_scalm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -111,12 +115,13 @@ void libblis_test_scalm
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_scalm_deps( params, op );
if ( TRUE ) libblis_test_scalm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_scalm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_scalv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -85,20 +87,22 @@ void libblis_test_scalv_check
void libblis_test_scalv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_addv( params, &(op->ops->addv) );
libblis_test_copyv( params, &(op->ops->copyv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_addv( tdata, params, &(op->ops->addv) );
libblis_test_copyv( tdata, params, &(op->ops->copyv) );
}
void libblis_test_scalv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -112,12 +116,13 @@ void libblis_test_scalv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_scalv_deps( params, op );
if ( TRUE ) libblis_test_scalv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_scalv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_setm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -84,17 +86,19 @@ void libblis_test_setm_check
void libblis_test_setm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randm) );
libblis_test_randv( tdata, params, &(op->ops->randm) );
}
void libblis_test_setm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -108,12 +112,13 @@ void libblis_test_setm
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_setm_deps( params, op );
if ( TRUE ) libblis_test_setm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_setm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_setv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -84,17 +86,19 @@ void libblis_test_setv_check
void libblis_test_setv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
}
void libblis_test_setv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -108,12 +112,13 @@ void libblis_test_setv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_setv_deps( params, op );
if ( TRUE ) libblis_test_setv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_setv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_subm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -86,18 +88,20 @@ void libblis_test_subm_check
void libblis_test_subm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setm( params, &(op->ops->setm) );
libblis_test_normfm( params, &(op->ops->normfm) );
libblis_test_setm( tdata, params, &(op->ops->setm) );
libblis_test_normfm( tdata, params, &(op->ops->normfm) );
}
void libblis_test_subm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -111,12 +115,13 @@ void libblis_test_subm
libblis_test_l1m_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_subm_deps( params, op );
if ( TRUE ) libblis_test_subm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_subm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_subv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -86,18 +88,20 @@ void libblis_test_subv_check
void libblis_test_subv_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
}
void libblis_test_subv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -111,12 +115,13 @@ void libblis_test_subv
libblis_test_l1v_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_subv_deps( params, op );
if ( TRUE ) libblis_test_subv_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,6 +35,7 @@
void libblis_test_subv
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);

View File

@@ -5,6 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018, Advanced Micro Devices, Inc.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -48,6 +49,7 @@ static thresh_t thresh[BLIS_NUM_FP_TYPES] = { { 1e-04, 1e-05 }, // warn, pass
// Local prototypes.
void libblis_test_symm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
);
@@ -93,26 +95,28 @@ void libblis_test_symm_check
void libblis_test_symm_deps
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
{
libblis_test_randv( params, &(op->ops->randv) );
libblis_test_randm( params, &(op->ops->randm) );
libblis_test_setv( params, &(op->ops->setv) );
libblis_test_normfv( params, &(op->ops->normfv) );
libblis_test_subv( params, &(op->ops->subv) );
libblis_test_scalv( params, &(op->ops->scalv) );
libblis_test_copym( params, &(op->ops->copym) );
libblis_test_scalm( params, &(op->ops->scalm) );
libblis_test_gemv( params, &(op->ops->gemv) );
libblis_test_symv( params, &(op->ops->symv) );
libblis_test_randv( tdata, params, &(op->ops->randv) );
libblis_test_randm( tdata, params, &(op->ops->randm) );
libblis_test_setv( tdata, params, &(op->ops->setv) );
libblis_test_normfv( tdata, params, &(op->ops->normfv) );
libblis_test_subv( tdata, params, &(op->ops->subv) );
libblis_test_scalv( tdata, params, &(op->ops->scalv) );
libblis_test_copym( tdata, params, &(op->ops->copym) );
libblis_test_scalm( tdata, params, &(op->ops->scalm) );
libblis_test_gemv( tdata, params, &(op->ops->gemv) );
libblis_test_symv( tdata, params, &(op->ops->symv) );
}
void libblis_test_symm
(
thread_data_t* tdata,
test_params_t* params,
test_op_t* op
)
@@ -126,12 +130,13 @@ void libblis_test_symm
libblis_test_l3_is_disabled( op ) ) return;
// Call dependencies first.
if ( TRUE ) libblis_test_symm_deps( params, op );
if ( TRUE ) libblis_test_symm_deps( tdata, params, op );
// Execute the test driver for each implementation requested.
//if ( op->front_seq == ENABLE )
{
libblis_test_op_driver( params,
libblis_test_op_driver( tdata,
params,
op,
BLIS_TEST_SEQ_FRONT_END,
op_str,

Some files were not shown because too many files have changed in this diff Show More