diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index c99586cf..45ee168d 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -2,7 +2,7 @@ set -x -source "/usr/share/miniconda/etc/profile.d/conda.sh" +source $CONDA/etc/profile.d/conda.sh conda activate riscv_perf_model echo "Starting Build Entry" @@ -23,7 +23,7 @@ echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta mkdir -p release cd release -CC=$COMPILER CXX=$CXX_COMPILER cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} +CC=$COMPILER CXX=$CXX_COMPILER cmake .. -DCMAKE_BUILD_TYPE=Release -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 diff --git a/.github/workflows/conda/macos_env.yml b/.github/workflows/conda/macos_env.yml new file mode 100644 index 00000000..73d5ab8d --- /dev/null +++ b/.github/workflows/conda/macos_env.yml @@ -0,0 +1,182 @@ +name: riscv_perf_model +channels: + - conda-forge +dependencies: + - atk-1.* + - backcall=0.2.* + - backports=1.* + - backports.functools_lru_cache=1.6.* + - binutils_impl_linux-64=2.* + - boost=1.78.* + - boost-cpp=1.78.* + - brotli=1.0.* + - brotli-bin=1.0.* + - brotlipy=0.7.* + - bzip2=1.0.* + - ca-certificates=2022.12.* + - cairo=1.16.* + - c-ares=1.18.* + - cctools_osx-64=973.0.* + - certifi=2022.12.* + - cffi=1.15.* + - charset-normalizer=2.1.* + - clang=14.0.* + - clang-14=14.0.* + - clang_osx-64=14.0.* + - clangxx=14.0.* + - clangxx_osx-64=14.0.* + - cmake=3.25.* + - compiler-rt=14.0.* + - compiler-rt_linux-64=14.0.* + - compiler-rt_osx-64=14.0.* + - contourpy=1.0.* + - cppcheck=2.7.* + - cryptography=39.0.* + - cycler=0.11.* + - cython=0.29.* + - decorator=5.1.* + - doxygen=1.9.* + - executing=1.2.* + - expat=2.5.* + - fontconfig=2.14.* + - fonts-conda-ecosystem + - fonts-conda-forge + - fonttools=4.38.* + - font-ttf-dejavu-sans-mono=2.* + - font-ttf-inconsolata=3.* + - font-ttf-source-code-pro=2.* + - font-ttf-ubuntu=0.* + - freetype=2.12.* + - fribidi=1.0.* + - gdk-pixbuf=2.42.* + - gettext=0.21.* + - glib=2.74.* + - glib-tools=2.74.* + - gmp=6.2.* + - graphite2=1.3.* + - gst-plugins-base=1.22.* + - gstreamer=1.22.* + - gtk2=2.24.* + - harfbuzz=5.3.* + - hdf5=1.12.* + - icu=70.* + - idna=3.* + - ipython=8.10.* + - jedi=0.18.* + - jpeg + - kernel-headers_linux-64=2.6.* + - kiwisolver=1.4.* + - krb5=1.20.* + - lcms2=2.* + - ld64_osx-64 + - ld_impl_linux-64=2.* + - lerc=4.0.* + - libaec=1.0.* + - libblas=3.9.* + - libbrotlicommon=1.0.* + - libbrotlidec=1.0.* + - libbrotlienc=1.0.* + - libcblas=3.9.* + - libclang-cpp14=14.0.* + - libcurl=7.88.* + - libcxx=14.0.* + - libdeflate=1.* + - libedit=3.1.* + - libev=4.* + - libffi=3.4.* + - _libgcc_mutex=0.* + - libglib=2.74.* + - libiconv=1.* + - liblapack=3.9.* + - libllvm14=14.0.* + - libnghttp2=1.51.* + - libogg=1.3.* + - libopenblas=0.3.* + - libopus=1.3.* + - libpng=1.6.* + - libsqlite=3.40.* + - libssh2=1.10.* + - libtiff=4.5.* + - libuuid=2.32.* + - libuv=1.44.* + - libvorbis=1.3.* + - libwebp-base=1.2.* + - libxcb=1.* + - libxml2=2.10.* + - libzlib=1.2.* + - lld=15.0.7 + - llvm-openmp=15.0.* + - llvm-tools=14.0.* + - lz4-c=1.9.* + - make=4.* + - matplotlib-base=3.7.* + - matplotlib-inline=0.1.* + - mpfr=4.1.* + - munkres=1.1.* + - ncurses=6.* + - numpy=1.21.* + - openjpeg=2.5.* + - openssl=3.0.* + - packaging=23.* + - pango=1.50.* + - parso=0.8.* + - pathlib2 + - pcre2=10.* + - pcre=8.* + - pexpect=4.8.* + - pickleshare=0.7.* + - pillow=9.4.* + - pip=23.0.* + - pixman=0.40.* + - popt=1.* + - prompt-toolkit=3.0.* + - pthread-stubs=0.* + - ptyprocess=0.7.* + - pure_eval=0.2.* + - pycparser=2.* + - pygments=2.11.* + - pyopenssl=23.0.* + - pyparsing=3.0.* + - pysocks=1.7.* + - python=3.10.* + - python_abi=3.* + - python-dateutil=2.8.* + - pyyaml=6.* + - rapidjson=1.1.* + - readline=8.1.* + - requests=2.28.* + - rhash=1.4.* + - rsync=3.2.* + - setuptools=67.4.* + - sigtool=0.1.* + - six=1.16.* + - sqlite=3.40.* + - stack_data=0.6.* + - sysroot_linux-64=2.* + - tapi=1100.0.* + - texlive-core + - tk=8.6.* + - traitlets=5.9.* + - tzdata + - unicodedata2=15.0.* + - urllib3=1.26.* + - wcwidth=0.2.* + - wheel=0.38.* + - wxpython=4.2.* + - xorg-kbproto=1.0.* + - xorg-libice=1.0.* + - xorg-libsm=1.2.* + - xorg-libx11=1.7.* + - xorg-libxau=1.0.* + - xorg-libxdmcp=1.1.* + - xorg-libxext=1.3.* + - xorg-libxrender=0.9.* + - xorg-renderproto=0.11.* + - xorg-xextproto=7.3.* + - xorg-xproto=7.0.* + - xxhash=0.8.* + - xz=5.2.* + - yaml=0.2.* + - yaml-cpp=0.7.* + - zlib=1.2.* + - zstd=1.5.* diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml new file mode 100644 index 00000000..4c3ef2da --- /dev/null +++ b/.github/workflows/macos-build.yml @@ -0,0 +1,89 @@ +on: + pull_request: + branches: + - master + +env: + CACHE_VERSION: v1 + +name: Regress Olympia on MacOS +jobs: + build_test_job: + strategy: + # Strategy is a matrix of debug and release builds/regression + matrix: + os: [macos-12] + BUILD_TYPE: [Debug] + COMPILER: [clang] + + name: MacOS-${{ matrix.BUILD_TYPE }}-${{matrix.COMPILER}} + runs-on: ${{ matrix.os }} + + # Set up a global environment variable for build scripts + env: + OLYMPIA_BUILD_TYPE: ${{ matrix.BUILD_TYPE }} + COMPILER: ${{ matrix.COMPILER }} + + steps: + + # Get Olympia + - name: Checkout Olympia + uses: actions/checkout@v3 + with: + submodules: recursive + + # Get Sparta + - name: Checkout Sparta + uses: actions/checkout@v3 + with: + repository: sparcians/map + path: map + ref: map_v2.0.13 + + # Setup Conda and build environment + - name: Grab Python v3.8 + uses: actions/setup-python@v3 + with: + python-version: 3.8 + + # Cache the conda dependencies to + - name: Cache conda deps + uses: actions/cache@v3 + with: + key: ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-conda-${{ hashFiles('.github/workflows/conda/macos_env.yml') }} + path: /usr/share/miniconda/envs/riscv_perf_model # Default path for conda + + # Setup CCache to cache builds + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache-${{ github.ref_name }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache-master + ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache + + - name: Setup Conda Environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + channels: conda-forge,defaults + channel-priority: true + activate-environment: riscv_perf_model + environment-file: .github/workflows/conda/macos_env.yml + + # Build + - name: Build & Regress + run: ./.github/actions/build/entrypoint.sh + + # Save error logs, etc + - name: Save artifacts + if: failure() + uses: actions/upload-artifact@main + with: + name: ErrorLogs-${{matrix.BUILD_TYPE}}-${{matrix.COMPILER}} + path: ${{matrix.BUILD_TYPE}}/test/ + + #- name: CTest + # # Run CTests without Valgrind tests otherwise the runtime will be TOO long + # if: ${{ env.DABBLE_BUILD_TYPE == 'release' }} && ${{ env.VALGRIND == 'false' }} + # uses: ./.github/actions/ctest # Uses an action.yml in directory diff --git a/core/MavisUnit.cpp b/core/MavisUnit.cpp index 44ee0d6e..fb553da2 100644 --- a/core/MavisUnit.cpp +++ b/core/MavisUnit.cpp @@ -16,7 +16,11 @@ namespace olympia std::vector getISAFiles(sparta::TreeNode *n, const std::string & isa_file_path, const std::string& pseudo_file_path) { - std::vector isa_files = {isa_file_path + "/isa_rv64g.json", + std::vector isa_files = {isa_file_path + "/isa_rv64i.json", + isa_file_path + "/isa_rv64m.json", + isa_file_path + "/isa_rv64a.json", + isa_file_path + "/isa_rv64f.json", + isa_file_path + "/isa_rv64d.json", isa_file_path + "/isa_rv64zba.json", isa_file_path + "/isa_rv64zbb.json", isa_file_path + "/isa_rv64zbs.json", diff --git a/mavis b/mavis index ba3d7e41..055b22ae 160000 --- a/mavis +++ b/mavis @@ -1 +1 @@ -Subproject commit ba3d7e4141cd1dbce03cf7eb5481179836f2ac0f +Subproject commit 055b22aedf891ab2e41b2e3ca0164e85d4f20484