Giter Site home page Giter Site logo

ralc88 / gem5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gem5/gem5

18.0 18.0 12.0 228.85 MB

This is an read-only mirror of the gem5 simulator. The upstream repository is stored in https://gem5.googlesource.com, code reviews should be submitted to https://gem5-review.googlesource.com/. The mirrors are synchronized every 15 minutes.

Home Page: http://gem5.org

License: BSD 3-Clause "New" or "Revised" License

Python 12.80% Shell 0.12% C 3.55% C++ 81.71% Makefile 0.14% CMake 0.17% HTML 0.28% Assembly 0.89% Perl 0.07% Emacs Lisp 0.01% Java 0.01% M4 0.11% Roff 0.02% Vim Script 0.01% Awk 0.01% Scala 0.03% Objective-C 0.05% sed 0.01% Forth 0.03% VBA 0.01%

gem5's People

Contributors

ahansson-arm avatar alexdutu avatar andysan avatar aroelke avatar atgutier avatar beckmabd avatar benash avatar binkert avatar bkp avatar bobbyrbruce avatar cdunham avatar ennobler avatar gabemblack avatar gabordzs avatar giactra avatar javierbuenohedo avatar jthestness avatar nilayvaish avatar odanrc avatar pdudnik avatar powerjg avatar qtt2 avatar ramymdsc avatar rdreslin avatar relokin avatar spwilson2 avatar steve-reinhardt avatar sticklyman1936 avatar tiagormk avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

gem5's Issues

SEW-related error

I inform you that there seems to be an error in reading the SEW value.
There seems to be an error in "VectorConfig::get_vtype_sew(uint64_t vtype)" function in "src/cpu/vector_engine/vpu/vector_config/vector_config.cc".
If SEW=32, vsew will output 4, if SEW=64, vsew will output 6. There seems to be a problem with shift, so I edit the value and it works normally. (vt(vtype,2,3) --> vt(vtype,3,3))

No performance improvement with increasing vector lanes

I've been coding for conductiong vector operation using your Vector model.
It's a simple code loading 64 x 64 vector table data and adding (8 x 256 times) 64 elements.
In this code, there is not much performance difference between lanes 1 and 8.
I think when we perform vector operation(vfadd_vv_f32m1), it's not allocated in 8-lane.
Please provide a S/W guide which can utilize vector 8 lanes.

// table size 64 x 64
n = 64;																		// element = 64
vl = vsetvl_e32m1(n);															// VLEN = 64 * 32-bit = 2048-bit
zero = (float*)malloc(sizeof(float)*vl);												// 64 * float malloc
for(i = 0; i < 256; ++i) {								
        vfloat32m1_t vop0 = vle32_v_f32m1(zero);									// vfloat32m1_t init 0
        for (j = 0 ; j < 8; ++j) {														// vector add 8 times
            int index_ij = *get2df<int>(index_iter, i, j, 8);									// table index
            vfloat32m1_t vop0_lo = vle32_v_f32m1(get2df<float>(embed, index_ij, 0, 64));		// vector load form table
            vop0 = vfadd_vv_f32m1(vop0, vop0_lo);									// vector add
        }
        vse32_v_f32m1(get2df<float>(output, i, 0, dimension), vop0);						// store data
}

Error running RiVEC Bencmark Suite on this gem5 rvv simulator

RiVEC Benchmark Suite: https://github.com/RALC88/riscv-vectorized-benchmark-suite. (branch rvv-1.0)

I tried axpy, blackscholes and canneal, the benchmarks run well on spike, but not on this rvv simulator. The serial version works well, but not the vector version.
The output (canneal_vector for example):

warn: CheckedInt already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: Enum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version [DEVELOP-FOR-V20.1]
gem5 compiled Nov 24 2021 11:05:07
gem5 started Nov 26 2021 21:19:00
gem5 executing on 85d9b18d236f, pid 252615
command line: /home/gem5/build/RISCV/gem5.opt ../test_gem5/simple.py

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
warn: Unknown operating system; assuming Linux.
0: system.remote_gdb: listening for remote gdb on port 7000
Beginning simulation!
info: Entering event queue @ 0.  Starting simulation...
PARSEC Benchmark Suite
Threadcount: 1
100 swaps per temperature step
start temperature: 300
netlist filename: /home/riscv-vectorized-benchmark-suite/_canneal/input/100.nets
number of temperature steps: 8
locs created
locs assigned
netlist created. 100 elements.


Initialization took 0.07918000 secs   
panic: Illegal instruction 0xc22025f3 at pc 0x00000000000108d0: 
Memory Usage: 611208 KBytes
Program aborted at tick 85855631000
--- BEGIN LIBC BACKTRACE ---
/home/gem5/build/RISCV/gem5.opt(+0x18069d0)[0x55faed2c89d0]
/home/gem5/build/RISCV/gem5.opt(+0x181a4ee)[0x55faed2dc4ee]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f478780f3c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f47872e418b]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f47872c3859]
/home/gem5/build/RISCV/gem5.opt(+0xbc5935)[0x55faec687935]
/home/gem5/build/RISCV/gem5.opt(+0xf0f2f1)[0x55faec9d12f1]
/home/gem5/build/RISCV/gem5.opt(+0xf1105b)[0x55faec9d305b]
/home/gem5/build/RISCV/gem5.opt(+0x162810d)[0x55faed0ea10d]
/home/gem5/build/RISCV/gem5.opt(+0x1623d67)[0x55faed0e5d67]
/home/gem5/build/RISCV/gem5.opt(+0x162348e)[0x55faed0e548e]
/home/gem5/build/RISCV/gem5.opt(+0x180ea4d)[0x55faed2d0a4d]
/home/gem5/build/RISCV/gem5.opt(+0x182eff8)[0x55faed2f0ff8]
/home/gem5/build/RISCV/gem5.opt(+0x182fded)[0x55faed2f1ded]
/home/gem5/build/RISCV/gem5.opt(+0xc2c200)[0x55faec6ee200]
/home/gem5/build/RISCV/gem5.opt(+0xc13bf1)[0x55faec6d5bf1]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x2a8738)[0x7f4787ac5738]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x8dd8)[0x7f478789af48]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f47879e7e3b]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x94)[0x7f4787ac5114]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f4787891d6d]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x7d86)[0x7f4787899ef6]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f47879e7e3b]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(PyEval_EvalCodeEx+0x42)[0x7f47879e81c2]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(PyEval_EvalCode+0x1f)[0x7f47879e85af]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x1cfbf1)[0x7f47879ecbf1]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x25f537)[0x7f4787a7c537]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f4787891d6d]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalFrameDefault+0x12fd)[0x7f478789346d]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyEval_EvalCodeWithName+0x8fb)[0x7f47879e7e3b]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(_PyFunction_Vectorcall+0x94)[0x7f4787ac5114]
/lib/x86_64-linux-gnu/libpython3.8.so.1.0(+0x74d6d)[0x7f4787891d6d]
--- END LIBC BACKTRACE ---
Aborted (core dumped)

Environment setup:
OS: Ubuntu20.04
llvm: https://github.com/plctlab/llvm-project (branch rvv-iscas)
riscv-gnu-toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain (Newlib)
gem5: https://github.com/RALC88/gem5 (branch develop)

Is it a matter of rvv version? Does this simulator support rvv-1.0?
Or, is the error caused by some other reasons?

warn: No functional unit for OpClass VectorArith1Src & etc.

OS WSL2 Ubuntu-20.04
Branch used develop
Python Python2.7.18

Good day. My friends and I met these warnings while testing the blackscholes benchmark. The warnings said that some of the vector ops aren't available

warn: CheckedInt already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: Enum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version [DEVELOP-FOR-V20.1]
gem5 compiled Jan  6 2022 17:53:18
gem5 started Jan  7 2022 10:01:00
gem5 executing on DESKTOP-9F2JKA5, pid 1176
command line: /mnt/d/AC/gem5/build/RISCV/gem5.opt /mnt/d/AC/gem5/configs/example/riscv_vector_engine.py '--cmd=/mnt/d/AC/gem5/riscv-vectorized-benchmark-suite/_jacobi-2d/bin/jacobi-2d_vector.exe 1 /mnt/d/AC/gem5/riscv-vectorized-benchmark-suite/_jacobi-2d/input/in_256.input output_vector.txt'

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (32768 Mbytes) does not match the address range assigned (2048 Mbytes)
warn: Unknown operating system; assuming Linux.
warn: No functional unit for OpClass VectorArith1Src
warn: No functional unit for OpClass VectorArith2Src
warn: No functional unit for OpClass VectorArith3Src
warn: No functional unit for OpClass VectorMaskLogical
warn: No functional unit for OpClass VectorReduction
warn: No functional unit for OpClass VectorConvertIntToFP
warn: No functional unit for OpClass VectorConvertFPToInt
warn: No functional unit for OpClass VectorWConvertFPToInt
warn: No functional unit for OpClass VectorWConvertIntToFP
warn: No functional unit for OpClass VectorWConvertFPToFP
warn: No functional unit for OpClass VectorNConvertFPToInt
warn: No functional unit for OpClass VectorNConvertIntToFP
warn: No functional unit for OpClass VectorNConvertFPToFP
warn: No functional unit for OpClass VectorFPCompare
warn: No functional unit for OpClass VectorIntCompare
warn: No functional unit for OpClass VectorSlideUp
warn: No functional unit for OpClass VectorSlideDown
warn: No functional unit for OpClass VectorToScalar
warn: No functional unit for OpClass VectorMemoryLoad
warn: No functional unit for OpClass VectorMemoryStore
warn: No functional unit for OpClass VectorConfig
0: system.remote_gdb: listening for remote gdb on port 7000

We analyzed the stats.txt, and somehow it showed us these OpClass are used:

system.cpu.op_class_0::VectorArith1Src           1600      0.01%     98.47% # Class of committed instruction
system.cpu.op_class_0::VectorArith2Src         227200      0.96%     99.43% # Class of committed instruction
system.cpu.op_class_0::VectorArith3Src          62400      0.26%     99.69% # Class of committed instruction
system.cpu.op_class_0::VectorMaskLogical            0      0.00%     99.69% # Class of committed instruction
system.cpu.op_class_0::VectorReduction              0      0.00%     99.69% # Class of committed instruction
system.cpu.op_class_0::VectorConvertIntToFP         6400      0.03%     99.72% # Class of committed instruction
system.cpu.op_class_0::VectorConvertFPToInt         9600      0.04%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorWConvertFPToInt            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorWConvertIntToFP            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorWConvertFPToFP            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorNConvertFPToInt            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorNConvertIntToFP            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorNConvertFPToFP            0      0.00%     99.76% # Class of committed instruction
system.cpu.op_class_0::VectorFPCompare          11200      0.05%     99.81% # Class of committed instruction
system.cpu.op_class_0::VectorIntCompare          1600      0.01%     99.82% # Class of committed instruction
system.cpu.op_class_0::VectorSlideUp                0      0.00%     99.82% # Class of committed instruction
system.cpu.op_class_0::VectorSlideDown              0      0.00%     99.82% # Class of committed instruction
system.cpu.op_class_0::VectorToScalar               0      0.00%     99.82% # Class of committed instruction
system.cpu.op_class_0::VectorMemoryLoad          9600      0.04%     99.86% # Class of committed instruction
system.cpu.op_class_0::VectorMemoryStore         1600      0.01%     99.86% # Class of committed instruction
system.cpu.op_class_0::VectorConfig             32000      0.14%    100.00% # Class of committed instruction

Questions
Should we ignore the warnings above?
If yes, is the data shown in stats.txt reliable?
Else, what could we do to solve these warnings?

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.