Giter Club home page Giter Club logo

Comments (6)

hcneema avatar hcneema commented on July 26, 2024
  1. with no " set ::LLVM_CUSTOM_CMD " : does the flow work ok ?
  2. With the " set ::LLVM_CUSTOM_CMD " Does the csynth finished message get printed ? The message should look something like " Finished Command csynth ". The xml file should be generated if csynth_design finishes ok. If csynth_design doesnt finish ok then there is something in test.bc that is causing an issue and will need to be looked into furthur.

from hls.

SerenaC94 avatar SerenaC94 commented on July 26, 2024

Without the custom command the flow works. With the custom command as above, here are some relevant messages from the log:

INFO: [HLS 200-111] Finished Generating all RTL models: CPU user time: 0.18 seconds. CPU system time: 0.02 seconds. Elapsed time: 0.23 seconds; current allocated memory: 331.102 MB.
INFO-FLOW: Done: create_csynth_xml read xml data time: 0 seconds per iteration
INFO-FLOW: Done: create_csynth_xml bind info time: 0 seconds per iteration
INFO-FLOW: Done: create_csynth_xml config info time: 0 seconds per iteration
INFO-FLOW: Done: create_csynth_xml write xml time: 0 seconds per iteration
INFO-FLOW: DBG:PUTS:       create_csynth_xml wrote csynth_xml=proj/solution1/syn/report/csynth.xml
INFO-FLOW: DBG:PROC: ::AP::DESIGN_DATA::generate_json generate_bd_files='0' generate_xo_files='0' modelList='example_fadd_32ns_32ns_32_11_full_dsp_1
example
' rtl_lang='both' bootstrap_tcl='false' outdir='' outfilename=''
Execute       source proj/solution1/.autopilot/db/global.setting.tcl 
Execute       source proj/solution1/.autopilot/db/global.setting.tcl 
Execute       get_solution -flow_target 
Execute       get_config_export -xo 
Execute       get_config_export -format 
INFO-FLOW: DBG:PUTS:       auto_generate_csynth_design error: Missing FE IO mapping file: proj/solution1/.autopilot/db/top-io-fe.xml

So csynth_design is not finished maybe? The RTL models were definitely generated though.

I do want to know what the problem is in test.bc, otherwise I will never be able to use this flow ;)
The command I used to generate it was:

/opt/Xilinx/Vitis_HLS/2021.1/lnx64/tools/clang-3.9-csynth/bin/clang -fno-limit-debug-info -fhls -flto -fno-exceptions -Wno-error=c++11-narrowing test.c -fno-math-errno -c -emit-llvm -mllvm -disable-llvm-optzns -Werror=implicit-function-declaration -Werror=implicit-hls-streams -Werror=return-type -Wpragmas -Wunused-parameter -std=gnu99 -fgnu89-inline -target fpga64-xilinx-linux-gnu -D__VITIS_HLS__ -DAESL_SYN -D__SYNTHESIS__ -D__HLS_SYN__ -D__DSP48E1__ -g -o test.bc -hls-platform-db-name=/opt/Xilinx/Vitis_HLS/2021.1/common/technology/xilinx/common/platform.db -hls-platform-name=virtex7_medium

from hls.

hcneema avatar hcneema commented on July 26, 2024

Hello, could you please :

  1. confirm that the Xilinx/AMD provided example (which uses LLVM_CUSTOM_CMD) works for you ? To note: one of the provided examples has this kind of usage
  2. confirm for your testcase that ./proj/solution1/.autopilot/db/top-io-fe.xml indeed does not exist.

After this we can begin triaging the issue - please prepare the smallest possible testcase (test.c / tcl file/other test files)

from hls.

SerenaC94 avatar SerenaC94 commented on July 26, 2024

The example provided in https://github.com/Xilinx/HLS/tree/main/vitis_hls_examples/override_opt_flow_demo works correctly.

./proj/solution1/.autopilot/db/top-io-fe.xml does not exist.

I am attaching an archive containing the input C code, tcl script, and a README with the command I used to generate the LLVM IR.
bug-report.zip

from hls.

yu810226 avatar yu810226 commented on July 26, 2024

Hello @SerenaC94 ,
What you were trying out on the test.bc is probably not the same as the input bc for the LTO command in full flow csynth. You may want to look into if the top function in the kernel file source is corrected marked or not. Else your test.bc might miss the top function attribute, and this would lead to missing top-io-fe.xml error. You could either improve your kernel file source code to mark the top function, or have a pass for adding top function attribute to your top function at llvm level.

Tips to debug this is to look into the autopilot.flow.log in the full flow csynth, and see the difference between your compiled source and the input of "Source preprocessing" command on the kernel. The other way is to compare your generated $LLVM_CUSTOM_OUTPUT and the input of "LTO" command.

If you don't mind sharing, I would like to know more on the intention of this experiment. Is this an exercise on exploring more the open source flow? Or are you trying to achieve other things in mind? Thanks!

from hls.

SerenaC94 avatar SerenaC94 commented on July 26, 2024

Ok thanks for the pointer! I inspected the intermediate IRs generated during csynth, and found "fpga.top.func"="dot_16_kernel" in the top function attributes, I probably need to add at least this, and probably also other attributes, to my LLVM IR.

I am experimenting because I want to know what are the requirements to synthesize an LLVM IR with vitis, in order to use later a frontend that produces LLVM IRs.

from hls.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.