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

Compiler Error for 3_estimateResults.py in mergesort/scripts #3

Open
TomLight343 opened this issue May 25, 2017 · 5 comments
Open

Compiler Error for 3_estimateResults.py in mergesort/scripts #3

TomLight343 opened this issue May 25, 2017 · 5 comments

Comments

@TomLight343
Copy link

/home/mnelson/Spector/mergesort/benchmarks/merge_design273/mergesort.cl:112:15: error: __local variables are allowed only at kernel scope
local data_t localdata1[LOCAL_SORT_SIZE];
^
/home/mnelson/Spector/mergesort/benchmarks/merge_design273/mergesort.cl:113:15: error: __local variables are allowed only at kernel scope
local data_t localdata2[LOCAL_SORT_SIZE];

A similar pair of error messages occurs for every benchmark when the 3rd script is run.

@qkgautier
Copy link
Member

For which benchmark does this happen? Your example shows mergesort, but I cannot reproduce this error. Can you give me more details about your system and the AOC version you're using?

@TomLight343
Copy link
Author

Oh forgive me, it was mergesort.

@TomLight343 TomLight343 changed the title Compiler Error for 3_estimateResults.py in histogram/scripts Compiler Error for 3_estimateResults.py in mergesort/scripts May 26, 2017
@TomLight343
Copy link
Author

I'll mess with it for a little bit and get back to you.

@TomLight343
Copy link
Author

I'm using aocl 16.1.0.196 Intel FPGA SDK. The target board is a Terasic DE1-SoC.

@qkgautier
Copy link
Member

This is interesting. I can reproduce the error with the DE1 BSP, but not with the DE5 BSP. More interestingly, the Intel OpenCL compiler gives me an error too, but not the NVIDIA compiler.

I think some compilers cannot handle declaring a __local variable within a function, for loop, or similar scope. The solution would be to declare the local variables at kernel scope, and pass them to the function. But I'd have to double check if this causes dependency issues and possibly synchronization issues for certain combination of knobs.

I can take a look, but that will take a while as I'm pretty busy right now. Meanwhile you can try to implement what I mentioned, but I cannot guarantee that the results will be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants