cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

toddwbrownjr
Journeyman III

CAL vs. OpenCL

Hi guys,

Probably a dumb question, but I can't find the answer.  Under the 2.0 SDK, there are CAL and OpenCL samples.  However, I can't find any references to CAL in the documents (no programming manual or command references).  There are references to IL, but not CAL.  Is CAL ATI's API (like CUDA is to NVIDIA)?  If so, is there a performance increase over OpenCL on ATI GPUs?

0 Likes
4 Replies
genaganna
Journeyman III

Originally posted by: toddwbrownjr Hi guys,

 

Probably a dumb question, but I can't find the answer.  Under the 2.0 SDK, there are CAL and OpenCL samples.  However, I can't find any references to CAL in the documents (no programming manual or command references).  There are references to IL, but not CAL.  Is CAL ATI's API (like CUDA is to NVIDIA)?  If so, is there a performance increase over OpenCL on ATI GPUs?

 



You can find some old CAL API doc from http://developer.amd.com/gpu_assets/Stream_Computing_User_Guide.pdf.

CAL is lower level than CUDA.  You can do more optimizations from CAL as it is very low level interface for ATI GPU's.

 

 

0 Likes

CAL == CUDA driver level API.

Check out cuda.h & cal.h, functions nearly the same. As it's low level interface you're need to do everything by your own, for example:

cuInit/calInit -- initialize

cuDeviceGetCount/calDeviceGetCount -- get number of devices

cuDeviceGet/calDeviceOpen -- open device

cuCtxCreate/calCtxCreate -- create context

cuModuleLoad/calModuleLoad -- load GPU image into device

cuModuleGetFunction/calModuleGetEntry -- locate specific function inside module

 

and etc, etc.

 

"Stream_Computing_User_Guide.pdf" from SDK 1.4 beta contains simple HelloCAL program at section 3.3 with full description, good start point in you're interested in CAL/IL.

CAL program guide available now here

http://developer.amd.com/gpu/ATIStreamSDK/assets/ATI_Stream_SDK_CAL_Programming_Guide_v2.0%5B1%5D.pdf

0 Likes