You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+28-13
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ LACore source is organized into the following:
10
10
The remainder of this file is an installation guide. For the software developer docs (if you want to write C-programs targeting the LACore), read the [LACoreAPI Developer Docs](LACoreAPI-Docs.md)
11
11
12
12
# Installing
13
-
This guide has been verified on ubuntu 14.04 only. Feel free to pioneer other platforms.
13
+
This guide has been verified on ubuntu 16.04 with gcc 4.9.3 only. Feel free to pioneer other platforms.
14
14
15
15
## Installing riscv-tools
16
16
First, you should read through and understand the installation guide for the [riscv-tools meta-repository](https://github.com/riscv/riscv-tools). You will __NOT__ be following it exactly, since the submodules have been merged into this repository.
@@ -23,7 +23,10 @@ First, put the following in your `.bashrc` file:
23
23
Then, install the ubuntu packages from the [riscv-tools](https://github.com/riscv/riscv-tools) guide, which at the time of this writing were:
Then, `cd` into the riscv-tools directory and run the following build scripts:
29
32
@@ -37,6 +40,7 @@ To make sure the RISC-V compiler with the LACore extension is working correctly,
37
40
38
41
First, change directories into `linalg-benchmarks/la_core_api`. Then run the following command:
39
42
43
+
mkdir out
40
44
make test_api \
41
45
test_data_movement_dp \
42
46
test_data_execution_dp \
@@ -58,7 +62,13 @@ The `SCRATCH_SIZE=16` is a bad hack to pass parameters to the LACore extension w
58
62
59
63
## cross-compiling GSL for RISC-V
60
64
61
-
The next step is cross-compiling GNU Scientific Library for RISC-V. We need GSL in order to run the HPCC benchmarks on the RISC-V platform, since we use GSL to verify the correctness of the LACore results. First, download [GSL sources](https://www.gnu.org/software/gsl/). Then run the following:
65
+
The next step is cross-compiling GNU Scientific Library for RISC-V. We need GSL in order to run the HPCC benchmarks on the RISC-V platform, since we use GSL to verify the correctness of the LACore results. First, download [GSL sources](https://www.gnu.org/software/gsl/). For example, this might work for you:
@@ -70,6 +80,7 @@ You should now have `libgsl.a` and `libgslcblas.a` in `$RISCV/lib`. Now we can l
70
80
71
81
Now we will cross-compile the modified HPCC benchmarks for the LACore to be run on the spike simulator. We will worry about gem5 after we can get the functional simulation of the benchmarks to pass. First change directories into `linalg-benchmarks/benchmarks`. Then run the following:
72
82
83
+
mkdir out
73
84
make dgemm_la_core_sweep \
74
85
dstream_la_core_sweep \
75
86
dfft_la_core_sweep \
@@ -78,7 +89,7 @@ Now we will cross-compile the modified HPCC benchmarks for the LACore to be run
78
89
ptrans_la_core_sweep \
79
90
dtrsm_la_core_sweep
80
91
81
-
This will build the 6 modified HPCC benchmarks (and DTRSM, a BLAS-3 routine) and put the output binaries in the `out` folder. Each of the 7 benchmarks takes slightly different parameters and you should just look at the `main()` function for each of them to figure out whats going on. Its not too complicated. For starters, here are simple command lines to run each of the benchmarks on the spike functional simulator using a 64 kB scratchpad and arbitrary workload sizes. __NOTE__: you can add a `--debug` flag to all the benchmarks for more verbose output if something seems wrong. __NOTE__: all matrix and vector data is randomly generated floating point numbers. The random number generator can use a different seed if you pass in `--seed=X`, where `X` is a positive integer.
92
+
This will build the 6 modified HPCC benchmarks (and DTRSM, a BLAS-3 routine) and put the output binaries in the `out` folder. Each of the 7 benchmarks takes slightly different parameters and you should just look at the `main()` function for each of them to figure out whats going on. For starters, here are simple command lines to run each of the benchmarks on the spike functional simulator using a 64 kB scratchpad and arbitrary workload sizes. __NOTE__: you can add a `--debug` flag to all the benchmarks for more verbose output if something seems wrong. __NOTE__: all matrix and vector data is randomly generated floating point numbers. The random number generator can use a different seed if you pass in `--seed=X`, where `X` is a positive integer.
82
93
83
94
The following will run DGEMM with 64x64 sized matrices, and a block size of 64x64 (you can change the block size if you want).
84
95
@@ -88,7 +99,7 @@ The following will run the STREAM benchmark with vector sizes of 2^12
The following will run the 1-D FFT benchmark with a vector size of 2^12
102
+
The following will run the 1-D FFT benchmark with a vector size of 2^12. __NOTE__: FFT for the LACore was broken by some recent changes, and needs to be fixed, so the following command will fail!
@@ -126,27 +137,31 @@ You'll most likely want to use the `MinorLACoreCPU` model. In order to run these
126
137
- configs/la_core/full_timing_la_core.py
127
138
- configs/la_core/minor_la_core.py
128
139
129
-
To run the HPCC benchmarks and DTRSM on the pipelined LACore model in gem5, with the same workload arguments as above, use the following command lines:
140
+
To run the HPCC benchmarks and DTRSM on the pipelined LACore model in gem5, with the same workload arguments as above, use the following command lines. __NOTE__: FFT for the LACore was broken by some recent changes, and needs to be fixed, so the following FFT command will fail!
If everything is passing, you have successfully installed the full LACore development environment, congratulations. You can now start writing your own benchmarks and programs and running them on spike and gem5 using the same workflow described here.
146
157
147
158
# Building x86 HPCC benchmarks
148
159
149
-
The HPCC benchmarks have also been written for the x86 superscalar platform. to build these, you need to install GSL and FFTW3 using `apt-get` or your package manager. Then, change directories into `linalg-benchmarks/benchmarks` and run the following command:
160
+
The HPCC benchmarks have also been written for the x86 superscalar platform. to build these, you need to install GSL and FFTW3 using `apt-get` or your package manager:
161
+
162
+
sudo apt-get install libfftw3-dev libgsl-dev
163
+
164
+
Then, change directories into `linalg-benchmarks/benchmarks` and run the following command:
0 commit comments