We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I tried a simple convolution code but got this:
./run.sh: line 41: 5460 Floating point exception(core dumped) $opcodegen $finalnode $edge $llvmnode $llvmedge $obj prolog.sch kernel.sch epilog.sch $X $Y $R $liveoutnode $liveoutedge > cgra_instructions.txt
Simple convolution code:
#include <stdlib.h> #include <stdio.h> #define kernelSize 2 #define inputSize 50 int count = 0; int *convolve(int input[inputSize][inputSize], int filter[kernelSize][kernelSize]) { int output[inputSize-kernelSize+1][inputSize-kernelSize+1]; for (int i = 0; i < inputSize-kernelSize+1; i++) for (int j = 0; j < inputSize-kernelSize+1; j++) output[i][j] = 0; for (int oj = 0; oj < inputSize-kernelSize+1; oj++) { #pragma CGRA for (int oi = 0; oi < inputSize-kernelSize+1; oi++) { output[oi][oj] += input[oi + 0][oj + 0] * filter[0][0]; output[oi][oj] += input[oi + 0][oj + 1] * filter[0][1]; output[oi][oj] += input[oi + 1][oj + 0] * filter[1][0]; output[oi][oj] += input[oi + 1][oj + 1] * filter[1][1]; } } for (int oj = 0; oj < inputSize-kernelSize+1; oj++) { for (int oi = 0; oi < inputSize-kernelSize+1; oi++) { printf("%d \n",output[oi][oj]); } } } int main(int argc, char *argv[]) { int h[inputSize][inputSize]; for (int i = 0; i < inputSize; i++) for (int j = 0; j < inputSize; j++) h[i][j] = i*j; int z[kernelSize][kernelSize] = {{1, 2}, {1, 2}}; convolve(h, z); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I tried a simple convolution code but got this:
Simple convolution code:
The text was updated successfully, but these errors were encountered: