mirror of
https://github.com/xiph/opus.git
synced 2025-05-15 16:08:30 +00:00
Adding option to disable int8 dot products
This commit is contained in:
parent
0b9f6bab81
commit
c1535c8ccf
4 changed files with 15 additions and 1 deletions
|
@ -73,6 +73,14 @@ AS_IF([test "$enable_assertions" = "yes"], [
|
||||||
AC_DEFINE([OP_ENABLE_ASSERTIONS], [1], [Enable assertions in code])
|
AC_DEFINE([OP_ENABLE_ASSERTIONS], [1], [Enable assertions in code])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([dot-product],
|
||||||
|
AS_HELP_STRING([--disable-dot-product], [Disable dot product implementation]),,
|
||||||
|
enable_dot_product=yes)
|
||||||
|
|
||||||
|
AS_IF([test "$enable_dot_product" = "no"], [
|
||||||
|
AC_DEFINE([DISABLE_DOT_PROD], [1], [Disable dot product instructions])
|
||||||
|
])
|
||||||
|
|
||||||
AS_CASE(["$ac_cv_search_lrintf"],
|
AS_CASE(["$ac_cv_search_lrintf"],
|
||||||
["no"],[],
|
["no"],[],
|
||||||
["none required"],[],
|
["none required"],[],
|
||||||
|
@ -114,8 +122,8 @@ AC_MSG_NOTICE([
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
$PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK.
|
$PACKAGE_NAME $PACKAGE_VERSION: Automatic configuration OK.
|
||||||
|
|
||||||
|
Dot product intrinsics ....... ${enable_dot_product}
|
||||||
Assertions ................... ${enable_assertions}
|
Assertions ................... ${enable_assertions}
|
||||||
|
|
||||||
Hidden visibility ............ ${cc_cv_flag_visibility}
|
Hidden visibility ............ ${cc_cv_flag_visibility}
|
||||||
|
|
||||||
API documentation ............ ${enable_doc}
|
API documentation ............ ${enable_doc}
|
||||||
|
|
|
@ -45,8 +45,10 @@
|
||||||
|
|
||||||
#define NO_OPTIMIZATIONS
|
#define NO_OPTIMIZATIONS
|
||||||
|
|
||||||
|
#ifndef DISABLE_DOT_PROD
|
||||||
#define DOT_PROD
|
#define DOT_PROD
|
||||||
//#define USE_SU_BIAS
|
//#define USE_SU_BIAS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DOT_PROD
|
#ifdef DOT_PROD
|
||||||
typedef signed char qweight;
|
typedef signed char qweight;
|
||||||
|
|
|
@ -34,8 +34,10 @@
|
||||||
|
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
||||||
|
#ifndef DISABLE_DOT_PROD
|
||||||
#define DOT_PROD
|
#define DOT_PROD
|
||||||
#define USE_SU_BIAS
|
#define USE_SU_BIAS
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __AVX2__
|
#ifdef __AVX2__
|
||||||
static inline __m256 exp8_approx(__m256 X)
|
static inline __m256 exp8_approx(__m256 X)
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
|
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
|
|
||||||
|
#ifndef DISABLE_DOT_PROD
|
||||||
#define DOT_PROD
|
#define DOT_PROD
|
||||||
|
#endif
|
||||||
typedef signed char qweight;
|
typedef signed char qweight;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue