You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I successfully installed the compiler designed for Ventus and got the results of the simple test I gave below.
__kernel void vector_add(__global const float *x, __global const float *y, __global float *restrict z) { // get index of the work item
int index = get_global_id(0);
// add the vector elements
z[index] = x[index] + y[index];
}
After this test, I continued to try to get more test results, but the get_global_size and get_local_id functions I provided below produced error outputs.
CONVOLUTION TEST
__kernel void Conv2D( __global int * image_in, //image input
__global int * filter_in, //filter input
int K, //filter kernel size
__global int * image_out) //feature map output
{
int W; //work group global size
int Wn; //padded image width
int x; //global id x
int y; //global id y
int ki, kj; //filter coordinate,(kj, ki)
int sum = 0; //multiply and sum of filter and data
x = get_global_id(0);
y = get_global_id(1);
W = get_global_size(0);
Wn = W + (K - 1);
for(ki=0; ki<K; ki++){
for(kj=0; kj<K; kj++)
{
sum = sum + filter_in[ki*K + kj] * image_in[Wn*(y+ki) + x + kj];
}
}
image_out[y*W + x] = sum;
}
Hello, I successfully installed the compiler designed for Ventus and got the results of the simple test I gave below.
After this test, I continued to try to get more test results, but the get_global_size and get_local_id functions I provided below produced error outputs.
CONVOLUTION TEST
Error output of the above code:
ADD NUMBER TEST
Error output of the above code:
How can i solve this problem.
The text was updated successfully, but these errors were encountered: