Merge pull request #5676 from martin-frbg/wasm_arch
Move the WebAssembly/Emscripten support to its own architecture and target
This commit is contained in:
@@ -0,0 +1 @@
|
||||
CCOMMON_OPT += -msimd128
|
||||
@@ -153,3 +153,7 @@ EV6
|
||||
14.CSKY
|
||||
CSKY
|
||||
CK860FV
|
||||
|
||||
15. WebAssembly/Emscripten:
|
||||
WASM128_GENERIC
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ case "$data" in
|
||||
*ARCH_RISCV64*) architecture=riscv64 ;;
|
||||
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
|
||||
*ARCH_CSKY*) architecture=csky ;;
|
||||
*ARCH_WASM*) architecture=wasm ;;
|
||||
esac
|
||||
|
||||
defined=0
|
||||
@@ -130,7 +131,7 @@ case "$architecture" in
|
||||
defined=1
|
||||
;;
|
||||
arm|arm64) defined=1 ;;
|
||||
zarch|e2k|alpha|ia64|riscv64|loonarch64)
|
||||
zarch|e2k|alpha|ia64|riscv64|loonarch64|wasm)
|
||||
defined=1
|
||||
BINARY=64
|
||||
;;
|
||||
@@ -254,6 +255,7 @@ case "$data" in
|
||||
*ARCH_ZARCH*) architecture=zarch ;;
|
||||
*ARCH_LOONGARCH64*) architecture=loongarch64 ;;
|
||||
*ARCH_CSKY*) architecture=csky ;;
|
||||
*ARCH_WASM*) architecture=wasm ;;
|
||||
esac
|
||||
|
||||
binformat='bin32'
|
||||
|
||||
@@ -98,6 +98,10 @@ if (${COMPILER_ID} STREQUAL "GNU")
|
||||
set(COMPILER_ID "GCC")
|
||||
endif ()
|
||||
|
||||
if (HOST_OS STREQUAL "EMSCRIPTEN")
|
||||
set (ARCH wasm)
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${ARCH} UC_ARCH)
|
||||
file(WRITE ${TARGET_CONF_TEMP}
|
||||
"#define OS_${HOST_OS}\t1\n"
|
||||
@@ -1500,6 +1504,15 @@ endif ()
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
elseif ("${TCORE}" STREQUAL "WASM128_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define L1_DATA_SIZE 32768\n"
|
||||
"#define L1_DATA_LINESIZE 32\n"
|
||||
"#define L2_SIZE 1048576\n"
|
||||
"#define L2_LINESIZE 32 \n"
|
||||
"#define DTB_DEFAULT_ENTRIES 128\n"
|
||||
"#define DTB_SIZE 4096\n"
|
||||
"#define L2_ASSOCIATIVE 4\n")
|
||||
elseif ("${TCORE}" STREQUAL "LA64_GENERIC")
|
||||
file(APPEND ${TARGET_CONF_TEMP}
|
||||
"#define DTB_DEFAULT_ENTRIES 64\n")
|
||||
|
||||
@@ -879,6 +879,10 @@ if (DEFINED ARCH)
|
||||
set(USE_GEMM3M 1)
|
||||
endif ()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(USE_GEMM3M 0)
|
||||
endif ()
|
||||
|
||||
if (${CORE} STREQUAL "generic")
|
||||
set(USE_GEMM3M 0)
|
||||
endif ()
|
||||
|
||||
@@ -40,6 +40,8 @@ if(CMAKE_CL_64 OR MINGW64)
|
||||
else()
|
||||
set(X86_64 1)
|
||||
endif()
|
||||
elseif(OS_EMSCRIPTEN)
|
||||
set(WASM 1)
|
||||
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
|
||||
set(X86 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc.*|power.*|Power.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc.*"))
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ macro(ParseMakefileVars MAKEFILE_IN)
|
||||
if (${OSNAME} STREQUAL Windows)
|
||||
set (OSNAME WINNT)
|
||||
endif ()
|
||||
message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
|
||||
#message(STATUS OS ${OSNAME} COMPILER ${C_COMPILER})
|
||||
set (IfElse 0)
|
||||
set (ElseSeen 0)
|
||||
set (SkipIfs 0)
|
||||
|
||||
@@ -386,9 +386,11 @@ typedef int blasint;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#if defined(ARCH_WASM)
|
||||
#ifndef YIELDING
|
||||
#define YIELDING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#undef YIELDING // MSVC doesn't support assembly code
|
||||
@@ -498,6 +500,10 @@ please https://github.com/xianyi/OpenBLAS/issues/246
|
||||
#include "common_csky.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_WASM
|
||||
#include "common_wasm.h"
|
||||
#endif
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
#ifdef OS_WINDOWSSTORE
|
||||
typedef char env_var_t[MAX_PATH];
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/*****************************************************************************
|
||||
Copyright (c) 2011-2014, The OpenBLAS Project
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of the OpenBLAS project nor the names of
|
||||
its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**********************************************************************************/
|
||||
|
||||
/*********************************************************************/
|
||||
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
||||
/* All rights reserved. */
|
||||
/* */
|
||||
/* Redistribution and use in source and binary forms, with or */
|
||||
/* without modification, are permitted provided that the following */
|
||||
/* conditions are met: */
|
||||
/* */
|
||||
/* 1. Redistributions of source code must retain the above */
|
||||
/* copyright notice, this list of conditions and the following */
|
||||
/* disclaimer. */
|
||||
/* */
|
||||
/* 2. Redistributions in binary form must reproduce the above */
|
||||
/* copyright notice, this list of conditions and the following */
|
||||
/* disclaimer in the documentation and/or other materials */
|
||||
/* provided with the distribution. */
|
||||
/* */
|
||||
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
|
||||
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
|
||||
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
|
||||
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
|
||||
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
|
||||
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
|
||||
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
|
||||
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
|
||||
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
|
||||
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
|
||||
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
|
||||
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
|
||||
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
|
||||
/* POSSIBILITY OF SUCH DAMAGE. */
|
||||
/* */
|
||||
/* The views and conclusions contained in the software and */
|
||||
/* documentation are those of the authors and should not be */
|
||||
/* interpreted as representing official policies, either expressed */
|
||||
/* or implied, of The University of Texas at Austin. */
|
||||
/*********************************************************************/
|
||||
|
||||
#ifndef COMMON_WASM
|
||||
#define COMMON_WASM
|
||||
|
||||
#define MB __sync_synchronize()
|
||||
#define WMB __sync_synchronize()
|
||||
#define RMB __sync_synchronize()
|
||||
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
|
||||
static inline int blas_quickdivide(blasint x, blasint y){
|
||||
return x / y;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define BUFFER_SIZE ( 16 << 20)
|
||||
#define SEEK_ADDRESS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -178,7 +178,7 @@ ARCH_CSKY
|
||||
#endif
|
||||
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
ARCH_RISCV64
|
||||
ARCH_WASM
|
||||
OS_WINDOWS
|
||||
#endif
|
||||
|
||||
|
||||
+25
-25
@@ -279,10 +279,10 @@ int /* Main program */ main(void)
|
||||
real r__1;
|
||||
|
||||
/* Local variables */
|
||||
integer nalf, idim[9];
|
||||
logical same;
|
||||
integer nbet, ntra;
|
||||
logical rewi;
|
||||
static integer nalf, idim[9];
|
||||
static logical same;
|
||||
static integer nbet, ntra;
|
||||
static logical rewi;
|
||||
extern /* Subroutine */ int cchk1_(char *, real *, real *, integer *,
|
||||
integer *, logical *, logical *, logical *, integer *, integer *,
|
||||
integer *, complex *, integer *, complex *, integer *, complex *,
|
||||
@@ -306,35 +306,35 @@ int /* Main program */ main(void)
|
||||
integer *, complex *, integer *, complex *, integer *, complex *,
|
||||
complex *, complex *, complex *, complex *, complex *, complex *,
|
||||
complex *, complex *, real *, complex *, integer *);
|
||||
complex c__[4225] /* was [65][65] */;
|
||||
real g[65];
|
||||
integer i__, j, n;
|
||||
logical fatal;
|
||||
complex w[130];
|
||||
static complex c__[4225] /* was [65][65] */;
|
||||
static real g[65];
|
||||
static integer i__, j, n;
|
||||
static logical fatal;
|
||||
static complex w[130];
|
||||
extern /* Subroutine */ int cmmch_(char *, char *, integer *, integer *,
|
||||
integer *, complex *, complex *, integer *, complex *, integer *,
|
||||
complex *, complex *, integer *, complex *, real *, complex *,
|
||||
integer *, real *, real *, logical *, integer *, logical *);
|
||||
extern real sdiff_(real *, real *);
|
||||
logical trace;
|
||||
integer nidim;
|
||||
char snaps[32];
|
||||
integer isnum;
|
||||
logical ltest[9];
|
||||
complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
|
||||
static logical trace;
|
||||
static integer nidim;
|
||||
static char snaps[32];
|
||||
static integer isnum;
|
||||
static logical ltest[9];
|
||||
static complex aa[4225], ab[8450] /* was [65][130] */, bb[4225], cc[4225], as[
|
||||
4225], bs[4225], cs[4225], ct[65];
|
||||
logical sfatal, corder;
|
||||
char snamet[12], transa[1], transb[1];
|
||||
real thresh;
|
||||
logical rorder;
|
||||
static logical sfatal, corder;
|
||||
static char snamet[12], transa[1], transb[1];
|
||||
static real thresh;
|
||||
static logical rorder;
|
||||
extern /* Subroutine */ void cc3chke_(char *);
|
||||
integer layout;
|
||||
logical ltestt, tsterr;
|
||||
complex alf[7];
|
||||
static integer layout;
|
||||
static logical ltestt, tsterr;
|
||||
static complex alf[7];
|
||||
extern logical lce_(complex *, complex *, integer *);
|
||||
complex bet[7];
|
||||
real eps, err;
|
||||
char tmpchar;
|
||||
static complex bet[7];
|
||||
static real eps, err;
|
||||
static char tmpchar;
|
||||
|
||||
/* Test program for the COMPLEX Level 3 Blas. */
|
||||
|
||||
|
||||
@@ -1232,6 +1232,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_WASM128_GENERIC
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "WASM"
|
||||
#define SUBARCHITECTURE "WASM128_GENERIC"
|
||||
#define SUBDIRNAME "wasm"
|
||||
#define ARCHCONFIG "-DWASM128_GENERIC " \
|
||||
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
|
||||
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
|
||||
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
|
||||
#define LIBNAME "wasm128"
|
||||
#define CORENAME "WASM128_GENERIC"
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifdef FORCE_CORTEXA15
|
||||
#define FORCE
|
||||
#define ARCHITECTURE "ARM"
|
||||
@@ -1949,6 +1963,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifdef __wasm__
|
||||
#define OPENBLAS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#ifndef OPENBLAS_SUPPORTED
|
||||
#error "This arch/CPU is not supported by OpenBLAS."
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
|
||||
endif ()
|
||||
|
||||
if (${ADD_COMMONOBJS})
|
||||
if (X86)
|
||||
if (X86 AND NOT EMSCRIPTEN)
|
||||
if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
GenerateNamedObjects("${KERNELDIR}/cpuid.S" "" "" false "" "" true)
|
||||
else()
|
||||
@@ -235,7 +235,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
|
||||
# Makefile.L3
|
||||
set(USE_TRMM false)
|
||||
string(TOUPPER ${TARGET_CORE} UC_TARGET_CORE)
|
||||
if (ARM OR ARM64 OR RISCV64 OR (UC_TARGET_CORE MATCHES LONGSOON3B) OR (UC_TARGET_CORE MATCHES GENERIC) OR (UC_TARGET_CORE MATCHES HASWELL) OR (UC_TARGET_CORE MATCHES ZEN) OR (UC_TARGET_CORE MATCHES SKYLAKEX) OR (UC_TARGET_CORE MATCHES COOPERLAKE) OR (UC_TARGET_CORE MATCHES SAPPHIRERAPIDS))
|
||||
if (ARM OR ARM64 OR RISCV64 OR WASM OR (UC_TARGET_CORE MATCHES LONGSOON3B) OR (UC_TARGET_CORE MATCHES GENERIC) OR (UC_TARGET_CORE MATCHES HASWELL) OR (UC_TARGET_CORE MATCHES ZEN) OR (UC_TARGET_CORE MATCHES SKYLAKEX) OR (UC_TARGET_CORE MATCHES COOPERLAKE) OR (UC_TARGET_CORE MATCHES SAPPHIRERAPIDS))
|
||||
set(USE_TRMM true)
|
||||
endif ()
|
||||
if (ZARCH OR (UC_TARGET_CORE MATCHES POWER8) OR (UC_TARGET_CORE MATCHES POWER9) OR (UC_TARGET_CORE MATCHES POWER10))
|
||||
|
||||
@@ -70,6 +70,10 @@ ifeq ($(ARCH), riscv64)
|
||||
USE_TRMM = 1
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), wasm)
|
||||
USE_TRMM = 1
|
||||
endif
|
||||
|
||||
ifneq ($(DYNAMIC_ARCH), 1)
|
||||
ifeq ($(TARGET), GENERIC)
|
||||
USE_TRMM = 1
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
SAMAXKERNEL = ../riscv64/amax.c
|
||||
DAMAXKERNEL = ../riscv64/amax.c
|
||||
CAMAXKERNEL = ../riscv64/zamax.c
|
||||
ZAMAXKERNEL = ../riscv64/zamax.c
|
||||
|
||||
SAMINKERNEL = ../riscv64/amin.c
|
||||
DAMINKERNEL = ../riscv64/amin.c
|
||||
CAMINKERNEL = ../riscv64/zamin.c
|
||||
ZAMINKERNEL = ../riscv64/zamin.c
|
||||
|
||||
SMAXKERNEL = ../riscv64/max.c
|
||||
DMAXKERNEL = ../riscv64/max.c
|
||||
|
||||
SMINKERNEL = ../riscv64/min.c
|
||||
DMINKERNEL = ../riscv64/min.c
|
||||
|
||||
ISAMAXKERNEL = ../riscv64/iamax.c
|
||||
IDAMAXKERNEL = ../riscv64/iamax.c
|
||||
ICAMAXKERNEL = ../riscv64/izamax.c
|
||||
IZAMAXKERNEL = ../riscv64/izamax.c
|
||||
|
||||
ISAMINKERNEL = ../riscv64/iamin.c
|
||||
IDAMINKERNEL = ../riscv64/iamin.c
|
||||
ICAMINKERNEL = ../riscv64/izamin.c
|
||||
IZAMINKERNEL = ../riscv64/izamin.c
|
||||
|
||||
ISMAXKERNEL = ../riscv64/imax.c
|
||||
IDMAXKERNEL = ../riscv64/imax.c
|
||||
|
||||
ISMINKERNEL = ../riscv64/imin.c
|
||||
IDMINKERNEL = ../riscv64/imin.c
|
||||
|
||||
SASUMKERNEL = ../riscv64/asum.c
|
||||
DASUMKERNEL = ../riscv64/asum.c
|
||||
CASUMKERNEL = ../riscv64/zasum.c
|
||||
ZASUMKERNEL = ../riscv64/zasum.c
|
||||
|
||||
SSUMKERNEL = ../arm/sum.c
|
||||
DSUMKERNEL = ../arm/sum.c
|
||||
CSUMKERNEL = ../arm/zsum.c
|
||||
ZSUMKERNEL = ../arm/zsum.c
|
||||
|
||||
SAXPYKERNEL = ../riscv64/axpy.c
|
||||
DAXPYKERNEL = ../riscv64/axpy.c
|
||||
CAXPYKERNEL = ../riscv64/zaxpy.c
|
||||
ZAXPYKERNEL = ../riscv64/zaxpy.c
|
||||
|
||||
SAXPBYKERNEL = ../riscv64/axpby.c
|
||||
DAXPBYKERNEL = ../riscv64/axpby.c
|
||||
CAXPBYKERNEL = ../riscv64/zaxpby.c
|
||||
ZAXPBYKERNEL = ../riscv64/zaxpby.c
|
||||
|
||||
SCOPYKERNEL = ../riscv64/copy.c
|
||||
DCOPYKERNEL = ../riscv64/copy.c
|
||||
CCOPYKERNEL = ../riscv64/zcopy.c
|
||||
ZCOPYKERNEL = ../riscv64/zcopy.c
|
||||
|
||||
SDOTKERNEL = ../riscv64/dot.c
|
||||
DDOTKERNEL = ../riscv64/dot.c
|
||||
CDOTKERNEL = ../riscv64/zdot.c
|
||||
ZDOTKERNEL = ../riscv64/zdot.c
|
||||
DSDOTKERNEL = ../generic/dot.c
|
||||
|
||||
SNRM2KERNEL = ../riscv64/nrm2.c
|
||||
DNRM2KERNEL = ../riscv64/nrm2.c
|
||||
CNRM2KERNEL = ../riscv64/znrm2.c
|
||||
ZNRM2KERNEL = ../riscv64/znrm2.c
|
||||
|
||||
SROTKERNEL = ../riscv64/rot.c
|
||||
DROTKERNEL = ../riscv64/rot.c
|
||||
CROTKERNEL = ../riscv64/zrot.c
|
||||
ZROTKERNEL = ../riscv64/zrot.c
|
||||
|
||||
SROTMKERNEL = ../generic/rotm.c
|
||||
DROTMKERNEL = ../generic/rotm.c
|
||||
QROTMKERNEL = ../generic/rotm.c
|
||||
|
||||
SSCALKERNEL = ../riscv64/scal.c
|
||||
DSCALKERNEL = ../riscv64/scal.c
|
||||
CSCALKERNEL = ../riscv64/zscal.c
|
||||
ZSCALKERNEL = ../riscv64/zscal.c
|
||||
|
||||
SSWAPKERNEL = ../riscv64/swap.c
|
||||
DSWAPKERNEL = ../riscv64/swap.c
|
||||
CSWAPKERNEL = ../riscv64/zswap.c
|
||||
ZSWAPKERNEL = ../riscv64/zswap.c
|
||||
|
||||
SGEMVNKERNEL = ../riscv64/gemv_n.c
|
||||
DGEMVNKERNEL = ../riscv64/gemv_n.c
|
||||
CGEMVNKERNEL = ../riscv64/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../riscv64/zgemv_n.c
|
||||
|
||||
SGEMVTKERNEL = ../riscv64/gemv_t.c
|
||||
DGEMVTKERNEL = ../riscv64/gemv_t.c
|
||||
CGEMVTKERNEL = ../riscv64/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../riscv64/zgemv_t.c
|
||||
|
||||
STRMMKERNEL = ../generic/trmmkernel_2x2.c
|
||||
DTRMMKERNEL = ../generic/trmmkernel_2x2.c
|
||||
CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
|
||||
ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
|
||||
|
||||
SGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
SGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
SGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
SGEMMONCOPYOBJ = sgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
SGEMMOTCOPYOBJ = sgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
DGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
DGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
DGEMMONCOPYOBJ = dgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
DGEMMOTCOPYOBJ = dgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
CGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
CGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
CGEMMONCOPYOBJ = cgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
CGEMMOTCOPYOBJ = cgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
ZGEMMONCOPYOBJ = zgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
ZGEMMOTCOPYOBJ = zgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
STRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
DTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
DTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
DTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
DTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
CTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
CTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
CTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
CTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
ZTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
SSYMV_U_KERNEL = ../generic/symv_k.c
|
||||
SSYMV_L_KERNEL = ../generic/symv_k.c
|
||||
DSYMV_U_KERNEL = ../generic/symv_k.c
|
||||
DSYMV_L_KERNEL = ../generic/symv_k.c
|
||||
CSYMV_U_KERNEL = ../generic/zsymv_k.c
|
||||
CSYMV_L_KERNEL = ../generic/zsymv_k.c
|
||||
ZSYMV_U_KERNEL = ../generic/zsymv_k.c
|
||||
ZSYMV_L_KERNEL = ../generic/zsymv_k.c
|
||||
|
||||
|
||||
LSAME_KERNEL = ../generic/lsame.c
|
||||
|
||||
SCABS_KERNEL = ../generic/cabs.c
|
||||
DCABS_KERNEL = ../generic/cabs.c
|
||||
QCABS_KERNEL = ../generic/cabs.c
|
||||
|
||||
ifndef SGEMM_BETA
|
||||
SGEMM_BETA = ../generic/gemm_beta.c
|
||||
endif
|
||||
ifndef DGEMM_BETA
|
||||
DGEMM_BETA = ../generic/gemm_beta.c
|
||||
endif
|
||||
ifndef CGEMM_BETA
|
||||
CGEMM_BETA = ../generic/zgemm_beta.c
|
||||
endif
|
||||
ifndef ZGEMM_BETA
|
||||
ZGEMM_BETA = ../generic/zgemm_beta.c
|
||||
endif
|
||||
@@ -0,0 +1,174 @@
|
||||
SAMAXKERNEL = ../riscv64/amax.c
|
||||
DAMAXKERNEL = ../riscv64/amax.c
|
||||
CAMAXKERNEL = ../riscv64/zamax.c
|
||||
ZAMAXKERNEL = ../riscv64/zamax.c
|
||||
|
||||
SAMINKERNEL = ../riscv64/amin.c
|
||||
DAMINKERNEL = ../riscv64/amin.c
|
||||
CAMINKERNEL = ../riscv64/zamin.c
|
||||
ZAMINKERNEL = ../riscv64/zamin.c
|
||||
|
||||
SMAXKERNEL = ../riscv64/max.c
|
||||
DMAXKERNEL = ../riscv64/max.c
|
||||
|
||||
SMINKERNEL = ../riscv64/min.c
|
||||
DMINKERNEL = ../riscv64/min.c
|
||||
|
||||
ISAMAXKERNEL = ../riscv64/iamax.c
|
||||
IDAMAXKERNEL = ../riscv64/iamax.c
|
||||
ICAMAXKERNEL = ../riscv64/izamax.c
|
||||
IZAMAXKERNEL = ../riscv64/izamax.c
|
||||
|
||||
ISAMINKERNEL = ../riscv64/iamin.c
|
||||
IDAMINKERNEL = ../riscv64/iamin.c
|
||||
ICAMINKERNEL = ../riscv64/izamin.c
|
||||
IZAMINKERNEL = ../riscv64/izamin.c
|
||||
|
||||
ISMAXKERNEL = ../riscv64/imax.c
|
||||
IDMAXKERNEL = ../riscv64/imax.c
|
||||
|
||||
ISMINKERNEL = ../riscv64/imin.c
|
||||
IDMINKERNEL = ../riscv64/imin.c
|
||||
|
||||
SASUMKERNEL = ../riscv64/asum.c
|
||||
DASUMKERNEL = ../riscv64/asum.c
|
||||
CASUMKERNEL = ../riscv64/zasum.c
|
||||
ZASUMKERNEL = ../riscv64/zasum.c
|
||||
|
||||
SSUMKERNEL = ../arm/sum.c
|
||||
DSUMKERNEL = ../arm/sum.c
|
||||
CSUMKERNEL = ../arm/zsum.c
|
||||
ZSUMKERNEL = ../arm/zsum.c
|
||||
|
||||
SAXPYKERNEL = ../riscv64/axpy.c
|
||||
DAXPYKERNEL = ../x86_64/daxpy.c
|
||||
CAXPYKERNEL = ../riscv64/zaxpy.c
|
||||
ZAXPYKERNEL = ../riscv64/zaxpy.c
|
||||
|
||||
SAXPBYKERNEL = ../riscv64/axpby.c
|
||||
DAXPBYKERNEL = ../riscv64/axpby.c
|
||||
CAXPBYKERNEL = ../riscv64/zaxpby.c
|
||||
ZAXPBYKERNEL = ../riscv64/zaxpby.c
|
||||
|
||||
SCOPYKERNEL = ../riscv64/copy.c
|
||||
DCOPYKERNEL = ../riscv64/copy.c
|
||||
CCOPYKERNEL = ../riscv64/zcopy.c
|
||||
ZCOPYKERNEL = ../riscv64/zcopy.c
|
||||
|
||||
SDOTKERNEL = ../riscv64/dot.c
|
||||
DDOTKERNEL = ../riscv64/dot.c
|
||||
CDOTKERNEL = ../riscv64/zdot.c
|
||||
ZDOTKERNEL = ../riscv64/zdot.c
|
||||
DSDOTKERNEL = ../generic/dot.c
|
||||
|
||||
SNRM2KERNEL = ../riscv64/nrm2.c
|
||||
DNRM2KERNEL = ../riscv64/nrm2.c
|
||||
CNRM2KERNEL = ../riscv64/znrm2.c
|
||||
ZNRM2KERNEL = ../riscv64/znrm2.c
|
||||
|
||||
SROTKERNEL = ../x86_64/srot.c
|
||||
DROTKERNEL = ../x86_64/drot.c
|
||||
CROTKERNEL = ../riscv64/zrot.c
|
||||
ZROTKERNEL = ../riscv64/zrot.c
|
||||
|
||||
SROTMKERNEL = ../generic/rotm.c
|
||||
DROTMKERNEL = ../generic/rotm.c
|
||||
QROTMKERNEL = ../generic/rotm.c
|
||||
|
||||
SSCALKERNEL = ../riscv64/scal.c
|
||||
DSCALKERNEL = ../riscv64/scal.c
|
||||
CSCALKERNEL = ../riscv64/zscal.c
|
||||
ZSCALKERNEL = ../riscv64/zscal.c
|
||||
|
||||
SSWAPKERNEL = ../riscv64/swap.c
|
||||
DSWAPKERNEL = ../riscv64/swap.c
|
||||
CSWAPKERNEL = ../riscv64/zswap.c
|
||||
ZSWAPKERNEL = ../riscv64/zswap.c
|
||||
|
||||
SGEMVNKERNEL = ../riscv64/gemv_n.c
|
||||
DGEMVNKERNEL = ../riscv64/gemv_n.c
|
||||
CGEMVNKERNEL = ../riscv64/zgemv_n.c
|
||||
ZGEMVNKERNEL = ../riscv64/zgemv_n.c
|
||||
|
||||
SGEMVTKERNEL = ../riscv64/gemv_t.c
|
||||
DGEMVTKERNEL = ../riscv64/gemv_t.c
|
||||
CGEMVTKERNEL = ../riscv64/zgemv_t.c
|
||||
ZGEMVTKERNEL = ../riscv64/zgemv_t.c
|
||||
|
||||
STRMMKERNEL = ../generic/trmmkernel_2x2.c
|
||||
DTRMMKERNEL = ../generic/trmmkernel_2x2.c
|
||||
CTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
|
||||
ZTRMMKERNEL = ../generic/ztrmmkernel_2x2.c
|
||||
|
||||
SGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
SGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
SGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
SGEMMONCOPYOBJ = sgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
SGEMMOTCOPYOBJ = sgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
DGEMMKERNEL = ../generic/gemmkernel_2x2.c
|
||||
DGEMMONCOPY = ../generic/gemm_ncopy_2.c
|
||||
DGEMMOTCOPY = ../generic/gemm_tcopy_2.c
|
||||
DGEMMONCOPYOBJ = dgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
DGEMMOTCOPYOBJ = dgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
CGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
CGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
CGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
CGEMMONCOPYOBJ = cgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
CGEMMOTCOPYOBJ = cgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
ZGEMMKERNEL = ../generic/zgemmkernel_2x2.c
|
||||
ZGEMMONCOPY = ../generic/zgemm_ncopy_2.c
|
||||
ZGEMMOTCOPY = ../generic/zgemm_tcopy_2.c
|
||||
ZGEMMONCOPYOBJ = zgemm_oncopy$(TSUFFIX).$(SUFFIX)
|
||||
ZGEMMOTCOPYOBJ = zgemm_otcopy$(TSUFFIX).$(SUFFIX)
|
||||
|
||||
STRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
STRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
STRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
STRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
DTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
DTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
DTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
DTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
CTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
CTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
CTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
CTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
ZTRSMKERNEL_LN = ../generic/trsm_kernel_LN.c
|
||||
ZTRSMKERNEL_LT = ../generic/trsm_kernel_LT.c
|
||||
ZTRSMKERNEL_RN = ../generic/trsm_kernel_RN.c
|
||||
ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||
|
||||
SSYMV_U_KERNEL = ../generic/symv_k.c
|
||||
SSYMV_L_KERNEL = ../generic/symv_k.c
|
||||
DSYMV_U_KERNEL = ../generic/symv_k.c
|
||||
DSYMV_L_KERNEL = ../generic/symv_k.c
|
||||
CSYMV_U_KERNEL = ../generic/zsymv_k.c
|
||||
CSYMV_L_KERNEL = ../generic/zsymv_k.c
|
||||
ZSYMV_U_KERNEL = ../generic/zsymv_k.c
|
||||
ZSYMV_L_KERNEL = ../generic/zsymv_k.c
|
||||
|
||||
|
||||
LSAME_KERNEL = ../generic/lsame.c
|
||||
|
||||
SCABS_KERNEL = ../generic/cabs.c
|
||||
DCABS_KERNEL = ../generic/cabs.c
|
||||
QCABS_KERNEL = ../generic/cabs.c
|
||||
|
||||
ifndef SGEMM_BETA
|
||||
SGEMM_BETA = ../generic/gemm_beta.c
|
||||
endif
|
||||
ifndef DGEMM_BETA
|
||||
DGEMM_BETA = ../generic/gemm_beta.c
|
||||
endif
|
||||
ifndef CGEMM_BETA
|
||||
CGEMM_BETA = ../generic/zgemm_beta.c
|
||||
endif
|
||||
ifndef ZGEMM_BETA
|
||||
ZGEMM_BETA = ../generic/zgemm_beta.c
|
||||
endif
|
||||
@@ -0,0 +1,17 @@
|
||||
TOPDIR = ../../..
|
||||
include ../../../Makefile.system
|
||||
|
||||
ifeq ($(DYNAMIC_ARCH), 1)
|
||||
LASWP = ../generic/laswp_k_4.c
|
||||
ZLASWP = ../generic/zlaswp_k_4.c
|
||||
endif
|
||||
|
||||
ifndef LASWP
|
||||
LASWP = ../generic/laswp_k.c
|
||||
endif
|
||||
|
||||
ifndef ZLASWP
|
||||
ZLASWP = ../generic/zlaswp_k.c
|
||||
endif
|
||||
|
||||
include ../generic/Makefile
|
||||
@@ -3027,7 +3027,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define SYMV_P 16
|
||||
#endif
|
||||
|
||||
#ifdef RISCV64_GENERIC
|
||||
#if defined(RISCV64_GENERIC) || defined(WASM128_GENERIC)
|
||||
#define GEMM_DEFAULT_OFFSET_A 0
|
||||
#define GEMM_DEFAULT_OFFSET_B 0
|
||||
#define GEMM_DEFAULT_ALIGN (BLASLONG)0x03fffUL
|
||||
|
||||
Reference in New Issue
Block a user