Compare commits

...

16 Commits

Author SHA1 Message Date
  Martin Kroeker ebef09219b
Update Makefile.riscv64 2 years ago
  Martin Kroeker 6001418057
Add pragma to restrict optimization 2 years ago
  Martin Kroeker 426cd09595
Add pragma to restrict optimization 2 years ago
  Martin Kroeker fdb7d189cb
Add pragma to restrict optimization 2 years ago
  Martin Kroeker 5a0caf4476
Add pragma to restrict optimization 2 years ago
  Martin Kroeker 1b1a881461
fix extraneous brace 2 years ago
  Martin Kroeker 53d9e6f097
Fix Makefile.system 2 years ago
  Martin Kroeker 7d2fb5a473
fix typo 2 years ago
  Martin Kroeker 54b9ab45c5
fix missing endif 2 years ago
  Martin Kroeker 13f0fe1f42
reenable 2 years ago
  Martin Kroeker 81586e7b0a
work around an optimizer bug in Xuantie's gfortran 2 years ago
  Martin Kroeker f0ac1373a3
Temporarily relax the tolerance for DSDOT 2 years ago
  Martin Kroeker 65cb23007f
Fix failures to handle increments of zero 2 years ago
  Martin Kroeker 0f87ed2682
Disable all of test_potrs.c on RISCV for now 2 years ago
  Martin Kroeker 61153f2c1f
Disable the bigger POTRS test on RISCV64 for now 2 years ago
  Martin Kroeker 3550698bf8
Use a smaller GEMM workload on RISCV targets 2 years ago
13 changed files with 22 additions and 3 deletions
Unified View
  1. +1
    -1
      Makefile.riscv64
  2. +5
    -0
      Makefile.system
  3. +1
    -0
      kernel/riscv64/copy_vector.c
  4. +1
    -0
      kernel/riscv64/dgemm_kernel_8x4_c910v.c
  5. +1
    -0
      kernel/riscv64/rot_vector.c
  6. +1
    -0
      kernel/riscv64/sgemm_kernel_16x4_c910v.c
  7. +1
    -0
      kernel/riscv64/swap_vector.c
  8. +1
    -1
      kernel/riscv64/zcopy_vector.c
  9. +1
    -0
      kernel/riscv64/zrot_vector.c
  10. +1
    -0
      kernel/riscv64/zswap_vector.c
  11. +1
    -1
      utest/test_dsdot.c
  12. +4
    -0
      utest/test_fork.c
  13. +3
    -0
      utest/test_potrs.c

+ 1
- 1
Makefile.riscv64 View File

@@ -1,4 +1,4 @@
ifeq ($(CORE), C910V) ifeq ($(CORE), C910V)
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -O1
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
endif endif

+ 5
- 0
Makefile.system View File

@@ -1614,7 +1614,12 @@ ifdef OS_WINDOWS
LAPACK_FFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FFLAGS)) LAPACK_FFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FFLAGS))
LAPACK_FPFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FPFLAGS)) LAPACK_FPFLAGS := $(filter-out -fopenmp -mp -openmp -xopenmp=parallel,$(FPFLAGS))
else else
ifeq ($(CORE),C910V)
LAPACK_FFLAGS := $(filter-out -O2,$(FFLAGS))
LAPACK_FFLAGS += -O1
else
LAPACK_FFLAGS := $(FFLAGS) LAPACK_FFLAGS := $(FFLAGS)
endif
LAPACK_FPFLAGS := $(FPFLAGS) LAPACK_FPFLAGS := $(FPFLAGS)
endif endif




+ 1
- 0
kernel/riscv64/copy_vector.c View File

@@ -24,6 +24,7 @@ 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 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. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#pragma GCC optimize "O1"
#include "common.h" #include "common.h"
#if !defined(DOUBLE) #if !defined(DOUBLE)
#define VSETVL(n) vsetvl_e32m8(n) #define VSETVL(n) vsetvl_e32m8(n)


+ 1
- 0
kernel/riscv64/dgemm_kernel_8x4_c910v.c View File

@@ -1,3 +1,4 @@
#pragma GCC optimize "O1"
#include "common.h" #include "common.h"
#include <riscv_vector.h> #include <riscv_vector.h>




+ 1
- 0
kernel/riscv64/rot_vector.c View File

@@ -155,6 +155,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
} }
}else{ }else{
gvl = VSETVL(n); gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
BLASLONG stride_x = inc_x * sizeof(FLOAT); BLASLONG stride_x = inc_x * sizeof(FLOAT);
BLASLONG stride_y = inc_y * sizeof(FLOAT); BLASLONG stride_y = inc_y * sizeof(FLOAT);
BLASLONG inc_xv = inc_x * gvl; BLASLONG inc_xv = inc_x * gvl;


+ 1
- 0
kernel/riscv64/sgemm_kernel_16x4_c910v.c View File

@@ -1,3 +1,4 @@
#pragma GCC optimize "O1"
#include "common.h" #include "common.h"
#include <riscv_vector.h> #include <riscv_vector.h>




+ 1
- 0
kernel/riscv64/swap_vector.c View File

@@ -136,6 +136,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT dummy3, FLOAT *x,
} }
}else{ }else{
gvl = VSETVL(n); gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
stride_x = inc_x * sizeof(FLOAT); stride_x = inc_x * sizeof(FLOAT);
stride_y = inc_y * sizeof(FLOAT); stride_y = inc_y * sizeof(FLOAT);
if(gvl <= n/2){ if(gvl <= n/2){


+ 1
- 1
kernel/riscv64/zcopy_vector.c View File

@@ -24,7 +24,7 @@ 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 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. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#pragma GCC optimize "O1"
#include "common.h" #include "common.h"
#if !defined(DOUBLE) #if !defined(DOUBLE)
#define VSETVL(n) vsetvl_e32m4(n) #define VSETVL(n) vsetvl_e32m4(n)


+ 1
- 0
kernel/riscv64/zrot_vector.c View File

@@ -112,6 +112,7 @@ int CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT
} }
}else{ }else{
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
for(i=0,j=0; i < n/gvl; i++){ for(i=0,j=0; i < n/gvl; i++){
vx0 = VLSEV_FLOAT(&x[ix], stride_x, gvl); vx0 = VLSEV_FLOAT(&x[ix], stride_x, gvl);
vx1 = VLSEV_FLOAT(&x[ix+1], stride_x, gvl); vx1 = VLSEV_FLOAT(&x[ix+1], stride_x, gvl);


+ 1
- 0
kernel/riscv64/zswap_vector.c View File

@@ -81,6 +81,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT dummy3, FLOAT dumm
} }
}else{ }else{
gvl = VSETVL(n); gvl = VSETVL(n);
if (inc_x == 0 && inc_y == 0) gvl = VSETVL(1);
stride_x = inc_x * 2 * sizeof(FLOAT); stride_x = inc_x * 2 * sizeof(FLOAT);
stride_y = inc_y * 2 * sizeof(FLOAT); stride_y = inc_y * 2 * sizeof(FLOAT);
BLASLONG inc_xv = inc_x * gvl * 2; BLASLONG inc_xv = inc_x * gvl * 2;


+ 1
- 1
utest/test_dsdot.c View File

@@ -44,7 +44,7 @@ CTEST(dsdot,dsdot_n_1)
double res1=0.0f, res2=-0.00239335360107; double res1=0.0f, res2=-0.00239335360107;


res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy); res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy);
ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS);
ASSERT_DBL_NEAR_TOL(res2, res1, 1.e-9);


} }
#endif #endif

+ 4
- 0
utest/test_fork.c View File

@@ -67,7 +67,11 @@ CTEST(fork, safety)
#ifndef BUILD_DOUBLE #ifndef BUILD_DOUBLE
exit(0); exit(0);
#else #else
#ifndef ARCH_RISCV64
blasint n = 1000; blasint n = 1000;
#else
blasint n = 100;
#endif
int i; int i;


double *a, *b, *c, *d; double *a, *b, *c, *d;


+ 3
- 0
utest/test_potrs.c View File

@@ -40,6 +40,7 @@ void BLASFUNC(zpotrs_(char*, BLASINT*, BLASINT*, complex double*,
*/ */


//https://github.com/xianyi/OpenBLAS/issues/695 //https://github.com/xianyi/OpenBLAS/issues/695

CTEST(potrf, bug_695){ CTEST(potrf, bug_695){


openblas_complex_float A1[100] = openblas_complex_float A1[100] =
@@ -399,6 +400,7 @@ CTEST(potrf, bug_695){
#endif #endif
} }



// Check potrf factorizes a small problem correctly // Check potrf factorizes a small problem correctly
CTEST(potrf, smoketest_trivial){ CTEST(potrf, smoketest_trivial){
float A1s[4] = {2, 0.3, 0.3, 3}; float A1s[4] = {2, 0.3, 0.3, 3};
@@ -569,3 +571,4 @@ CTEST(potrf, smoketest_trivial){
} }
} }
} }


Loading…
Cancel
Save