Giter VIP home page Giter VIP logo

speckle's Introduction

Purpose

The goal of this repository is to help you compile and run SPEC. This will NOT verify the output of SPEC.

Requirements

  • you must have your own copy of SPEC CPU2006 v1.2.
  • you must have built the tools in SPEC CPU2006 v1.2 (see below for help).

Details

We will compile the binaries "in vivo", calling into the actual SPEC CPU2006 directory. Once completed, the binaries are copied into this directory (./build).

The reasoning is that compiling the benchmarks is complicated and difficult (so why redo that effort?), but we want better control over executing the binaries. Of course, we are forgoing the validation and results building infrastructure of SPEC.

Setup

  • set the $SPEC_DIR variable in your environment to point to your copy of CPU2006-1.2.
  • modify Speckle/riscv.cfg as desired. It will get copied over to $SPEC_DIR/configs when compiling the benchmarks.
  • modify the BENCHMARKS variable in gen_binaries.sh as required to set which benchmarks you would like to compile and run.
  • modify the RUN variable in gen_binaries.sh as required to set how you would like to run the binaries (e.g., RUN="spike pk" to run on the Spike ISA simulator).

To compile binaries

    ./gen_binaries.sh --compile

You only need to compile SPEC once for a given SPEC input ("test", "train", "ref"). It should take about a minute.

To run binaries

    ./gen_binaries.sh --run

However, this only runs the binaries as specified by the $RUN variable in gen_binaries.sh, and it is running them via the symlinked directories in build/.

Building (and running) the binaries from a portable directory

By default, benchmarks are compiled and then symlinked into build/. However, for portability reasons, you can use:

     ./gen_binaries.sh --compile --copy

This will copy all the input files and binaries into a new directory (named after your CONFIG file and the INPUT size). This directory will contain a run.sh script and the commands/ directory needed to run SPEC anywhere!

Modify the generated "./${CONFIG}-spec-{$INPUT}/run.sh" script as required to run the binaries in your new environment.

TODO

  • add in training input set
  • provide input parameter control over the type and set of SPEC benchmarks built (e.g., currently requires manual hacking to build SPECInt vs SPECFP)
  • store output generated by SPEC into a separate /output directory

Known Issues

  • Currently, the riscv-pk does not support one of the perlbench.test workloads. This is because it calls the fork syscall, which is not supported by riscv-pk.
  • Currently, the riscv-pk exhibits errors on some of the reference input sets (it is reccommended that you use Linux instead).

Building SPEC Tools

These are the instructions that I had to follow to build the CPU2006 v1.2 tools from scratch on Intel amd64 machines running Ubuntu.

First, you can try:

    cd $SPEC_DIR/
    ./install.sh

Hopefully that works.

Building SPEC Tools: The Hard Way

If the Easy Way does not work, you can also try installing the tools from scratch. What follows is a method that worked for me.

Begin by creating a script (my_setup.sh) in cpu2006-1.2/tools/src with the following code:

    #!/bin/bash
    PERLFLAGS=-Uplibpth=
    for i in `gcc -print-search-dirs | grep libraries | cut -f2- -d= | tr ':' '\n' | grep -v /gcc`; do
        PERLFLAGS="$PERLFLAGS -Aplibpth=$i"
    done
    export PERLFLAGS
    echo $PERLFLAGS
    export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

Then:

    cd cpu2006-1.2/tools/src
    source my_setup.sh
    ./buildtools

speckle's People

Contributors

ccelio avatar aswaterman avatar palmer-dabbelt avatar

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.