Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] Question about matrix splicing

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] Question about matrix splicing


Chronologique Discussions 
  • From: christian eder <Christian.Eder@inria.fr>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] Question about matrix splicing
  • Date: Mon, 1 Jul 2013 18:08:15 +0200
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Sorry, I sent my mail to early:

Dear all,

I am new to starpu and try to implement an easy matrix multiplication
to learn the interface. I have two matrices A and B and I assume that
B is already transposed. Trying to make 2-dimensional splicings of A
and B works, but when I try a 1-dimensional splicing. i.e.

task->handles[0] = starpu_data_get_sub_data(A_hdl, 1, j);

where j goes over all rows of A resp. the same for B I have problems
achieving the correct offsets in the tasks. Assume the pretty easy
(and of course not optimized) splicing in the following

fa.filter_func = starpu_matrix_filter_block;
fa.nchildren = l;
fb.filter_func = starpu_matrix_filter_block;
fb.nchildren = n;
fc.filter_func = starpu_matrix_filter_vertical_block;
fc.nchildren = n;

starpu_data_partition(a_hdl, &fa);
starpu_data_partition(b_hdl, &fb);
starpu_data_map_filters(c_hdl, 2, &fa, &fc);

Then when trying to get the sub matrices of A and B in the tasks via

STARPU_MATRIX_GET_PTR

I only get offsets of 1, so sub_a and sub_b are just shifted by 1
entry, but not by one row.

If I try the same doing by hand, i.e. using

STARPU_MATRIX_GET_DEV_HANDLE and STARPU_MATRIX_GET_OFFSET

the offset is not correct. So, for example, for two 8x8 matrices I get
with the above setting offsets of 4, with 16x16 matrices an offset of
12.

Could you please try to tell me what I am doing wrong?

I am using starpu-1.1.0rc1.

Best regards,
Christian

On Mon, Jul 1, 2013 at 6:02 PM, christian eder <Christian.Eder@inria.fr>
wrote:
> Dear all,
>
> I am new to starpu and try to implement an easy matrix multiplication
> to learn the interface. I have two matrices A and B and I assume that
> B is already transposed. Trying to make 2-dimensional splicings of A
> and B works, but when I try a 1-dimensional splicing. i.e.
>
> task->handles[0] = starpu_data_get_sub_data(A_hdl, 1, j);
>
> where j goes over all rows of A resp. the same for B I have problems
> achieving the correct offsets in the tasks. Assume the pretty easy
> (and of course not optimized) splicing in the following
> fa.filter_func = starpu_matrix_filter_block;
> fa.nchildren = l;
> fb.filter_func = starpu_matrix_filter_block;
> fb.nchildren = n;
> fc.filter_func = starpu_matrix_filter_vertical_block;
> fc.nchildren = n;
>
> starpu_data_partition(a_hdl, &fa);
> starpu_data_partition(b_hdl, &fb);
>
> //starpu_data_map_filters(a_hdl, 2, &fa, &fc);
> //starpu_data_map_filters(b_hdl, 2, &fb, &fc);
> printf("- - - \n");
> starpu_data_map_filters(c_hdl, 2, &fa, &fc);
> printf("! ! !\n");
>
>
> --
> gpg: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6E0D034B959FDE6A



--
gpg: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6E0D034B959FDE6A





Archives gérées par MHonArc 2.6.19+.

Haut de le page