Comments (9)
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.
Our scripts and passes have been renamed to match the new Vitis/v++
tool names:
- https://github.com/triSYCL/sycl/blob/sycl/unified/next/sycl/tools/sycl-vxx/bin/sycl_vxx.py (look at the flow using
vitis_hls
) - https://github.com/triSYCL/sycl/blob/sycl/unified/next/llvm/lib/SYCL/VXXIRDowngrader.cpp
from hls.
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.
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.
@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.
@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.
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.
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.
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)
- Way to turn off Optimizations after Custom Pass HOT 1
- Usage of this front-end HOT 1
- Compilation with HLS streams fails HOT 5
- How to add externel liberaris in HLS.
- stream.full() Method Doesn't Work in Software Simulation
- None
- Pointer to developper documentation HOT 2
- `ap_hs` doesn't work with `hls::stream` HOT 3
- Invalid record Error - Vitis HLS Custom Input HOT 1
- Error: Missing FE IO mapping file HOT 6
- Vitis deletes LLVM code? HOT 3
- error: unsupported pointer reinterpretation HOT 4
- Turn off all performance optimizations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hls.