google / CFU-Playground

Want a faster ML processor? Do it yourself! -- A framework for playing with custom opcodes to accelerate TensorFlow Lite for Microcontrollers (TFLM). . . . . . Online tutorial: https://google.github.io/CFU-Playground/ For reference docs, see the link below.

Home Page:http://cfu-playground.rtfd.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

./scripts/install_oxide is broken (yosys plugin compilation)

tcal-x opened this issue · comments

commented

I saw this in a failing CI run:

BUILDING YOSYS PLUGINS
g++ -Wall -Wextra -ggdb -I/usr/local/share/yosys/include -MD -MP -D_YOSYS_ -fPIC -I/usr/local/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_ZLIB -I/usr/include/tcl8.6 -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER    -c -o dsp_ff.o dsp_ff.cc
dsp_ff.cc:1:10: fatal error: kernel/register.h: No such file or directory
    1 | #include "kernel/register.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [../Makefile_plugin.common:64: dsp_ff.o] Error 1
Error: Process completed with exit code 2.

I can reproduce locally it if I don't have a system Yosys already installed under /usr/local/{share,bin}/.

The problem seems to be -I/usr/local/share/yosys/include, even though the install_oxide script sets:

YOSYS_PATH=${DESTDIR}/usr/local make -j$(nproc)

Edit: took out misdiagnosis.

./third_party/usr/local/share/yosys/include/kernel/register.h does exist, but the flags generated by yosys-config don't include the right -I path to it. This doesn't seem right, that the Yosys plugins can't be compiled unless you've installed Yosys at system level...

commented

These are the flags generated by yosys_config which is sitting in its local install location:

$ ./third_party/usr/local/bin/yosys-config --cxxflags
-Wall -Wextra -ggdb -I/usr/local/share/yosys/include -MD -MP -D_YOSYS_ -fPIC -I/usr/local/include -std=c++11 -Os -DYOSYS_ENABLE_READLINE -DYOSYS_ENABLE_PLUGINS -DYOSYS_ENABLE_GLOB -DYOSYS_ENABLE_ZLIB -I/usr/include/tcl8.6 -DYOSYS_ENABLE_TCL -DYOSYS_ENABLE_ABC -DYOSYS_ENABLE_COVER
commented

Fixed by #544.