Skip to content

RISC-V tests #214

@dkurt

Description

@dkurt

Hi! Due Halide now supports RISC-V both in AOT and JIT modes, it would be nice to know if riscv64 based buildbot instance for tests can be added. There are two approaches I can suggest based on QEMU:

  1. Use Ubuntu cross-compilers in Docker:
sudo apt-get update
sudo apt-get install -y crossbuild-essential-riscv64 qemu-user-static

Then qemu-riscv64-static can be used to run the binaries

  1. Use Ubuntu QEMU images (https://ubuntu.com/download/risc-v)
    example:
sudo apt-get install qemu-system-misc opensbi u-boot-qemu qemu-utils
wget https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-riscv64.img.xz
xz -dk ubuntu-20.04.2-preinstalled-server-riscv64.img.xz

qemu-system-riscv64 \
    -machine virt -nographic -m 2048 -smp 2 \
    -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf \
    -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
    -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \
    -drive file=ubuntu-20.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio
  1. For RVV tests there are https://github.com/riscv-collab/riscv-gnu-toolchain and https://syntacore.com/page/products/sw-tools available.

Maybe, it's better start with LLVM 15. How can I help here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions