mirror of
https://github.com/amd/blis.git
synced 2026-05-26 07:25:28 +00:00
This is a fix to floating-point exception error for BLIS SGEMM with larger matrix sizes.
BUG No: CPUPL-197 fixed by Thangaraj Santanu The bli_clock_min_diff() function in BLIS assumed that if the time taken is greater than 1 hour then the reading must be wrong. However this is not the case in general, while the other checks such as time taken closer to zero or nsec is ofcourse valid. gerrit review: http://git.amd.com:8080/#/c/118694/1/frame/base/bli_clock.c Change-Id: I9dc313d7c5fdc20684f67a516bf3237de3e0694a
This commit is contained in:
@@ -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
|
||||
@@ -59,7 +60,9 @@ double bli_clock_min_diff( double time_min, double time_start )
|
||||
// - under a nanosecond
|
||||
// is actually garbled due to the clocks being taken too closely together.
|
||||
if ( time_min <= 0.0 ) time_min = time_min_prev;
|
||||
else if ( time_min > 3600.0 ) time_min = time_min_prev;
|
||||
// To genuinely measure time for an application taking more than an hour, the below
|
||||
// line is commented. If wrongly measuring higher time we could always use previous_min.
|
||||
/* else if ( time_min > 3600.0 ) time_min = time_min_prev; */
|
||||
else if ( time_min < 1.0e-9 ) time_min = time_min_prev;
|
||||
|
||||
return time_min;
|
||||
|
||||
Reference in New Issue
Block a user