diff options
author | Miao Wang <miaowang@google.com> | 2017-07-07 13:14:47 -0700 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2017-07-11 17:02:45 +0000 |
commit | 63e218cf529755feb3178f09e22feb4473d81466 (patch) | |
tree | 9069d806c5e60946f8280a2794e03a487d17853a /cpu_ref | |
parent | 56bb39fe6274b099522cff372dcab9482fc35e60 (diff) | |
download | rs-63e218cf529755feb3178f09e22feb4473d81466.tar.gz |
Make gemmlowp able to run with multi-threads.
- The most recent gemmlowp rebase changed the default value of
MaxNumThreads from 0 to 1, which means by default it is running
single-threaded.
- This change reset MaxNumThreads to 0 for BNNM Intrinsic.
Exempt-From-Owner-Approval: Only current owner is this a mailing list
android-renderscript-dev+review@google.com
And mailing lists aren't currently supported.
Test: mm
Test: Verified the performance increase is about 2~3X on sailfish.
Test: All BLAS CTS pass
Change-Id: I01dda1915f4d427547dbd907c4533771b7669593
Diffstat (limited to 'cpu_ref')
-rw-r--r-- | cpu_ref/rsCpuIntrinsicBLAS.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu_ref/rsCpuIntrinsicBLAS.cpp b/cpu_ref/rsCpuIntrinsicBLAS.cpp index 4b086341..d60a3b90 100644 --- a/cpu_ref/rsCpuIntrinsicBLAS.cpp +++ b/cpu_ref/rsCpuIntrinsicBLAS.cpp @@ -877,6 +877,10 @@ void RsdCpuScriptIntrinsicBLAS::kernelBNNM(size_t m, size_t n, size_t k, #endif // Using gemmlowp to calculate the low precision 8 bit GEMM. + // Set MaxNumThreads to 0. The value 0 lets the implementation query + // the system to determine the number of hardware threads + gemmlowp::eight_bit_int_gemm::SetMaxNumThreads(0); + bool transpose_a = true; bool transpose_b = false; bool transpose_c = true; |