Hi Charles,
> Here is the current kernel
> with all the different attempts commented out (where MdimPad and PdimPad
> or the padded dimensions).
where is the third dimension? Are you assuming C to be M-by-M?
> If I don't have a size condition check, the
> device quickly runs out of resources (Error: ViennaCL: FATAL ERROR:
> CL_OUT_OF_RESOURCES ). Any thoughts? I feel like I must be missing
> something simple at this point.
Which values do you pass to the kernel? Which local and global work
sizes do you use?
> __kernel void iMatMult(const int Mdim, const int MdimPad,
> const int Pdim, const int PdimPad,
> __global const int *A, __global const int *B,
> __global int *C) {
>
> // Get the index of the elements to be processed
> const int globalRow = get_global_id(0); // C Row ID
> const int globalCol = get_global_id(1); // C Col ID
> int tmp = 0;
>
> if (globalRow > MdimPad || globalCol > MdimPad)
> return;
Here it should be enough to check against Mdim.
> printf("globalCol = %d\n", globalCol);
> printf("globalRow = %d\n", globalRow);
>
> // Do the operation
> for(int k=0; k < Pdim; k++){
> tmp += A[globalRow * MdimPad + k] * B[globalCol+PdimPad*k];
I'm confused with your use of MdimPad and PdimPad here. As currently
written, A has Mdim columns, and B has Pdim columns. But this doesn't
agree with the if-check above, where C is assumed Mdim-by-Mdim.
> }
>
> C[globalCol+MdimPad*globalRow] = tmp;
The last line assumes C to be M-by-M. Is this the case?
Best regards,
Karli
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
ViennaCL-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-devel