* Added on-device reset for half

* run clang-format.

* test_half - Reset buffer with ushort rather than half type

* Half - update type in secondary reset kernel src

* Remove useless memset() calls.

* Add an option to still perform buffer resets on the host

* Check for program generation failure before attempting to create the kernel

* Don't exceed the range of a ushort when storing

* Appease clang-format

Co-authored-by: Joshua Luceno <joshualuceno@gmail.com>
Co-authored-by: taetenp <taet@holochip.com>
Co-authored-by: Chip Davis <chip@holochip.com>
This commit is contained in:
Steven Winston
2023-01-24 08:48:53 -08:00
committed by GitHub
parent 487dbd292e
commit 77e4fe5588
4 changed files with 1047 additions and 561 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -61,6 +61,7 @@ size_t gWorkGroupSize = 0;
bool gWimpyMode = false;
int gWimpyReductionFactor = 512;
int gTestDouble = 0;
bool gHostReset = false;
#if defined( __APPLE__ )
int gReportTimes = 1;

View File

@@ -69,6 +69,7 @@ extern size_t gMaxThreadGroupSize;
extern size_t gWorkGroupSize;
extern int gTestDouble;
extern int gReportTimes;
extern bool gHostReset;
// gWimpyMode indicates if we run the test in wimpy mode where we limit the
// size of 32 bit ranges to a much smaller set. This is meant to be used

View File

@@ -194,6 +194,8 @@ static int ParseArgs( int argc, const char **argv )
gReportTimes ^= 1;
break;
case 'r': gHostReset = true; break;
case 'w': // Wimpy mode
gWimpyMode = true;
break;
@@ -235,13 +237,17 @@ static int ParseArgs( int argc, const char **argv )
static void PrintUsage( void )
{
vlog( "%s [-dthw]: <optional: test names>\n", appName );
vlog( "\t\t-d\tToggle double precision testing (default: on if double supported)\n" );
vlog( "\t\t-t\tToggle reporting performance data.\n" );
vlog( "\t\t-w\tRun in wimpy mode\n" );
vlog( "\t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is 1-12, default factor(%u)\n", gWimpyReductionFactor);
vlog( "\t\t-h\tHelp\n" );
for( int i = 0; i < test_num; i++ )
vlog("%s [-dthw]: <optional: test names>\n", appName);
vlog("\t\t-d\tToggle double precision testing (default: on if double "
"supported)\n");
vlog("\t\t-t\tToggle reporting performance data.\n");
vlog("\t\t-r\tReset buffers on host instead of on device.\n");
vlog("\t\t-w\tRun in wimpy mode\n");
vlog("\t\t-[2^n]\tSet wimpy reduction factor, recommended range of n is "
"1-12, default factor(%u)\n",
gWimpyReductionFactor);
vlog("\t\t-h\tHelp\n");
for (int i = 0; i < test_num; i++)
{
vlog("\t\t%s\n", test_list[i].name );
}