This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use libflame in 6678

Other Parts Discussed in Thread: CCSTUDIO, TMS320C6678

Hi, all,

I have learned that 6678 can use libflame from https://www.ices.utexas.edu/about/news/125/.

So my question is how to use it? what job I need to do before use is?

thanks a lot!

  • I am also having similar problem.I have built libflame with --enable-tidsp option successfully but when linking the library i am  getting following error

    FLA_Copy_check.o is built for x86_64

    I am using UBUNTU 12.04 LTS and CCStudio 5.2.1

    with regards

    srinath

  • Hi,

    The official LibFlame release from TI will be through MCSDK-HPC.  So please wait for the TI MCSDK-HPC release.  Also the initial target platform for MCSDK-HPC is for K2H devices.

    Xiaohui

  • Thanks for your immediate reply

    I have another doubt.I have seen some ieee papers in which they have benchmarked the TMS320c6678 using BLAS library.can you please tell me how to build BLAS for TI devices.I have tried OPENBLAS but not succeded.

    with regards

    SRINATH

  • A highly optimized BLAS library for TI C66x devices will be included with the MCSDK HPC release along with the LIBFlame.  It is uncertain which version of BLAS or subset was used for the referenced benchmarks.  It is best to wait until the formal release of the MCSDK-HPC.


    Regards,

    Travis

  • I have written simple matrix multiplication code .I am allocating memory dynamically using malloc.For larger size matrix I get malloc  error. I am attaching my code to this mail.

    ERROR:  ti.sdo.ipc.heaps.HeapMemMP: line 743: E_memory: Out of memory: handle=0x800418, size=8000008

    I have tried changing heap value in configuration file also still I am getting this error.

    with regards

    K V SRINATH

    3073.MatMatMul_mc.c
    #include<stdio.h>
    #include<stdlib.h>
    #include<time.h>
    #include<c6x.h>
    #include<ti/omp/omp.h>
    #define SIZE 1024
    #define NITERS 5
    double *MatA,*MatB,*MatC;
    int main()
    {
    
    	int i,j,k,w;
    	time_t start,end;
    	struct tm *loctime;
    	srand(time(NULL));
    	MatA=(double *)malloc(SIZE*SIZE*sizeof(double));
    	if(MatA==NULL)
    	{
    		printf("malloc error in A\n");
    		exit(1);
    	}
    	MatB=(double *)malloc(SIZE*SIZE*sizeof(double));
    	if(MatB==NULL)
    		{
    			printf("malloc error in B\n");
    			exit(1);
    		}
    	MatC=(double *)malloc(SIZE*SIZE*sizeof(double));
    	if(MatC==NULL)
    	{
    		printf("malloc error in C\n");
    		exit(1);
    	}
    	/*Initialise Matrices*/
    	printf("start\n");
    	for(i=0;i<SIZE;i++)
    	{
    		for(j=0;j<SIZE;j++)
    		{
    			MatA[i*SIZE+j]=rand()/(RAND_MAX+1.0);
    			MatB[i*SIZE+j]=rand()/(RAND_MAX+1.0);
    			MatC[i*SIZE+j]=0.0;
    		}
    	}
    
    	/*printf("Matrix A values are\n");
    	for(i=0;i<SIZE;i++)
    			{
    				for(j=0;j<SIZE;j++)
    				{
    					printf("%lf ",a[i*SIZE+j]);
    				}
    				printf("\n");
    			}
    
    	printf("Matrix B values are\n");
    		for(i=0;i<SIZE;i++)
    				{
    					for(j=0;j<SIZE;j++)
    					{
    						printf("%lf ",b[i*SIZE+j]);
    					}
    					printf("\n");
    				}
    */
    	for(w=0;w<NITERS;w++)
    	{
    		start=time(NULL);
    			loctime = localtime (&start);
    			fputs (asctime (loctime), stdout);
    #pragma omp parallel for private(i,j,k)
     		for(i=0;i<SIZE;i++)
    		{
    		//tid = omp_get_thread_num();
    			for(j=0;j<SIZE;j++)
    			{
    				double sum=0.0;
    				for(k=0;k<SIZE;k++)
    					{
    						sum+=MatA[i*SIZE+k]*MatB[k*SIZE+j];
    					}
    				MatC[i*SIZE+j]=sum;
    			}
    		}
     		end=time(NULL);
     			loctime = localtime (&end);
     			fputs (asctime (loctime), stdout);
    	printf("iter= %d MatC[3]= %lf\n",w+1,MatC[3]);
    	}
    	/*for(i=0;i<SIZE;i++)
    		{
    			for(j=0;j<SIZE;j++)
    			{
    				printf("%f ",c[i*SIZE+j]);
    			}
    			printf("\n");
    		}*/
    	free(MatA);
    	free(MatB);
    	free(MatC);
    }
    
    
    
    

  • Travis,

    I have downloaded the package MCSDK-HPC, but I only find the optimized BLAS library and no LIBFlame, Can you tell me what's going on?

    Regards,

    Mike

  • Mike,


    It is not in the current version of MCSDK-HPC, nor will it be in the 1st production release that is pending.  I'll try to find out an estimate on when it will be available.


    Regards,

    Travis

  • Travis,

    I have followed the2816.0535.libflame.pdf, and I have build it correctly, but when I link it to my DSP application, it occurred an error that says "attempt to link an object file that is not built for TI C6x, libflame-i686-r11936.a<FLA_Init.o> = Intel 80386 ",  ( libflame-i686-r11936.a is the library I rebuild )

     I learned that it maybe the platform incompatible.

    when build the libflame, I followed the steps the manual mentioned, and I also --enable-tidsp command line, so can you tell me what might cause this problem?

    Regards,

    Mike

  • Mike,


    I'm uncertain here, but I'm told there are compatibility issues with the malloc code used by UT for our architecture.  The only thing I can do is suggest you contact the folks from UT supporting libflame to see if they have any updates, or wait for our internal release.


    Regards,

    Travis

  • Mike,

    Just an update, so the MCSDK-HPC GA (v3.0.0) release is this week.  The target for the first maintenance release (v3.0.1) is early June, and LIBflame will be in that release.

    Regards,

    Travis

     

  • Just want to point out the the GA release of MCSDK-HPC is now out....

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_hpc/latest/index_FDS.html

    Again, this doesn't contain LibFlame yet, until the next maintenance release..

    Regards,

    Travis