Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCL Codegen Issue #391

Closed
yn224 opened this issue Jul 19, 2021 · 1 comment · Fixed by #394
Closed

OpenCL Codegen Issue #391

yn224 opened this issue Jul 19, 2021 · 1 comment · Fixed by #394
Assignees
Labels

Comments

@yn224
Copy link
Contributor

yn224 commented Jul 19, 2021

Issue Description

Generated kernel.cpp code from vitis simulation has a missing argument to the buffer functions that looks like the following:

host.cpp: In function ‘int main(int, char**)’:
host.cpp:107:99: error: expected primary-expression before ‘.’ token
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1080*1920*3, .data(), &err);
                                                                                                   ^
host.cpp:108:22: error: redeclaration of ‘cl::Buffer buffer_’
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*3*3, .data(), &err);
                      ^~~~~~~
host.cpp:107:14: note: ‘cl::Buffer buffer_’ previously declared here
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1080*1920*3, .data(), &err);
              ^~~~~~~
host.cpp:108:91: error: expected primary-expression before ‘.’ token
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*3*3, .data(), &err);
                                                                                           ^
host.cpp:109:22: error: redeclaration of ‘cl::Buffer buffer_’
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*3*3, .data(), &err);
                      ^~~~~~~
host.cpp:107:14: note: ‘cl::Buffer buffer_’ previously declared here
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1080*1920*3, .data(), &err);
              ^~~~~~~
host.cpp:109:91: error: expected primary-expression before ‘.’ token
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*3*3, .data(), &err);
                                                                                           ^
host.cpp:110:22: error: redeclaration of ‘cl::Buffer buffer_’
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1078*1918, .data(), &err);
                      ^~~~~~~
host.cpp:107:14: note: ‘cl::Buffer buffer_’ previously declared here
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1080*1920*3, .data(), &err);
              ^~~~~~~
host.cpp:110:97: error: expected primary-expression before ‘.’ token
   cl::Buffer buffer_(context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, sizeof(float)*1078*1918, .data(), &err);

The error can be reproduced by running the pipelined version of Sobel example addressed in PR #384 .

@seanlatias seanlatias added the bug label Jul 19, 2021
@hecmay hecmay self-assigned this Jul 21, 2021
@hecmay
Copy link
Collaborator

hecmay commented Jul 21, 2021

It turns out to be a one line change of code for the fix. Will push the fix in a separate PR.

@hecmay hecmay added this to Code Generator in Issues/bugs Tracking Sep 18, 2021
Issues/bugs Tracking automation moved this from CodeGen related to Other APIs Sep 20, 2021
@hecmay hecmay moved this from Other APIs to resolved in Issues/bugs Tracking Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants