cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

genaganna
Journeyman III

BUG(?): CPU Backend not working?

We are not able to reproduce at our end

see test case

 

int grav_cal(int w, int h, int iterations, float *grav, float *chg)
{
    float gm, cm;

    {
        unsigned int i;
        float dens_stream<h,w>;
        float grav_stream<h,w>;
        float new_grav_stream<h,w>;
        float new_chg_stream<h,w>;
        float chg_stream<h,w>;
        float diff2<h,w>;
        char  fb_stream<h,w>;
        char  fb_in_stream<h,w>;

        streamRead(grav_stream, grav);
        streamWrite(grav_stream, chg);
    }
    return 0;
}
int main()
{

int iterCount = 100;
int i = 0;
float* i0 = NULL;
float* o0 = NULL;
int width = 32, height = 32;

i0 = (float*)malloc(sizeof(float)* width * height);
o0 = (float*)malloc(sizeof(float)* width * height);

for(i = 0; i < width * height; i++)
{
    i0 = (float)(i + 1);
}


grav_cal(width, height, iterCount, i0, o0);

for(i = 0; i < width * height; i++)
{
    if(i0
!= o0)
    {
        printf("Failed!!");
        free(i0);
        free(o0);
        exit(0);
    }
}

printf("\nPass\n");

free(i0);
free(o0);

return 0;
}

 

0 Likes
gaurav_garg
Adept I

SDK 1.4 Feedback

Below is a code snipped and a gdb backtrace, nothing spectacular, and the sample binaries show the same behaviour ..

 

This is a debian system with no GPU (although i have catalyst 9.2 installed). It used to work with sdk 1.3.

 

 

I think it is OS dependent problem, as debian is not officially supported, this OS was not tested. Try exporting environment variable BRT_RUNTIME=cpu (one way to tell runtime to use CPU backend explictly) and see if you still get this problem. Let me know if it helps.

0 Likes
twinclouds
Journeyman III

SDK 1.4 Feedback

Originally posted by: rahulgarg Update your driver to catalyst 9.2.

 

SDK 1.4 is intended to work with Catalyst 9.2 and later.

 

Catalyst 9.2 comes with the required aticalcl.so/aticalrt.so etc.

 

I installed Catalyst 9.2 also.  Where is aticalcl.so located?  My ACMLg1.0 makefile need to define the directory contains it.

0 Likes
ANogin
Journeyman III

Catalyst 9.3 for Linux (64-bit)

According to http://developer.amd.com/gpu/ATIStreamSDK/pages/ATIStreamSystemRequirements.aspx I need Catalyst 9.3 to use 1.4 SDK with AMD FireStream, however when I attempt to download the driver, I only get offered Catalyst 9.2. Is 9.3 available at all? What do I need to do in order to be able to use SDK 1.4 with AMD FireStream 9250 under 64 bit RHEL 5.3?

TIA!

Aleksey

0 Likes
genaganna
Journeyman III

SDK 1.4 Feedback

This has been fixed in 1.3

see following test case.

kernel void TestBrookKernel(int Input<>, out int Output<>
{
    Output = (int)0x80000000; // any value with 1 at last bit will produce
//0x00000000 at output
}

int main()
{
    int Input[64 * 64], Output[64 * 64];
    int i = 0, j = 0;
    int d_Input<64, 64>;
    int d_Output<64, 64>;

    streamRead(d_Input, Input);
    TestBrookKernel(d_Input, d_Output);
    streamWrite(d_Output, Output);
    for(i = 0; i < 64; i++)
    {
        for(j = 0; j < 64; j++)
        {
            if(Output[i * 64 + j] != (int) 0x80000000)
            {
                printf("Failed");
                return 0;
            }
        }
    }
    printf("Passed");
    return 0;
}

0 Likes
genaganna
Journeyman III

SDK 1.4 Feedback

This has been fixed in 1.3

see following test case.

kernel void TestBrookKernel(int Input<>, out int Output<>
{
    Output = (int)0x80000000; // any value with 1 at last bit will produce
//0x00000000 at output
}

int main()
{
    int Input[64 * 64], Output[64 * 64];
    int i = 0, j = 0;
    int d_Input<64, 64>;
    int d_Output<64, 64>;

    streamRead(d_Input, Input);
    TestBrookKernel(d_Input, d_Output);
    streamWrite(d_Output, Output);
    for(i = 0; i < 64; i++)
    {
        for(j = 0; j < 64; j++)
        {
            if(Output[i * 64 + j] != (int) 0x80000000)
            {
                printf("Failed");
                return 0;
            }
        }
    }
    printf("Passed");
    return 0;
}

0 Likes
LenAlox
Journeyman III

SDK 1.4 Feedback

I am not sure what is going on, we upgraded from 1.3 to 1.4. Everything was working fine under sdk 1.3 but after upgrading to 1.4 and trying to compile I get the following message:

 

brcc simple.br

g++ -L/usr/local/atibrook/sdk/lib -lbrook -I/usr/local/atibrook/sdk/include/ -g -o simple simple.cpp common/Timer.cpp

/usr/local/atibrook/sdk/lib/libbrook.so: undefined reference to `dlsym'

/usr/local/atibrook/sdk/lib/libbrook.so: undefined reference to `dlerror'

/usr/local/atibrook/sdk/lib/libbrook.so: undefined reference to `dlopen'

/usr/local/atibrook/sdk/lib/libbrook.so: undefined reference to `dlclose'

collect2: ld returned 1 exit status

make: *** [cp] Error 1

I ideas what is going wrong? I am very sure we did also upgrade to catylist 9.2. The system I am using is a 64 bit centOS box.

0 Likes
twinclouds
Journeyman III

SDK 1.4 Feedback

Never mind.

0 Likes
ryta1203
Journeyman III

SDK 1.4 Feedback

Feature Request: Give the ability to turn off different levels of optimizations (preferably altogether) within the CAL compiler. According to yourselves this currently does not exist.

0 Likes
Ceq
Journeyman III

SDK 1.4 Feedback

Which is the "official" way of doing this in SDK 1.4?

 

float4 a = float4(1.0f, 2.0f, 3.0f, 4.0f);

float b = 0.5f;

float4 a_mul_b;

...

 

a) a_mul_b = a * b.xxxx;

ERROR--1: Problem with expression in kernel: Illegal to use swizzle on scalar types

 

b) a_mul_b = a * b;

ERROR--1: In Binary expression: Mismatched operands: both must have same type and same number of components

 

c) a_mul_b = a * (float4)b;

ERROR--1: : explicit casting required to have same no of components

 

d) float4 t = float4(b, b, b, b);

a_mul_b = a * b;

But this results in longer and harder to read code and you have to define all temporal variables at the beginning of the each kernel.

 

Any other way or hint?

0 Likes