For the sake of windows compatible, used "unsigned long long" to ensure 64-bit length
authorWang, Long <long1.wang@intel.com>
Wed, 20 Nov 2019 13:30:16 +0000 (21:30 +0800)
committerWang, Long <long1.wang@intel.com>
Wed, 20 Nov 2019 13:30:47 +0000 (21:30 +0800)
Signed-off-by: Wang, Long <long1.wang@intel.com>
kernel/x86_64/sgemm_kernel_16x4_skylakex.c
kernel/x86_64/sgemm_kernel_16x4_skylakex_2.c

index 31d82e3..4177ae2 100644 (file)
@@ -762,7 +762,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 int __attribute__ ((noinline))
 CNAME(BLASLONG m, BLASLONG n, BLASLONG k, float alpha, float * __restrict A, float * __restrict B, float * __restrict C, BLASLONG ldc)
 {
-       unsigned long M = m, N = n, K = k;
+       unsigned long long M = m, N = n, K = k;
        if (M == 0)
                return 0;
        if (N == 0)
@@ -1639,4 +1639,4 @@ void sgemm_kernel_direct (BLASLONG M, BLASLONG N, BLASLONG K, float * __restrict
                        STORE_SCALAR(0, 0);
                }
        }
-}
\ No newline at end of file
+}
index 95963c0..ee34175 100644 (file)
@@ -452,7 +452,7 @@ CNAME(BLASLONG m, BLASLONG n, BLASLONG k, float alpha, float * __restrict__ A, f
 
 int sgemm_kernel_direct_performant(BLASLONG M, BLASLONG N, BLASLONG K)
 {
-       unsigned long mnk = M * N * K;
+       unsigned long long mnk = M * N * K;
        /* large matrixes -> not performant */
        if (mnk >= 28 * 512 * 512)
                return 0;