cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

reverendjim
Journeyman III

OpenCL & AMD R5 M335

Is there a version of OpenCL that works with the AMD Radeon R5 M335? My system is a Dell Inspiron 5759 running Windows 10 Home. My development environment is Microsoft Visual Studio 2012 but I can install whate er else is required.

0 Likes
22 Replies

Here is AMD OPENCL FORUM :OpenCL .

Someone there should be able to answer your question.

0 Likes

I'd ask my question there but there doesn't seem to be any way to ask a question, only read what has already been posted.

0 Likes

I've moved your question to the OpenCL forums.

0 Likes

I was able to locate on the Opencl Forum where you can post any future questions.

It is on the Upper Right Corner under "Actions" then "Create" and then "Discussion" . Pops up a window to ask your question. Future reference.

0 Likes
dipak
Big Boss

Please try this driver: Mobile

0 Likes

There are three downloads on that page. How am I to know which is the correct one? Also, is there any FAQ or document that describes how to set up a dev environment? A driver is the first step, but it is certainly not all that is required. I'd rather not have to install/uninstall (rinse/repeat) until I finally end up with what I want.

0 Likes

Adrenalin 18.2.1 and 18.3.4 both the drivers support this card. Adrenalin 18.3.4 is the latest one.

After driver installation, please install AMD APP SDK which provides the headers and libraries required to develop OpenCL application on AMD platform.

Note:

If you face any issue to download the installers, please try this link:

64-bit: http://amd-dev.wpengine.netdna-cdn.com/app-sdk/installers/APPSDKInstaller/3.0.130.135-GA/full/AMD-AP...

0 Likes

Great. I'll grab those files and start in on it. Thanks very much for the help.

0 Likes

Still a few bumps in the road.

Windows 10 (Home) Dell Inspiron 5759

Visual Studio 2017 (Community Edition)

When I try to build from Conway.cpp, whether I select Win32 or x64 as the platform in project properties I get the following error.

LNK1112 module machine type 'x64' conflicts with target machine type 'x86'      afopencl.lib(afopencl.dll)

When I try to run the included benchmark blas_opencl.exe I just get

blas_opencl.exe - System Error

The code execution cannot proceed because afopencl.dll was not found. Reinstalling the program may fix this problem.

What, specifically, am I being asked to reinstall?

It seems more than a bit of a nuisance to have to

o Add "$(AF_PATH)/include;" to Project Properties -> C/C++ -> General -> Additional Include Directories.

o Add "$(AF_PATH)/lib;" to Project Properties -> Linker -> General -> Additional Library Directories.

o Add afopencl.lib to Project Properties -> Linker -> Input -> Additional Dependencies.

to every new project. Surely there is some way to add them in to Visual Studio so that they can be included in all new projects. Although I see you also state "You can alternately download the template project from ArrayFire Template Projects". What do I have to download and where am I supposed to put it/them?

0 Likes

After installing the driver and APPSDK, please try the below steps to ensure that the setup is ready for OpenCL development:

  1. Run "clinfo" from the command-line and check the output. Clinfo output should list the CPU and GPU devices.
  2. If clinfo is running fine, try to run couple of OpenCL sample binaries (typically located at <Users>\AMD APP SDK\3.0\samples\opencl\bin\x86_64) to confirm that OpenCL is working fine on the target device. On the other hand, if clinfo fails to recognize any device, then there might be an installation issue or the device is not supported by the driver. Retry the installation process.
  3. Now, try to build an OpenCL application from source. For this purpose, provided VS projects against APPSDK OpenCL samples can be used (located at  <Users>AMD APP SDK\3.0\samples\opencl). If the samples are building and running fine, then the setup is ready for OpenCL development. Note, depending on the target OS, please select the build version (x64 or x86).

Please check this documents for more information.

http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf

http://developer.amd.com/wordpress/media/2013/12/AMD_APP_SDK_GettingStartedGuide.pdf

http://developer.amd.com/wordpress/media/2013/12/AMD_OpenCL_Programming_User_Guide2.pdf

0 Likes

I tried to rebuild KmeansAutoClustering from the samples folder. First

of all, I noticed that the settings:

C/C++ Additional include directories:

../../../../../include

../../../../../include/SDKUtil

$(AMDAPPSDKROOT)/include

Linker additional library directives:

../../../../../lib/win64/

differed from the recommended setting on the website which were

Add "$(AF_PATH)/include;" to Project Properties -> C/C++ -> General ->

Additional Include Directories.

Add "$(AF_PATH)/lib;" to Project Properties -> Linker -> General ->

Additional Library Directories.

Add afcpu.lib or afcuda.lib or afopencl.lib to Project Properties ->

Linker -> Input -> Additional Dependencies. based on your preferred backend.

Also, when I tried the rebuild I got 320 errors. Clearly somethijng is

amiss.

Most execs of prebuild exe files run without error - here is one exception:

C:\Users\Jim\AMD APP SDK\3.0\samples\opencl\bin\x86_64>SimpleDepthImage.exe

Platform 0 : Intel(R) Corporation

Platform 1 : Advanced Micro Devices, Inc.

Platform found : Advanced Micro Devices, Inc.

Selected Platform Vendor : Advanced Micro Devices, Inc.

Device 0 : Hainan Device ID is 0000025933F91C60

Expected Error: Unsupported device! Required CL_DEVICE_OPENCL_C_VERSION

2.0 or higher.

Here is the output from clinfo:

Number of platforms:                             2

  Platform Profile:                              FULL_PROFILE

  Platform Version:                              OpenCL 2.0

  Platform Name:                                 Intel(R) OpenCL

  Platform Vendor:                               Intel(R) Corporation

  Platform Extensions: cl_intel_dx9_media_sharing

cl_khr_3d_image_writes cl_khr_byte_addressable_store

cl_khr_d3d11_sharing cl_khr_depth_images cl_khr_dx9_media_sharing

cl_khr_fp64 cl_khr_gl_sharing cl_khr_global_int32_base_atomics

cl_khr_global_int32_extended_atomics cl_khr_icd

cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics

cl_khr_local_int32_extended_atomics cl_khr_spir

  Platform Profile:                              FULL_PROFILE

  Platform Version:                              OpenCL 2.1 AMD-APP

(2527.10)

  Platform Name:                                 AMD Accelerated

Parallel Processing

  Platform Vendor:                               Advanced Micro

Devices, Inc.

  Platform Extensions:                           cl_khr_icd

cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_dx9_media_sharing

cl_amd_event_callback cl_amd_offline_devices

  Platform Name:                                 Intel(R) OpenCL

Number of devices:                               2

  Device Type:                                   CL_DEVICE_TYPE_GPU

  Vendor ID:                                     8086h

  Max compute units:                             24

  Max work items dimensions:                     3

    Max work items[0]:                           256

    Max work items[1]:                           256

    Max work items[2]:                           256

  Max work group size:                           256

  Preferred vector width char:                   16

  Preferred vector width short:                  8

  Preferred vector width int:                    4

  Preferred vector width long:                   1

  Preferred vector width float:                  1

  Preferred vector width double:                 1

  Native vector width char:                      16

  Native vector width short:                     8

  Native vector width int:                       4

  Native vector width long:                      1

  Native vector width float:                     1

  Native vector width double:                    1

  Max clock frequency:                           1050Mhz

  Address bits:                                  64

  Max memory allocation:                         2147483647

  Image support:                                 Yes

  Max number of images read arguments:           128

  Max number of images write arguments:          128

  Max image 2D width:                            16384

  Max image 2D height:                           16384

  Max image 3D width:                            16384

  Max image 3D height:                           16384

  Max image 3D depth:                            2048

  Max samplers within kernel:                    16

  Max size of kernel argument:                   1024

  Alignment (bits) of base address:              1024

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     Yes

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               Yes

    Round to +ve and infinity:                   Yes

    IEEE754-2008 fused multiply-add:             Yes

  Cache type:                                    Read/Write

  Cache line size:                               64

  Cache size:                                    524288

  Global memory size:                            6818185216

  Constant buffer size:                          2147483647

  Max number of constant args:                   8

  Local memory type:                             Scratchpad

  Local memory size:                             65536

  Max pipe arguments:                            16

  Max pipe active reservations:                  1

  Max pipe packet size:                          1024

  Max global variable size:                      65536

  Max global variable preferred total size:      2147483647

  Max read/write image args:                     128

  Max on device events:                          1024

  Queue on device max size:                      67108864

  Max on device queues:                          1

  Queue on device preferred size:                131072

  SVM capabilities:

    Coarse grain buffer:                         Yes

    Fine grain buffer:                           Yes

    Fine grain system:                           No

    Atomics:                                     Yes

  Preferred platform atomic alignment:           64

  Preferred global atomic alignment:             64

  Preferred local atomic alignment:              64

  Kernel Preferred work group size multiple:     32

  Error correction support:                      0

  Unified memory for Host and Device:            1

  Profiling timer resolution:                    83

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     No

  Queue on Host properties:

    Out-of-Order:                                Yes

    Profiling :                                  Yes

  Queue on Device properties:

    Out-of-Order:                                Yes

    Profiling :                                  Yes

  Platform ID:                                   000001B935E3D720

  Name:                                          Intel(R) HD Graphics 520

  Vendor:                                        Intel(R) Corporation

  Device OpenCL C version:                       OpenCL C 2.0

  Driver version:                                21.20.16.4590

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 2.0

  Extensions: cl_intel_accelerator cl_intel_advanced_motion_estimation

cl_intel_d3d11_nv12_media_sharing cl_intel_driver_diagnostics

cl_intel_dx9_media_sharing cl_intel_motion_estimation

cl_intel_packed_yuv cl_intel_required_subgroup_size

cl_intel_simultaneous_sharing cl_intel_subgroups cl_khr_3d_image_writes

cl_khr_byte_addressable_store cl_khr_d3d10_sharing cl_khr_d3d11_sharing

cl_khr_depth_images cl_khr_dx9_media_sharing cl_khr_fp16 cl_khr_fp64

cl_khr_gl_depth_images cl_khr_gl_event cl_khr_gl_msaa_sharing

cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics

cl_khr_gl_sharing cl_khr_icd cl_khr_image2d_from_buffer

cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics

cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_khr_spir cl_khr_subgroups

  Device Type:                                   CL_DEVICE_TYPE_CPU

  Vendor ID:                                     8086h

  Max compute units:                             4

  Max work items dimensions:                     3

    Max work items[0]:                           8192

    Max work items[1]:                           8192

    Max work items[2]:                           8192

  Max work group size:                           8192

  Preferred vector width char:                   1

  Preferred vector width short:                  1

  Preferred vector width int:                    1

  Preferred vector width long:                   1

  Preferred vector width float:                  1

  Preferred vector width double:                 1

  Native vector width char:                      32

  Native vector width short:                     16

  Native vector width int:                       8

  Native vector width long:                      4

  Native vector width float:                     8

  Native vector width double:                    4

  Max clock frequency:                           2500Mhz

  Address bits:                                  64

  Max memory allocation:                         4266608640

  Image support:                                 Yes

  Max number of images read arguments:           480

  Max number of images write arguments:          480

  Max image 2D width:                            16384

  Max image 2D height:                           16384

  Max image 3D width:                            2048

  Max image 3D height:                           2048

  Max image 3D depth:                            2048

  Max samplers within kernel:                    480

  Max size of kernel argument:                   3840

  Alignment (bits) of base address:              1024

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     Yes

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               No

    Round to +ve and infinity:                   No

    IEEE754-2008 fused multiply-add:             No

  Cache type:                                    Read/Write

  Cache line size:                               64

  Cache size:                                    262144

  Global memory size:                            17066434560

  Constant buffer size:                          131072

  Max number of constant args:                   480

  Local memory type:                             Global

  Local memory size:                             32768

  Max pipe arguments:                            16

  Max pipe active reservations:                  65535

  Max pipe packet size:                          1024

  Max global variable size:                      65536

  Max global variable preferred total size:      65536

  Max read/write image args:                     480

  Max on device events:                          4294967295

  Queue on device max size:                      4294967295

  Max on device queues:                          4294967295

  Queue on device preferred size:                4294967295

  SVM capabilities:

    Coarse grain buffer:                         Yes

    Fine grain buffer:                           Yes

    Fine grain system:                           No

    Atomics:                                     Yes

  Preferred platform atomic alignment:           64

  Preferred global atomic alignment:             64

  Preferred local atomic alignment:              0

  Kernel Preferred work group size multiple:     128

  Error correction support:                      0

  Unified memory for Host and Device:            1

  Profiling timer resolution:                    395

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     Yes

  Queue on Host properties:

    Out-of-Order:                                Yes

    Profiling :                                  Yes

  Queue on Device properties:

    Out-of-Order:                                Yes

    Profiling :                                  Yes

  Platform ID:                                   000001B935E3D720

  Name:                                          Intel(R) Core(TM)

i7-6500U CPU @ 2.50GHz

  Vendor:                                        Intel(R) Corporation

  Device OpenCL C version:                       OpenCL C 2.0

  Driver version:                                6.8.0.2

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 2.0 (Build 2)

  Extensions:                                    cl_khr_icd

cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics

cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics

cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes

cl_intel_exec_by_local_thread cl_khr_spir cl_khr_dx9_media_sharing

cl_intel_dx9_media_sharing cl_khr_d3d11_sharing cl_khr_gl_sharing

cl_khr_fp64 cl_khr_image2d_from_buffer

  Platform Name:                                 AMD Accelerated

Parallel Processing

Number of devices:                               2

  Device Type:                                   CL_DEVICE_TYPE_GPU

  Vendor ID:                                     1002h

  Board name:                                    AMD Radeon (TM) R5 M335

  Device Topology:                               PCI[ B#1, D#0, F#0 ]

  Max compute units:                             5

  Max work items dimensions:                     3

    Max work items[0]:                           1024

    Max work items[1]:                           1024

    Max work items[2]:                           1024

  Max work group size:                           256

  Preferred vector width char:                   4

  Preferred vector width short:                  2

  Preferred vector width int:                    1

  Preferred vector width long:                   1

  Preferred vector width float:                  1

  Preferred vector width double:                 1

  Native vector width char:                      4

  Native vector width short:                     2

  Native vector width int:                       1

  Native vector width long:                      1

  Native vector width float:                     1

  Native vector width double:                    1

  Max clock frequency:                           1070Mhz

  Address bits:                                  32

  Max memory allocation:                         3221225472

  Image support:                                 Yes

  Max number of images read arguments:           128

  Max number of images write arguments:          8

  Max image 2D width:                            16384

  Max image 2D height:                           16384

  Max image 3D width:                            2048

  Max image 3D height:                           2048

  Max image 3D depth:                            2048

  Max samplers within kernel:                    16

  Max size of kernel argument:                   1024

  Alignment (bits) of base address:              2048

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     No

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               Yes

    Round to +ve and infinity:                   Yes

    IEEE754-2008 fused multiply-add:             Yes

  Cache type:                                    Read/Write

  Cache line size:                               64

  Cache size:                                    16384

  Global memory size:                            3221225472

  Constant buffer size:                          65536

  Max number of constant args:                   8

  Local memory type:                             Scratchpad

  Local memory size:                             32768

  Max pipe arguments:                            0

  Max pipe active reservations:                  0

  Max pipe packet size:                          0

  Max global variable size:                      0

  Max global variable preferred total size:      0

  Max read/write image args:                     0

  Max on device events:                          0

  Queue on device max size:                      0

  Max on device queues:                          0

  Queue on device preferred size:                0

  SVM capabilities:

    Coarse grain buffer:                         No

    Fine grain buffer:                           No

    Fine grain system:                           No

    Atomics:                                     No

  Preferred platform atomic alignment:           0

  Preferred global atomic alignment:             0

  Preferred local atomic alignment:              0

  Kernel Preferred work group size multiple:     64

  Error correction support:                      0

  Unified memory for Host and Device:            0

  Profiling timer resolution:                    1

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     No

  Queue on Host properties:

    Out-of-Order:                                No

    Profiling :                                  Yes

  Queue on Device properties:

    Out-of-Order:                                No

    Profiling :                                  No

  Platform ID:                                   00007FFDB8084AB0

  Name:                                          Hainan

  Vendor:                                        Advanced Micro

Devices, Inc.

  Device OpenCL C version:                       OpenCL C 1.2

  Driver version:                                2527.10

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 1.2 AMD-APP

(2527.10)

  Extensions:                                    cl_khr_fp64

cl_amd_fp64 cl_khr_global_int32_base_atomics

cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics

cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics

cl_khr_int64_extended_atomics cl_khr_3d_image_writes

cl_khr_byte_addressable_store cl_khr_gl_sharing

cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops

cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing

cl_khr_d3d11_sharing cl_khr_dx9_media_sharing cl_khr_image2d_from_buffer

cl_khr_spir cl_khr_gl_event cl_amd_liquid_flash

  Device Type:                                   CL_DEVICE_TYPE_CPU

  Vendor ID:                                     1002h

  Board name:

  Max compute units:                             4

  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

  Preferred vector width char:                   16

  Preferred vector width short:                  8

  Preferred vector width int:                    4

  Preferred vector width long:                   2

  Preferred vector width float:                  8

  Preferred vector width double:                 4

  Native vector width char:                      16

  Native vector width short:                     8

  Native vector width int:                       4

  Native vector width long:                      2

  Native vector width float:                     8

  Native vector width double:                    4

  Max clock frequency:                           2592Mhz

  Address bits:                                  64

  Max memory allocation:                         4266608640

  Image support:                                 Yes

  Max number of images read arguments:           128

  Max number of images write arguments:          64

  Max image 2D width:                            8192

  Max image 2D height:                           8192

  Max image 3D width:                            2048

  Max image 3D height:                           2048

  Max image 3D depth:                            2048

  Max samplers within kernel:                    16

  Max size of kernel argument:                   4096

  Alignment (bits) of base address:              1024

  Minimum alignment (bytes) for any datatype:    128

  Single precision floating point capability

    Denorms:                                     Yes

    Quiet NaNs:                                  Yes

    Round to nearest even:                       Yes

    Round to zero:                               Yes

    Round to +ve and infinity:                   Yes

    IEEE754-2008 fused multiply-add:             Yes

  Cache type:                                    Read/Write

  Cache line size:                               64

  Cache size:                                    32768

  Global memory size:                            17066434560

  Constant buffer size:                          65536

  Max number of constant args:                   8

  Local memory type:                             Global

  Local memory size:                             32768

  Max pipe arguments:                            16

  Max pipe active reservations:                  16

  Max pipe packet size:                          4266608640

  Max global variable size:                      1879048192

  Max global variable preferred total size:      1879048192

  Max read/write image args:                     64

  Max on device events:                          0

  Queue on device max size:                      0

  Max on device queues:                          0

  Queue on device preferred size:                0

  SVM capabilities:

    Coarse grain buffer:                         No

    Fine grain buffer:                           No

    Fine grain system:                           No

    Atomics:                                     No

  Preferred platform atomic alignment:           0

  Preferred global atomic alignment:             0

  Preferred local atomic alignment:              0

  Kernel Preferred work group size multiple:     1

  Error correction support:                      0

  Unified memory for Host and Device:            1

  Profiling timer resolution:                    395

  Device endianess:                              Little

  Available:                                     Yes

  Compiler available:                            Yes

  Execution capabilities:

    Execute OpenCL kernels:                      Yes

    Execute native function:                     Yes

  Queue on Host properties:

    Out-of-Order:                                No

    Profiling :                                  Yes

  Queue on Device properties:

    Out-of-Order:                                No

    Profiling :                                  No

  Platform ID:                                   00007FFDB8084AB0

  Name:                                          Intel(R) Core(TM)

i7-6500U CPU @ 2.50GHz

  Vendor:                                        GenuineIntel

  Device OpenCL C version:                       OpenCL C 1.2

  Driver version:                                2527.10 (sse2,avx)

  Profile:                                       FULL_PROFILE

  Version:                                       OpenCL 1.2 AMD-APP

(2527.10)

  Extensions:                                    cl_khr_fp64

cl_amd_fp64 cl_khr_global_int32_base_atomics

cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics

cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics

cl_khr_int64_extended_atomics cl_khr_3d_image_writes

cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission

cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops

cl_amd_media_ops2 cl_amd_popcnt cl_khr_d3d10_sharing cl_khr_spir

cl_khr_gl_event

0 Likes

The

http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf

<https://community.amd.com/external-link.jspa?url=http%3A%2F%2Fdeveloper.amd.com%2Fwordpress%2Fmedia%2F2012%2F10%2FAMD_APP_SDK_InstallationNotes.pdf>

that was top of the list states

The AMDAPPSDKROOT variable must be set to:

    C:\Program Files\AMD APP SDK\ (for 32-bit systems)

    C:\Program Files (x86)\AMD APP SDK\ (for 64-bit systems)

This seems to be backwards. Surely it should be

    C:\Program Files\AMD APP SDK\ (for 64-bit systems)

    C:\Program Files (x86)\AMD APP SDK\ (for 32-bit systems)

0 Likes

The AMDAPPSDKROOT variable must be set to:...This seems to be backwards. Surely it should be...

AMDAPPSDKROOT environmental variable points to the location where CPU runtime and other developer components are placed. On Windows 64bit OS, by default, the location is: C:\Program Files (x86)\AMD APP SDK\ . So, the setting mentioned in the installation guide seems correct to me.

differed from the recommended setting on the website which were...

I guess, you are comparing APPSDK project setting with ArrayFire. These two are different projects and their dependencies (headers and libraries) are different. Each setting is valid for its own project.

Most execs of prebuild exe files run without error - here is one exception:

The error reported by SimpleDepthImage sample is expected one. OpenCL 2.0 samples won't work on that gpu device as it does not support OpenCL 2.0.

when I tried the rebuild I got 320 errors. Clearly somethijng is amiss.

Normally you get so many errors when there is something wrong in the project setting. That's what I'm suspecting too.

Btw, did you get this error against APPSDK sample or arrayfire sample? If for APPSDK sample, please share the build errors.

0 Likes

On Windows 64 bit systems, 64 bit apps are installed, be default, in

C:\Program Files. Older, 32 bit apps are installed in C:\Program Files

(x86) so the settings in the documentation, if not a typo, are grossly

misleading (see here

<https://www.howtogeek.com/129178/why-does-64-bit-windows-need-a-separate-program-files-x86-folder/>).

The large number of errors are when I try to build the AMD SDK sample in

OpenCL1.xSamplesVS10.sln - KmeansAutoClustering. I can't copy/paste the

errors because, unlike some earlier versions of Visual Studio, each

error must be copied/pasted individually. However, I have attached a few

screencaps showing some of the errors.

The reason I am doing this in the first place is because my older son

has just started a research position in Cambridge (computational

biophysics) and will be setting up a GPU computer system. His will be

using CUDA, but after reading about CUDA and ArrayFire I concluded that

the benefit of the abstraction provided by ArrayFire would greatly ease

his programming. It would also (in theory) allow him to write code that

would be more easily ported to AMD/Radeon systems. I'm starting to

wonder if the difficulty in getting an ArrayFire development system set

up is worth the ease in programming with it.

0 Likes

On Windows 64 bit systems, 64 bit apps are installed, be default, in C:\Program Files. Older, 32 bit apps are installed in C:\Program Files(x86) so the settings in the documentation, if not a typo, are grossly misleading..

I understand what you are trying to point. However, I think there is some confusion in this regard. Just to clarify my earlier statements. On Windows 64bit OS,  C:\Program Files (x86)\AMD APP SDK\<VERSION> is the location where the installer places the CPU runtime and other developer components. By default, AMDAPPSDKROOT environmental variable points to this base directory.

Inside that base directory, two versions of libraries and executables can be found under two different sub-folders namely "x86" and "x86_64" for 32-bit and 64-bit applications respectively. Based on the target build, an OpenCL application should set the link path accordingly. For example, for 64bit application, "OpenCL.lib" should be linked against the path "$(AMDAPPSDKROOT)\lib\x86_64" [assuming AMDAPPSDKROOT variable is set to APPSDK base directory i.e. C:\Program Files (x86)\AMD APP SDK\<VERSION>].

I have attached a few screencaps showing some of the errors.

From the attached snapshots, it looks like a project setting issue because the program was unable to include the required header files (APPSDK and OpenCL).

0 Likes

I decided to forego testing AMD SDK examples and just try

loading/building an arrayfire example (conway_pretty_vs_2013. This one

worked so I'll play around with things for a while.

0 Likes

Clearly I am missing something. The getting started guide says

The ArrayFire API is wrapped into a unified C/C++ header. To use the

library simply include the arrayfire.h header file and start coding!

But even that doesn't work. Just typing #include <arrayfire.h> fails

(not found). I started a new windows c++ console project. I made sure

the properties entries matched those in the conway pretty project. When

the IDE failed to find arrayfire.h I checked the corresponding External

Dependencies. The conway project had all the arrayfire header files. The

new project did not. I'll assume I am missing a step but I have no idea

what it is.

0 Likes

By now you are sick of hearing from me.

I'm having a really bad day. I noticed my new project was set to x86.

When I switched to x64 arrayfire.h was then recognized. Please ignore

the previous rants.

0 Likes

LoL,  I have no idea what you are doing, but that last post pretty well describes must Users when they get frustrated.

0 Likes

I got hung on a problem with Visual Studio 2017. I set up the basic

environment with default code and the proper includes/libs etc/, then

exported the template. However, creating a new project based on the

template just results in

when I try to open the default code of

// ArrayFire1.cpp : Defines the entry point for the console application.*

**// 2018-04-24 15:41 **

**

*#include <arrayfire.h>*

*#include <iostream>*

*#include <cstdio>*

**

*using namespace af;*

**

*int main()*

*{*

**    return 0;**

*}

After googling that error I found many other users with the same

problem. Microsoft's response to date has been pretty much "Your call is

important to us. Please stay on the line...". More accurately it would

be "We are prioritizing the issues and looking into them".

So I zipped the prototype project so I could recover it and decided to

use it to copy in the benchmarks/blas.cpp code from the arrayfire

website <http://arrayfire.org/docs/benchmarks_2blas_8cpp-example.htm>

/*******************************************************

  • Copyright (c) 2014, ArrayFire

  • All rights reserved.

*

  • This file is distributed under 3-clause BSD license.

  • The complete license agreement can be obtained at:

  • http://arrayfire.com/licenses/BSD-3-Clause

********************************************************/

#include peak)

                peak = gflops;

            printf(" %4.0f Gflops\n", gflops);

            fflush(stdout);

        }

    }

    catch (af::exception& e) {

        fprintf(stderr, "%s\n", e.what());

        throw;

    }

    printf(" ### peak %g GFLOPS\n", peak);

    return 0;

}

Building that gives me

Severity    Code    Description    Project File    Line    Suppression State

Error    C1010    unexpected end of file while looking for precompiled

header. Did you forget to add '#include "stdafx.h"' to your source?   

ArrayFire1    d:\my\documents\visual studio

2017\projects\arrayfire1\arrayfire1\arrayfire1.cpp    50

and when I add in the missing

#include "stdafx.h"

and rebuild I get

0 Likes

Arrayfire has its own place to report/discuss the issues. For Arrayfire related issue, I would suggest you to check their support community for better and quicker response.

Btw, MS says this about Error C1010: Fatal Error C1010 | Microsoft Docs

0 Likes

Thank you very much for your incredible patience and help in getting my

environment set up. I now have a prototype app with all of the custom

stuff defined. I can copy in the sample ArrayFire code and compile/run.

The last hurdle will be to take the prototype and create a template.

That is certainly not a problem that would concern you. That will

require some more research/reading on my part as I familiarize myself

with Visual Studio 2017 (Microsoft loves to keep changing where things

are and how to do things). Once I have everything documented I plan to

post the entire process from download to config on Daniweb

<https://www.daniweb.com/> so that others there can hopefully benefit

from what I have learned.

Thanks again,

Jim de Graff

0 Likes