halide / build_bot

Buildbot configuration for Halide build bots
4 stars 6 forks source link

RISC-V tests #214

Open dkurt opened 1 year ago

dkurt commented 1 year ago

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

  2. 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


3. 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?
steven-johnson commented 1 year ago

This is a good idea -- I can help implement this, but the thing that would help me a lot would be to know which Halide test groups are working and ready to be tested.