cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

geekmaster
Journeyman III

Brook / threads question

When i have the kernel

Then how do i know how many threads the gpu lanches? Will they be equal to the number of elements of the input stream, or the output or output2?

kernel void test(float input<>, out float output<>, out float output2[]) { ....... }

0 Likes
13 Replies
geekmaster
Journeyman III

Basicaly what i want is to control  the number of threads that the gpu lanches. I do not need 1 thread per element of a huge stream. Is this possible?

0 Likes

Originally posted by: geekmaster Basicaly what i want is to control  the number of threads that the gpu lanches. I do not need 1 thread per element of a huge stream. Is this possible?

 

It is possible if output is scatter stream.See  ExecDomain sample availabe at CPP/Tutorials/ExecDomain.

0 Likes

Thank you!

0 Likes

Originally posted by: genaganna Remember both stream and scatter stream not allowed in sample kernel. You should get error for your kernel.


Well i do not get an error when I compile a kernel that has both stream and scatter stream outputs.

But I get an error when i try to have two scatter stream outputs (as expected).

0 Likes

Is there any way to have two scatter stream outputs?

Or to make a stream of different type than the build in? (in order to combine two streams to one) like

struct newtype

{

     int y;

     char z;

};

The kernel that i want to make is a bit complex and if i use an int2 for example i waste both memory bandwidth and memory space.

Even if i make the newtype stream to work (seems imposible) I need two times more char variables than int so i will have to double the stream dimensions.

In the end if this is imposible on brook then is opencl capable of having two scatter stream outputs?

0 Likes

Originally posted by: geekmaster
Originally posted by: genaganna Remember both stream and scatter stream not allowed in sample kernel. You should get error for your kernel.


Well i do not get an error when I compile a kernel that has both stream and scatter stream outputs.

But I get an error when i try to have two scatter stream outputs (as expected).

  ExecDomain is supported with regular streams too. also multiple regular output streams are allowed with a scatter stream since 1.4.

0 Likes
genaganna
Journeyman III

Originally posted by: geekmaster When i have the kernel

 

Then how do i know how many threads the gpu lanches? Will they be equal to the number of elements of the input stream, or the output or output2?

 

It depends output if output is stream type.

It depends on kernel execution domine set in runtime if output is scatter.

See CPP/Tutorial/ExecDomain sample how to set kernel execution domain.

Remember both stream and scatter stream not allowed in sample kernel. You should get error for your kernel.

 

0 Likes
En-you
Journeyman III

It is possible if output is scatter stream.See  ExecDomain sample availabe at CPP/Tutorials/ExecDomain.

0 Likes

it's impossible

0 Likes

Thank you. Looks like Opencl is the only way then. I am looking forward to upgrade from 3870 to 6970.

0 Likes

This is a nice Topic and also Very Useful

Thank you

SEO Services

0 Likes
Alice_Sunny
Journeyman III

I've also got the same problem.Thanks
0 Likes

Alice_sunny,

IMHO this place has more people interested in openCL than brook+.I think you can get more help at the place where Brook+ is present now. It is now an opensource project .

0 Likes