Hi,
I wrote kernels which are distributed between two files. And I tried compiling , it looked to be compiling fine.
But during linking it throws error as below.
I am also attaching my Makefile for reference.
Please let me know how i can solve this error.
make
aoc -v -report -march=emulator -legacy-emulator -I ../../stb -I device/RTL -L device/RTL -l rtl_lib.aoclib -g ./device/conv_pipe.cl ./device/frcnn.cl
Resolving library filenames to full paths
lib_path = device/RTL
lib_file = rtl_lib.aoclib
Resolved rtl_lib.aoclib to /home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/RTL/rtl_lib.aoclib
lib_path = .
All OpenCL C models were extracted from specified libraries and added to compilation
aoc: Environment checks are completed successfully.
aoc: Cached files in /var/tmp/aocl/ may be used to reduce compilation time
You are now compiling the full flow!!
aoc: Selected default target board a10gx
aoc: Running OpenCL parser....
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/conv_pipe.cl:119:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/conv_pipe.cl:402:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/conv_pipe.cl:566:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/conv_pipe.cl:661:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/conv_pipe.cl:963:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
5 warnings generated.
aoc: OpenCL parser completed successfully.
aoc: Selected default target board a10gx
aoc: Running OpenCL parser....
/home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/frcnn.cl:105:16: warning: unknown attribute 'task' ignored
__attribute__((task))
^
1 warning generated.
aoc: OpenCL parser completed successfully.
aoc: Selected default target board a10gx
aoc: Running OpenCL parser....
aoc: OpenCL parser completed successfully.
aoc: Linking Object files....
aoc: Compiling for Emulation ....
aocl-opt: /build/swbuild/SJ/nightly/19.2/57/l64/p4/acl/llvm/lib/IR/Value.cpp:404: void llvm::Value::doRAUW(llvm::Value*, llvm::Value::ReplaceMetadataUses): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.
Stack dump:
0. Program arguments: /home/wc/intelFPGA_pro/19.2/hld/linux64/bin/../../llvm/bin/aocl-opt -translate-library-calls -reverse-library-translation -insert-ip-library-calls -create-emulator-wrapper -generate-emulator-sys-desc -VPODirectiveCleanup -libfile /home/vinay/Documents/stryker-fasterRCNN/stryker-arria10/project/device/RTL/rtl_lib.aoclib -dbg-info-enabled c_model.1.bc -o c_model.bc
1. Running pass 'CreateEmulatorWrappers: Creates kernel wrapper functions and lookup table that can be called from the emulator run time' on module 'c_model.1.bc'.
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x7f575a4e5a4a]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(_ZN4llvm3sys17RunSignalHandlersEv+0x4c)[0x7f575a4e39ec]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(+0xc22b3c)[0x7f575a4e3b3c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f57596b4890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f5757f51e97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f5757f53801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f5757f4339a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f5757f43412]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(_ZN4llvm5Value6doRAUWEPS0_NS0_19ReplaceMetadataUsesE+0x230)[0x7f575a678ef0]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(+0x1f639e9)[0x7f575b8249e9]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(+0x1f6ccd0)[0x7f575b82dcd0]
/home/wc/intelFPGA_pro/19.2/hld/llvm/bin/../lib/libLLVM-8svn.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x3bc)[0x7f575a61da5c]
/home/wc/intelFPGA_pro/19.2/hld/linux64/bin/../../llvm/bin/aocl-opt(main+0x26c5)[0x555c80165b15]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f5757f34b97]
/home/wc/intelFPGA_pro/19.2/hld/linux64/bin/../../llvm/bin/aocl-opt(+0x2a6bd)[0x555c801666bd]
Aborted (core dumped)
Error: Optimizer FAILED.
Refer to c_model/c_model.log for details.
Makefile:139: recipe for target 'conv.aocx' failed
make: *** [conv.aocx] Error 1