Skip to content

Latest commit

 

History

History
163 lines (123 loc) · 5.46 KB

install_vortex.md

File metadata and controls

163 lines (123 loc) · 5.46 KB

Installing and Setting Up the Vortex Environment

Ubuntu 22.04

  1. Install the following dependencies:

    sudo apt-get update
    sudo apt-get install build-essential cmake ccache zlib1g-dev libtinfo-dev libncurses-dev uuid-dev libboost-serialization-dev libpng-dev libhwloc-dev
    

    (Optional) for roofline/perf plotting:

    sudo apt-get install python3-numpy python3-matplotlib
    
  2. Download the Vortex codebase:

    git clone --depth=1 --recursive https://github.com/vortexgpgpu/vortex.git
    
  3. Build and install Vortex:

    $ cd vortex
    $ mkdir -p build
    $ cd build
    $ ../configure --xlen=32 --tooldir=$HOME/tools
    $ ./ci/toolchain_install.sh
    $ make -s
    $ make install
    $ export VORTEX_PATH=$(pwd)/install
    $ export PKG_CONFIG_PATH=$VORTEX_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
    

    ../configure writes the full toolchain layout (paths, XCONFIGS, tool binaries) into the build dir's Makefiles, so no shell env sourcing is required and multiple Vortex trees can coexist on one machine without a global ~/.bashrc clobber.

    Useful configure options: --xlen={32,64} selects the ISA width, --prefix=<path> the install location, and --profile=<name> builds the machine described by profiles/<name>.json by default (see Hardware Profiles). Two SimX build knobs are plain config defines, passed like any VX_CFG_* option through CONFIGS: -DSIMX_MT=<T> runs the simulator on T host threads (default serial; cycle results are bit-identical for every thread count), and -DSIMX_FUNCTIONAL builds the functional simulation kernel (timing disabled, for full-speed architectural runs such as conformance suites — functional cycle counts are non-physical and must never be used for performance comparisons):

    $ CONFIGS="-DSIMX_MT=4" ./ci/blackbox.sh --driver=simx --app=sgemm --cores=4 --l2cache
    $ CONFIGS="-DSIMX_FUNCTIONAL" ./ci/blackbox.sh --driver=simx --app=sgemm
    

    make install lays out the Vortex SDK under $VORTEX_PATH (default <build>/install, override with ../configure --prefix=...):

    $VORTEX_PATH/
    ├── kernel/include/        public device-side headers (vx_*.h)
    ├── kernel/lib<XLEN>/      libvortex2.a + libvortex.a
    ├── runtime/include/       public host-side headers (graphics.h,
    │                           vortex2.h, vortex.h, tensor.h, dxa.h)
    ├── runtime/lib/           libvortex.so + libvortex-{simx,xrt,
    │                           rtlsim,opae}.so
    └── lib/pkgconfig/         vortex-runtime.pc + vortex-kernel.pc
    

    Downstream tools (mesa, pocl, chipstar) consume Vortex through $VORTEX_PATH and pkg-config — same shape as the CUDA, ROCm and oneAPI SDKs. Source-tree paths ($VORTEX_HOME) and build-tree paths ($VORTEX_BUILD_DIR) are not exposed to those consumers.

RHEL 8

Note: depending on the system, some of the toolchain may need to be recompiled for non-Ubuntu Linux. The source for the tools can be found here.

  1. Install the following dependencies:

    sudo yum install libpng-devel boost boost-devel boost-serialization libuuid-devel opencl-headers hwloc hwloc-devel gmp-devel compat-hwloc1
    

    (Optional) for roofline/perf plotting:

    sudo yum install python3-numpy python3-matplotlib
    
  2. Upgrade GCC to 11:

    sudo yum install gcc-toolset-11
    

    Multiple gcc versions on Red Hat can be managed with scl

  3. Install MPFR 4.2.0:

    Download the source and follow the installation documentation.

  4. Download the Vortex codebase:

    git clone --depth=1 --recursive https://github.com/vortexgpgpu/vortex.git
    
  5. Build and install Vortex

    $ cd vortex
    $ mkdir -p build
    $ cd build
    $ ../configure --xlen=32 --tooldir=$HOME/tools
    $ ./ci/toolchain_install.sh
    $ make -s
    $ make install
    $ export VORTEX_PATH=$(pwd)/install
    $ export PKG_CONFIG_PATH=$VORTEX_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
    

    See the Ubuntu section above for the install-tree layout.

RHEL 9 (Rocky / AlmaLinux / CentOS Stream 9)

configure detects EL9 and selects the rhel/9 prebuilt bundles, built natively on RHEL 9.8 (glibc 2.34, system GCC 11). The ubuntu/focal bundles do not run on EL9: they need glibc 2.35 / GLIBCXX_3.4.30. No toolchain component has to be compiled locally.

  1. Install the build dependencies:

    sudo dnf install gcc gcc-c++ make cmake ccache zlib-devel ncurses-devel
    

    The graphics library (third_party/cocogfx, built by a plain make) also needs libpng-devel and boost-devel. OpenCL and HIP tests need the ocl-icd loader.

  2. Configure and install the toolchain as in the Ubuntu section:

    $ mkdir -p build && cd build
    $ ../configure --xlen=32 --tooldir=$HOME/tools
    $ ./ci/toolchain_install.sh
    

    Limits of the rhel/9 bundle set: gem5 is not provided (--gem5 / --all fail), and riscv*-unknown-elf-gdb does not start (it links libpython2.7). Neither is used by the build or the simulators.

  3. Build with make -s. Without libpng-devel / boost-devel, build only what simx and rtlsim need:

    $ make -C ../third_party softfloat ramulator
    $ make -C sw/kernel && make -C sw/runtime/stub
    $ ./ci/blackbox.sh --driver=simx --app=sgemm --args="-n16"