可配参数(Configurable Arguments)

共通(Common)

cc: Compiler Collection used for compiling RISC-V binaries.

  • Type: string
  • Default value: "gcc14"
  • Available values: Prefix of any nixpkgs-supported xxxStdenv. To list available xxxStdenv:
    nix-instantiate --eval -E 'let pkgs=import <nixpkgs> {}; in builtins.filter (x: pkgs.lib.hasSuffix "Stdenv" x)(builtins.attrNames pkgs)'
    
  • TODO: Currently only supports GCC's stdenv. LLVM's fortran compiler (flang) is needed to support Clang's stdenv. Preliminary experiments with riscv64-jemalloc show that Clang provides better auto-vectorization than GCC.

构建器(Builders)

cores: Number of cores.

  • Type: number-in-string
  • Default value: "1"
  • Available values: "1", "2". (LibCheckpoint is still in development, its stable configuration current only supports dual core)
  • Note: cpt-simulator: qemu supports multiple cores, however, nemu only supports single core.

cpt-maxK: maxK value for all benchmarks in checkpoint generation.

  • Type: number-in-string
  • Default value: "30"
  • Description: maxK is a parameter in SimPoint algorithm used during the checkpoint's clustering stage. cpt-maxK will set maxK for all benchmarks' clustering stage in checkpoints generation. To override the maxK for specific benchmarks, refer to the cpt-maxK-bmk argument.

cpt-intervals: Number of BBV interval instructions in checkpoint generation.

  • Type: number-in-string
  • Default value: "20000000"

cpt-simulator: Simulator used in checkpoint generation.

  • Type: string

  • Default value: "qemu"

  • Available values: "qemu", "nemu"

  • Note: Though nemu is faster than qemu,

    • nemu does not support multiple cores,
    • the current version of nemu is not deterministic.

    Therefore, qemu is chosen as the default simulator. For more information, refer to OpenXiangShan/Deterload Issue #8: nemu is not deterministic.

cpt-format: Compress format of output checkpoints.

  • Type: string
  • Default value: "zstd"
  • Available value: "zstd", "gz"
  • Note: nemu supports both formats; however, qemu only supports zstd format.

interactive: The image is interactive.

  • Type: bool
  • Default value: false
  • Note: This argument only use together with -A sim to debug.

enableTrap: Whether to incorporate QEMU/NEMU trap in image.

  • Type: bool
  • Default value: true

OpenBLAS

TARGET: CPU TARGET for OpenBLAS.

  • Type: string
  • Default value: "RISCV64_GENERIC"`
  • Available values: "RISCV64_GENERIC", "RISCV64_ZVL128B", "RISCV64_ZVL256B"

SPEC CPU 2006

enableVector: Controls compiler's auto-vectorization during benchmark builds.

  • Type: bool
  • Default value: false

src: Path to SPEC CPU 2006 source code.

  • Note: As SPEC CPU 2006 is a proprietary benchmark, it cannot be incorporated in Deterload's source code. You need to obatin the its source code through legal means.
  • Type: path
  • Supported path types:
    • Path to a folder:

      The folder must be the root directory of the SPEC CPU 2006 source code.

      Example:

      src = /path/miao/spec2006;
      

      Required folder structure:

      /path/miao/spec2006
      ├── benchspec/
      ├── bin/
      ├── tools/
      ├── shrc
      ...
      
    • Path to a tar file:

      The tar file must contain a folder named exactly spec2006, with the same folder structure as above.

      Supported tar file extensions:

      • gzip (.tar.gz, .tgz or .tar.Z)
      • bzip2 (.tar.bz2, .tbz2 or .tbz)
      • xz (.tar.xz, .tar.lzma or .txz)

      Example:

      src = /path/of/spec2006.tar.gz;
      
    • For more information about supported path types, please see Nixpkgs Manual: The unpack phase.

size: Input size for SPEC CPU 2006.

  • Type: string
  • Default value: "ref"
  • Available values: "ref", "train", "test"

optimize: Compiler optimization flags for SPEC CPU 2006.

  • Type: string
  • Default value: "-O3 -flto"

march: Compiler's -march option for SPEC CPU 2006.

  • Type: string
  • Default value: "rv64gc${lib.optionalString enableVector "v"}"
  • Description: The default value depends on enableVector:
    • If enableVector is true, the default value is "rv64gc",
    • If enableVector is false, the default value is "rv64gcv".

testcase-filter: Function to filter SPEC CPU 2006 testcases.

  • Type: string -> bool
  • Default value: testcase: true
  • Description: testcase-filter takes a testcase name as input and returns:
    • true: include this testcase
    • false: exclude this testcase
  • Example 1: Include all testcases:
    testcase-filter = testcase: true;
    
  • Example 2: Only include 403_gcc:
    testcase-filter = testcase: testcase == "403_gcc";
    
  • Example 3: Exlcude 464_h264ref and 465_tonto:
    testcase-filter = testcase: !(builtins.elem testcase [
      "464_h264ref"
      "465_tonto"
    ]);
    

per-bmk-maxK: maxK values for specifed benchmarks in checkpoint generation.

  • Type: attr ({ benchmark-name = number-in-string; ... })
  • Default value: { "483_xalancbmk" = "100"; }
  • Description: per-bmk-maxK sets the the maxK for specifed benchmarks. Unspecified benchmarks will use the value from cpt-maxK. This attribute consists of key-value pairs where:
    • Key: benchmark name.
    • Value: number in a string (same format as cpt-maxK).
  • FAQ: Why set maxK of 483_xalancbmk to 100?
    • Setting maxK to 30 for 483_xalancbmk resulted in unstable scores.