cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ep-98d
Adept II

How to build clBLAS

Hello, I am new to OpenCL and currently playing around with various math libraries.

I've been trying to build clBLAS and there is no clear explanation in the GitHub (GitHub - clMathLibraries/clBLAS: a software library containing BLAS functions written in OpenCL ).

So I am looking through OpenCL-caffe GitHub instructions, but I don't understand the instructions.

Can someone give me an build instruction for clBLAS?

BTW, I am using Linux.

Thank you.

0 Likes
14 Replies
dipak
Big Boss

clBLAS package supports cmake, so you can use cmake to generate makefiles for Linux platform. This page describes the steps to build clBLAS library using cmake: Build clBLAS library *.a or *.so files only · clMathLibraries/clBLAS Wiki · GitHub  [at project generator selection step, instead of Visual Studio generator, please select proper generator suitable for makefiles]

If you face any problem to build, please report here: Issues · clMathLibraries/clBLAS · GitHub

0 Likes

Thank you for the reply. I kinda did what the instuctions says, I am using CLI environment so.. after cloning github and did the following at the directory where the files where cloned.

$ cmake

And then it looked like the package is building, however, I can not complie the code that includes clBLAS.h file as the error message says that it can not find the header file.

I am totally lost.

0 Likes

Looks like source folder was not set correctly. I can see clBLAS.h file under "clBLAS-master\src".

0 Likes

Do you mean the source folder for the compiler? or the clBLAS build?

0 Likes

I thought that the error occurred during library building stage, so I referred the source folder under clBLAS.

0 Likes

I honestly don't know if the build went right as I can not find any clblas related files (clBLAS.h, libclBLAS.so, etc) in my /usr/include, /bin directories or any library relavent directories in my machine.

But I've tried adding C_INCLUDE_PATH to clBLAS/src directory and it is not working...

0 Likes

How did you generate the makefiles? Means, please share the build steps you used.

0 Likes

Sure.

1. cloned git from GitHub

$ git clone http://github.com/clMathLibraries/clBLAS

2. I created a directory to build clBLAS and entered the following command under clBLAS/src directory

clBLAS/src ]$ cmake /new/directory/

3. Then at the /new/directory/

/new/directory ]$ cmake

0 Likes

It sounds like you are running cmake from different folder than where source files are placed. You need to set the source folder path accordingly. Also may need to set cmake generator (i.e. option "-G") . Please check the cmake usage for details.

0 Likes

Yeah, I made a mistake on the third step, not locating the source files. I did this and it created makefile files. I ran the make and it started building. Still, however, I am getting the same error messages (can not locate clBLAS.h).

0 Likes

Please clean cmake cache files and run the build commands freshly. I suspect that it's a configuration issue only.  

0 Likes

Is the building procedure correct, though?

0 Likes

I didn't understand the step 2 and 3, both used cmake command.

Actually, I don't have the required step-up to check at my end. So, I can't tell you the exact steps. I would suggest you to check the related forum here: Issues · clMathLibraries/clBLAS · GitHub 

0 Likes

I just solve the problem by using package manager for my linux distro. Thank you for the help, though.

0 Likes