Giter Club home page Giter Club logo

Comments (9)

keryell avatar keryell commented on July 26, 2024 1

There is some doc in https://github.com/triSYCL/sycl/blob/sycl/unified%2Fnext/sycl/doc/Xilinx_sycl_compiler_architecture.rst
At least you can see how v++ is used with this script https://github.com/triSYCL/sycl/blob/sycl/unified/next/sycl/tools/sycl-xocc/bin/sycl-xocc
This script shows for example how we use the xoccIRDowngrader to feed v++ with some LLVM IR generated by the latest LLVM. This pass is in https://github.com/triSYCL/sycl/blob/sycl/unified/next/llvm/lib/SYCL/XOCCIRDowngrader.cpp
If you improve this process, keep the triSYCL team posted so we can benefit from your experience! :-)

from hls.

keryell avatar keryell commented on July 26, 2024 1

Our scripts and passes have been renamed to match the new Vitis/v++ tool names:

from hls.

keryell avatar keryell commented on July 26, 2024

We have an example using another front-end in https://github.com/triSYCL/sycl, look at the sycl/unified/next branch and how v++ is fed from the Clang driver with some LLVM bitcode.
Unfortunately it is not a small sample code...

from hls.

yu810226 avatar yu810226 commented on July 26, 2024

If your generated LLVM IR is in 7.0 format, you can leverage the plugin with ::LLVM_CUSTOM_INPUT to pick up the your generated one and then utilizing the ::LLVM_CUSTOM_OUTPUT to pass it downwards to the flow. Else you will need to have an IR transformer for translating different version LLVM IR to the LLVM 7.0 IR, and call it before the plugin or add it into the plugin. Above triSYCL xoccIRDowngrader is another way to go for feeding v++ higher version of LLVM IR.

from hls.

RicDen avatar RicDen commented on July 26, 2024

@yu810226 Could you point me please to an example on how to pass LLVM 7.0 IR downwards in the flow.
Also do I still need to load C++/v++ or similar into my tcl script?
Thank you very much!

from hls.

rgioiosa78 avatar rgioiosa78 commented on July 26, 2024

@yu810226 I'm trying to do something similar too and I was wondering if you could provide an example of how to pass LLVM 7.0 downwards the flow? maybe a simple .tcl script? Thank you very much!

from hls.

Ralender avatar Ralender commented on July 26, 2024

If the LLVM you have is compatible in version with HLS's LLVM IR, you don't need to go through sycl_vxx.py(maybe you even cant)
what you can simply do assuming you ir is in kernel.ll is:

  • use Vitis's llvm-as to do: llvm-as kernel.ll -o kernel.xpirbc
  • use: v++ kernel.xpirbc -o kernel.xo ...

.xpirbc is the "magic" extension sycl_vxx.py uses under the hood to feed LLVM IR to v++

all the other stuff sycl_vxx.py does is about downgrading IR, lowering sycl annotation into HLS annotations and removing code pattern HLS has a hard time with.

from hls.

yu810226 avatar yu810226 commented on July 26, 2024

Hello @rgioiosa78 ,
The LLVM_CUSTOM_INPUT could be set to be your input.bc. And you would need the dummy source file for an empty kernel that's with the function signature met the one you your input.bc.

The tcl file would be similar to below with above mentioned change.
https://github.com/Xilinx/HLS/blob/main/vitis_hls_examples/override_opt_flow_demo/run_hls.tcl

from hls.

gabrielrodcanal avatar gabrielrodcanal commented on July 26, 2024

Hello @rgioiosa78 , The LLVM_CUSTOM_INPUT could be set to be your input.bc. And you would need the dummy source file for an empty kernel that's with the function signature met the one you your input.bc.

The tcl file would be similar to below with above mentioned change. https://github.com/Xilinx/HLS/blob/main/vitis_hls_examples/override_opt_flow_demo/run_hls.tcl

@yu810226 I tried this method but Vitis HLS complains that the top function is not found.

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.