Git Product home page Git Product logo

riscv-vectorized-benchmark-suite's People

Contributors

mp-17 avatar ralc88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

riscv-vectorized-benchmark-suite's Issues

Benchmarks not working with 1.0 branch

Benchmarks currently known to be not working with 1.0 branch with CAS LLVM Compiler and Spike
canneal
jacobi-2d
particle filter
swaptions

Errors related to stores and mmap.

ERR_CHK macro

_blackscholes/src/blackscholes.cpp

#ifdef ERR_CHK
    printf("Num Errors: %d\n", numError);
#endif

Can I define ERR_CHK macro at the beginning of the source code and expect the error to be equal to 0?

#define ERR_CHK
// RISC-V VECTOR Version by Cristóbal Ramírez Lazo, "Barcelona 2019"
...

branch: rvv-1.0

:bug: Vectorized lavaMD bug?

Hello everyone,

First of all, thanks for your great job! :-)

I am working on a custom implementation of the RiVEC benchmark suite to be run on spike and our vector processor Ara (https://github.com/pulp-platform/ara).

I was porting lavaMD, and I found an issue:

Preamble:
The scalar kernel is updating multiple times the same memory location fA[i].v, for 0 <= i < NUMBER_PAR_PER_BOX, within the same box (i.e., j is constant).
The fA pointer changes its base value only when the variable j changes; for the rest of the time, it points to the same address (i.e., fA remains constant when operating within the same box).
Since for different k (neighbours) and same j (box), the i assumes every value in the range 0 <= i < NUMBER_PAR_PER_BOX multiple times, then each fA[i].v is an accumulator. This is also valid for the .x, .y, and .z components.
https://github.com/RALC88/riscv-vectorized-benchmark-suite/blob/master/_lavaMD/kernel/kernel_cpu.c#L183

Issue:
In the vector version instead, each fA[i].v does not behave as an accumulator. For example, with i == 0, fA[0].v is written with a vector store 1+box[l].nn times, but the previous value is never read back to be accumulated.
When k changes and i starts its sweep again from 0, the scalar accumulators for the reductions are zeroed as well.
https://github.com/RALC88/riscv-vectorized-benchmark-suite/blob/master/_lavaMD/kernel/kernel_vector.c#L201

Therefore, the value in memory is never accumulated, but only overwritten.
https://github.com/RALC88/riscv-vectorized-benchmark-suite/blob/master/_lavaMD/kernel/kernel_vector.c#L258

Example:
Let's suppose that we have only one box, so l == 0 always.
When k == 0, we will have sweep with i and j.
When i == 0, we sweep on j, and then we store fA[0].v, accumulating all the different contributions from the j sweep.
i Will also sweep until the end, and we will save to memory all the fA[i].v, accumulating each contribution from the j sweeps.

Up to here, both the scalar and the vector programs work correctly.

Then, k == 1. At this point, we should repeat everything, and we only change rB and qB base addresses.
fA, instead, keeps pointing to the same location as before.
Therefore, we will sweep on i and j, and when i == 0, for example, we will need to accumulate again on fA[0].v, starting from its last value in memory.

The vector program does not do it, and just overwrite the values in memory, without accumulating when k changes.

I found the problem when I checked with Spike if the scalar and vector versions of lavaMD could produce the same results.
They could not, from my side. Have you tried to check if the results are the same?

An easy fix would be pulp-platform/ara@89215a1

Thanks a lot,
Matteo

EPI Compiler

The makefiles here assume that the epi compiler is set up. Can you provide instructions on how to set it up

[Question] Repository status

Looks like quite a long time since the last update of this repository. It looks a little bit out of date. I have tried one of the benchmarks, looks like the intrinsic API has sorts of changes according to gnu toolchain and llvm. Could you please help to insight me the support status of this repository, especially for the RVV 1.0 branch?

Thanks a lot.

clang-12: error: unknown argument: '-mepi' and src/utils.c:1:10: fatal error: 'math.h' file not found

when I use llvm from PLTC (https://github.com/plctlab/llvm-project) compile the RVV benchmark(https://github.com/RALC88/riscv-vectorized-benchmark-suite/tree/rvv-1.0)
it can't find argument '-mepi'.
My steps are as follows:

compile and install the llvm
export RISCV=~/opt/riscv-vector
git clone https://github.com/plctlab/llvm-project.git
cd llvm-project-rvv-iscas
mkdir build
cd build
cmake -G "Unix Makefiles"
-DLLVM_TARGETS_TO_BUILD="RISCV"
-DCMAKE_INSTALL_PREFIX=$RISCV
-DCMAKE_BUILD_TYPE=Release
-DLLVM_USE_LINKER=gold
-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;lld" ../llvm
make -j12
make install
compile the rvv benchmark
git clone https://github.com/RALC88/riscv-vectorized-benchmark-suite.git
cd riscv-vectorized-benchmark-suite
export LLVM=/opt/riscv-vector
export PATH=$PATH:/opt/riscv-vector/bin
make all

The following error is generated during the compilation process:
xxx/bin/clang --target=riscv64-unknown-elf -march=rv64g -O2 -c -o src/utils.o src/utils.c
src/utils.c:1:10: fatal error: 'math.h' file not found
clang-12: error: unknown argument: '-mepi'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.