From fc0abf2ff8d5ebe288dc6762568f92299f97d849 Mon Sep 17 00:00:00 2001 From: Luca Colagrande Date: Mon, 23 Oct 2023 11:25:38 +0200 Subject: [PATCH] clang: Bump to experimental -mno-fdiv toolchain --- .gitlab-ci.yml | 6 ++---- target/snitch_cluster/sw/run.yaml | 4 ++-- target/snitch_cluster/sw/toolchain.mk | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a245d51f3b..41e0569b36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,8 +12,7 @@ variables: VCS: vcs-2020.12 VERILATOR: verilator-4.110 QUESTA: questa-2022.3 - LLVM_BINROOT: /usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin - CLANG: /usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin/clang + LLVM_BINROOT: /usr/scratch/vulcano/colluca/workspace/NOFDIV/install/bin CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: /usr/pack/gcc-9.2.0-af/linux-x64/bin/gcc LLVM_SYS_120_PREFIX: /usr/pack/llvm-12.0.1-af CMAKE: cmake-3.18.1 @@ -22,6 +21,7 @@ before_script: - $PYTHON -m venv .venv - source .venv/bin/activate - pip install -r python-requirements.txt + - $BENDER vendor init ############## # Build docs # @@ -37,7 +37,6 @@ docs: snitch-cluster-sw: script: - - $BENDER vendor init - cd target/snitch_cluster - make sw artifacts: @@ -48,7 +47,6 @@ snitch-cluster-sw: snitch-cluster-sw-banshee: script: - - $BENDER vendor init - cd target/snitch_cluster - make SELECT_RUNTIME=banshee sw artifacts: diff --git a/target/snitch_cluster/sw/run.yaml b/target/snitch_cluster/sw/run.yaml index f25ea76418..e55d1ecbfb 100644 --- a/target/snitch_cluster/sw/run.yaml +++ b/target/snitch_cluster/sw/run.yaml @@ -80,8 +80,8 @@ runs: # - elf: apps/dnn/gelu/build/gelu.elf # seems like it stalls # - elf: apps/dnn/conv2d/build/conv2d.elf # fails with exit code 32 # - elf: apps/dnn/fusedconv/build/fusedconv.elf # fails newly - # - elf: apps/dnn/layernorm/build/layernorm.elf + - elf: apps/dnn/layernorm/build/layernorm.elf # throws illegal instruction on FDIV in simulation - # - elf: apps/dnn/softmax/build/softmax.elf + - elf: apps/dnn/softmax/build/softmax.elf # throws illegal instruction on FDIV in simulation - elf: apps/montecarlo/pi_estimation/build/pi_estimation.elf diff --git a/target/snitch_cluster/sw/toolchain.mk b/target/snitch_cluster/sw/toolchain.mk index ca5f6a4820..00ab29ed88 100644 --- a/target/snitch_cluster/sw/toolchain.mk +++ b/target/snitch_cluster/sw/toolchain.mk @@ -31,7 +31,7 @@ RISCV_CFLAGS += -mcpu=snitch RISCV_CFLAGS += -menable-experimental-extensions RISCV_CFLAGS += -mabi=ilp32d RISCV_CFLAGS += -mcmodel=medany -# RISCV_CFLAGS += -mno-fdiv # Not supported by Clang +RISCV_CFLAGS += -mno-fdiv RISCV_CFLAGS += -ffast-math RISCV_CFLAGS += -fno-builtin-printf RISCV_CFLAGS += -fno-builtin-sqrtf