Comments (9)
@jeffsetter Could you please take a look at this?
from halide-hls.
Yea I can take a look
from halide-hls.
I was able to fix it by using the code below. However, it appears that there is a problem now when I attempt to cast a void* that was originally a Image<uint8_t>* to a buffer_t** in pipeline_hls.cpp with the function __pipeline_hls_argv.
However, by doing the conversion to buffer_t* first (as below), it appears to work. Do you have any suggestions on a cleaner way to do this? The code below seems a bit ugly.
buffer_t* in_buf = in;
buffer_t* weight_buf = weight;
uint16_t bias = 0;
buffer_t* out_hls_buf = out_hls;
void** arg_values = new void*[4];
arg_values[0] = (void*) &in_buf;
arg_values[1] = (void*) &weight_buf;
arg_values[2] = (void*) &bias;
arg_values[3] = (void*) &out_hls_buf;
pipeline_hls_argv(arg_values);
delete [] arg_values;
from halide-hls.
I find how the master branch does the _argv calling. Could you match their implementation?
https://github.com/jingpu/Halide-HLS/blob/HLS/test/generator/argvcall_aottest.cpp#L44
from halide-hls.
I still need to cast to buffer_t* first (because my implementation uses buffer_t**), but it's a bit cleaner now.
// cast first to buffer_t*
buffer_t* in_buf = in;
buffer_t* weight_buf = weight;
uint16_t bias = 0;
buffer_t* out_hls_buf = out_hls;
void* arg_values[4] = { &in_buf, &weight_buf, &bias, &out_hls_buf };
pipeline_hls_argv(arg_values);
from halide-hls.
Can you use buffer_t* instead of buffer_t**?
from halide-hls.
I changed Codegen_C to use buffer_t* instead, pushed the change, and now am waiting on travis.
from halide-hls.
Travis passed, so I'll close this.
from halide-hls.
from halide-hls.
Related Issues (20)
- Rewrite example apps using Generator HOT 1
- "make run_hls" fails inside Vivado HLS HOT 2
- FFT in Halide-HLS HOT 2
- 'HalideRuntime.h' file not found HOT 13
- Reduction Operation in Halide-HLS HOT 2
- C++11 feature is not included in makefile HOT 5
- Understanding Linebuffer in Halide-HLS HOT 4
- Lookup Tables for Trigonometric Functions HOT 3
- hls_target.cpp without any content HOT 4
- Calculation range fail HOT 10
- Error occur in removing scheduler HOT 1
- Support out-of-source build with proper cmake file
- Accelerating last function (not hw_output) not possible? HOT 2
- Example Usage of HLS in Application HOT 1
- reinterpret<>() for hls_target.cpp
- Possible bug in generated HLS
- Adopt device interface
- Use Halide::Target to infer HLS code generation
- Add HLS AOT generator test
- Support zero-copy buffer on Zynq
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 halide-hls.