rapidstream-org / rapidstream-tapa

RapidStream-TAPA compiles task-parallel HLS program into high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
149 stars 30 forks source link

Compiles only for vadd app. Rest of the apps compilation fails #162

Open UbaidHunts opened 1 month ago

UbaidHunts commented 1 month ago

Hey

I am trying to run the applicaitons shipped with TAPA. However, I am unable to compile any of them except the vadd app. I get a lot of compilation errors. Here is an example of compilation error that I am getting:

/home/Documents/tapa/apps/gemv/run/flatten/flatten-9e59ad67-gemv.cpp:226:73: error: parameters cannot have fp16 type; did you forget * ? 226 | inline attribute__((always_inline)) unsigned short halfToRawBits(half pf)

warning: unknown attribute 'bitwidth' ignored [-Wunknown-attributes] 143 | typedef int attribute((bitwidth(_AP_N))) DataType;

error: use of undeclared identifier 'builtin_bit_select'; did you mean 'builtin_rotateleft8'? 707 | bool val = ({ typeof(Base::V) Val2 = Base::V; bool Result = builtin_bit_select((void*)(&Val2), i); Result__; });

note: 'builtin_rotateleft8' declared here 434 | bool is_neg = ({ typeof(reg.V) Val2 = reg.V; bool Result = builtin_bit_select((void*)(&Val2), BITS - 1); Result; });

Can someone please help ? My OS is Ubuntu 20.04 and Vitis 2023.1

Blaok commented 1 month ago
  226 | inline __attribute__((always_inline)) unsigned short halfToRawBits(half pf)

This comes from ap_int.h and I suspect this is related to the usage of that HLS header. gemv and bandwidth are the only kernels under apps that include this header. Could you double check if other apps work? I don't see why vadd compiles but the rest don't.

Also, it'll be good if you could paste the complete log output with original formatting. You could wrap your log in triple backticks (```) to preserve formatting:

/home/Documents/tapa/apps/gemv/run/flatten/flatten-9e59ad67-gemv.cpp:226:73: error: parameters cannot have fp16 type; did you forget * ? 226 | inline attribute__((always_inline)) unsigned short halfToRawBits(half pf)

warning: unknown attribute 'bitwidth' ignored [-Wunknown-attributes] 143 | typedef int attribute((bitwidth(_AP_N))) DataType;

error: use of undeclared identifier 'builtin_bit_select'; did you mean 'builtin_rotateleft8'? 707 | bool val = ({ typeof(Base::V) Val2 = Base::V; bool Result = builtin_bit_select((void*)(&Val2), i); Result__; });

note: 'builtin_rotateleft8' declared here 434 | bool is_neg = ({ typeof(reg.V) Val2 = reg.V; bool Result = builtin_bit_select((void*)(&Val2), BITS - 1); Result; });

UbaidHunts commented 1 month ago

Hy. Yes I read the compilation error is because of ap_int. Any application that has ap_int.h header file included gives error. And actually most of the applications that we write for our work needs ap_int.h library. So we were wondering have you figured out any solution for this problem?

Following is the log file attached. output.log

Thankss