Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install OpenCL ubuntu AMD

I would like to install fglrx and use the GPU. But I didn't succeed to install it. I'm using ubuntu 14.04.03 Trusty.

Here the lspci output:

[thomas@elsa:~]$ lspci | grep -i --color 'vga'
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th 
Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] 
Oland XT [Radeon HD 8670 / R7 250/350]

I've tried to install it by following this, this and this

Did I miss something, should I install something else?

Any idea?

Thanks a lot

like image 292
Thomas BRAUD Avatar asked Oct 15 '25 03:10

Thomas BRAUD


1 Answers

Display Drivers : (Note: This is not a requirement for running OpenCL on an AMD GPU)

Here are some other links you can try for installing the AMD drivers: AMD Driver Install 1 and AMD Driver Install 2.

I've found (with Nvidia Drivers) that the black screen happens when X is not configured properly, so you have to follow those steps correctly.

The first link said to use fglrxinfo to check the status of the AMD drivers, so I assume that you don't get a black screen, check that the AMD drivers are working.

OpenCL : (Only requires AMD APP SDK)

To use the AMD GPU with OpenCL, you don't need the display drivers, (Note the part in the first document you referenced (the installation guide) which says If Catalyst is not installed on page 4 of 7), you just need the OpenCL runtime drivers (libOpenCL -- for running the compiled OpenCL code on the GPU) and the headers (for actually developing and compiling OpenCL code). Both of these come with AMD APP SDK. Just install the SDK as per the installation guide (try without the catalyst driver if you don't need the GPU for display).

Check that /opt/AMDAPPSDK-3.0/ has the binaries, and it should include a lib directory where you can find libOpenCL.so and an include/CL where you can find all the header files.

Additionally, the SDK with have a clinfo binary (at least my installation on Arch does), in the bin directory of the SDK, so run:

/path/to/AMDAPPSDK/bin/clinfo

To check that your GPU can be detected. Here are some of the outputs of the clinfo command for my installation (detect Intel CPU):

Number of platforms:                 2
  Platform Profile:              FULL_PROFILE
  Platform Version:              OpenCL 2.0 AMD-APP (1800.8)
  Platform Name:                 AMD Accelerated Parallel Processing
  Platform Vendor:               Advanced Micro Devices, Inc.
  Platform Extensions:               cl_khr_icd cl_amd_event_callback cl_amd_offline_devices 
  Platform Profile:              FULL_PROFILE
  Platform Version:              OpenCL 1.2 LINUX
  Platform Name:                 Intel(R) OpenCL
  Platform Vendor:               Intel(R) Corporation

# Some other information

# Information about a platform -- you should see AMD and Xeon
  Platform Name:                 AMD Accelerated Parallel Processing
Number of devices:               1
  Device Type:                   CL_DEVICE_TYPE_CPU
  Vendor ID:                     1002h
  Board name:                    
  Max compute units:                 8
  Max work items dimensions:             3
    Max work items[0]:               1024
    Max work items[1]:               1024
    Max work items[2]:               1024
  Max work group size:               1024

# Rest of information
like image 62
RobClucas Avatar answered Oct 17 '25 21:10

RobClucas