First of all, I would like to say that I am glad that AMD made this SDK public for beta testing, and that AMD is putting a lot of effort to improve it.
Here are few bugs in brcc.exe that I run across while I was trying to port some of my faculty projects to run on my Radeon 3850 GPU.
Following code causes brcc to crush:
kernel void gather_res(float res[], float selectedV[], out float elem<>){
elem= res[selectedV[1]];
}
While the following code compiles without any problem:
kernel void gather_res(float res[], float selectedV[], out float elem<>){
float selected=selectedV[1];
elem= res[selected];
}
Here I would like to ask, is there any other way to pass a single float value which resigns in GPU's memory to a kernel?
Also, omitting the type of an output stream causes brcc to crash, instead of generating error report:
kernel void test(float str<>, out newStr<>){
newStr=str;
}
There is also a bug that allows me to specify more than one argument for normalize function, while the code compiles without any error report, the program doesn't run correctly:
out = normalize(in,0,1); //I have changed clamp to normalize and forgot to remove arguments
I hope these examples will help you locate and correct those bugs.
At the end, I would like to note that it would be nice if I could also utilize Mobility Radeon HD2600 in my laptop with some future release of the SDK.
Best regards,
Miodrag
kernel void invertVal(float stream<>, float param[], out stream outStream<>){
outStream=(stream==param[1])? -stream : stream;
}
Is that the way it's meant to be done?
As for the 2600, I must stress that I have Mobility Radeon HD2600 in Toshiba Satellite A210-16F laptop. I had tried to run sample applications on it, but non will start. Each example returns -1 error code upon the start, without any error message. New Folding@Home GPU2 client also cannot be started on this chip. So is there any official information concerning CAL support for mobile chips? If they are not supported at the moment, is the support for them going to be added soon?
Best regards,
Miodrag
I tried to compile example you gave me, and it crashed brcc. The thing is that you forgot to put void as return type of the kernels, so that's one more bug to fix.
But when I corrected the code and managed to compile it, it didn't run correctly. Here is my code:
reduce void sum(reduce float a, float b<>)
{
a+=b;
}
kernel void normalize(float sum, out float norm_val<>, float val<>)
{
norm_val = val / sum;
}
void printA(float *a, int sz){
int i;
for(i=0; i<sz; i++)
printf("%f\t",a_of_i );
printf("\n");
}
void main(){
float *a;
float ss;
int i;
float sa<SIZE> ;
float sb<SIZE> ;
a= (float *)malloc(SIZE * sizeof(float));
for(i=0; i<SIZE; i++)
a_of_i=i+1;
printA(a, SIZE);
ss=0;
streamRead(sa, a);
sum(ss, sa);
normalize(ss, sb, sa);
streamWrite(sb, a);
printf("sum=%f\n",ss);
printA(a, SIZE);
free(a);
}
This is what I get on the output:
1.000000 2.000000 3.000000 4.000000 5.000000
6.000000 7.000000 8.000000 9.000000 10.000000
sum=-1.#IND00
-1.#IND00 -1.#IND00 -1.#IND00 -1.#IND00 -1.#IND00
-1.#IND00 -1.#IND00 -1.#IND00 -1.#IND00 -1.#IND00
Is there something that I am doing wrong?
Best regards,
Miodrag
Maybe you should put some information about stream replication in Programing Guide (or Brook+ Specs). I find this feature very useful, yet there is no word about it in the documentation.
Best regards,
Miodrag