doonny / PipeCNN

An OpenCL-based FPGA Accelerator for Convolutional Neural Networks
Apache License 2.0
1.23k stars 370 forks source link

How to debug from the code. #169

Open TranQuocVietUIT opened 2 years ago

TranQuocVietUIT commented 2 years ago

Hi @doonny , I'm working on my project based on PipeCNN. I am reading your code. However, I have a few questions that need to be answered. I don't know how to use these macros (eg DEBUG_MEMRD, ...). In addition, I want to print some values ​​in the kernel which are in the coreConv code or others kernel code. I have written the above macros but none of the values ​​I want are output. Can you please let me know how I do it. Thanks for the help. Have a nice day. Viet

// The following macros are used for debug

define DEBUG_MEMRD

define DEBUG_CONV

define DEBUG_BN

define DEBUG_POOL

define DEBUG_MEMWR

define DEBUG_LRN

define DEBUG_LRN_OUT

Exaample:

ifdef DEBUG_CONV

if(Some thing) printf(Value);

endif

doonny commented 2 years ago

You could debug the code with software emulation.