OCL package 1.0.0 released

Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OCL package 1.0.0 released

Matthias W. Klein
Hi Octave folks,

a new release of the OCL package providing OpenCL support for
parallelized calculations (including GPGPU) is available [1], version
1.0.0 .

It is the first package release which is fully compatible with all
recently released octave versions.  (Thanks to the "communications"
package, I learned a crucial octave programming technique.)  A summary
of all important user-visible changes is available online [2].

Users and developers can choose to either download and install the
package tarball [3], or clone the repo [4] and use 'make dist' and other
Makefile targets for local testing.

Feedback is welcome, by e-mail or project ticket.

@Octave Forge maintainers: Can the package become officially
affiliated to Octave Forge, after your fair testing?

Best,
Matt

[1] https://sourceforge.net/p/octave-ocl/
[2] https://sourceforge.net/p/octave-ocl/code/ci/default/tree/NEWS
[3] https://sourceforge.net/projects/octave-ocl/files/latest/download
[4] hg clone http://hg.code.sf.net/p/octave-ocl/code octave-ocl-code

Reply | Threaded
Open this post in threaded view
|

Re: OCL package 1.0.0 released

Matthias W. Klein
> Dear Matthias,
>
> I have managed to install your package but am getting the error
> message below.
>
> I am using ubuntu linux 14.04LTS. I am not sure whether opencl
> is completely installed?
>
> I do not know what the correct name of the opencl package is for
> ubuntu 14.04 so that I can specify this on the synaptic package
> manager?
>
> How do I specify that your package (or opencl) should use the
> core i7 on my machine?
>
> My machine also has a radeon graphics card (but I do not know
> how to determine the exact model number and specifications of
> the radeon graphics card, etc).
>
> How do I specify that your package (or opencl) should rather use
> the radeon graphics card for the computations (as this may be
> faster)?
>
> Thank you very much for any assistance with regard to the above.
>
> Best wishes,
> Constantinos
>
>
> octave:24> ocl_tests
> Testing ocl_constant function...
> Testing ocl_lib function...
> Testing ocl_context function...
> ocl: calling OpenCL function 'clGetPlatformIDs'
>   returned error 'CL_PLATFORM_NOT_FOUND_KHR' (-1001).
>   Please check your OpenCL installation.
> error: ocl_context: OpenCL function call error
> error: called from:
> error:   /home/cfrangos/octave/ocl-1.0.0/ocl_tests.m at line 85, column 11
> octave:24>
>
>
>
>
Constantinos,

the OCL package comes with a README file, in the doc/ subdirectory.  You
can use the octave command 'pkg list' to find your directory where the
package is installed, in order to get to the file.  The README contains
comprehensive info on using the package, including a "troubleshooting"
section distinguishing OpenCL installation issues from OCL issues.

 From your messages, I estimate that your system contains an OpenCL
library (=the "ICD loader"), but no specific hardware device drivers (or
none correctly installed; see also your /etc/OpenCL/vendors/* in Linux).
  You can find lots of infos on OpenCL Linux driver installation in the web.

Once you have your drivers accessible, you can use the OCL function
'ocl_context' to list and choose your hardware to use - type 'help
ocl_context' to see its syntax help.

Best,
Matt


Reply | Threaded
Open this post in threaded view
|

Re: OCL package 1.0.0 released

Constantinos Frangos
Hi Matthias,

Thanks for the detailed response.

Any help with the following would be appreciated.

(1) The directory /etc/OpenCL/vendors/ contains only one file
called intel.icd and the contents is as follows.
/usr/lib/beignet/libcl.so

(2) I tried the command ocl_context ("get_resources") and the
output is given below. Not clear what this indicates?

(3) Please provide some information on the relevant opencl linux
hardware driver for 4th generation intel core i7 and I will try to
download this from the internet.

(The information I found on the internet was not clear? The easiest
would be to locate the name of the relevant ubuntu 14.04 package
on the synaptic package manager.)

Thank you.

Best regards,
Constantinos

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

octave:32> d = ocl_context ("get_resources")
d =

  scalar structure containing the fields:

    platforms =
    {
      [1,1] =

        scalar structure containing the fields:

          platform_index = 0
          name = Experiment Intel Gen OCL Driver
          version = OpenCL 1.1 beignet 0.3
          profile = FULL_PROFILE
          vendor = Intel
          extensions = 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_icd

    }

On 8/12/19, Matthias W. Klein <[hidden email]> wrote:

>> Dear Matthias,
>>
>> I have managed to install your package but am getting the error
>> message below.
>>
>> I am using ubuntu linux 14.04LTS. I am not sure whether opencl
>> is completely installed?
>>
>> I do not know what the correct name of the opencl package is for
>> ubuntu 14.04 so that I can specify this on the synaptic package
>> manager?
>>
>> How do I specify that your package (or opencl) should use the
>> core i7 on my machine?
>>
>> My machine also has a radeon graphics card (but I do not know
>> how to determine the exact model number and specifications of
>> the radeon graphics card, etc).
>>
>> How do I specify that your package (or opencl) should rather use
>> the radeon graphics card for the computations (as this may be
>> faster)?
>>
>> Thank you very much for any assistance with regard to the above.
>>
>> Best wishes,
>> Constantinos
>>
>>
>> octave:24> ocl_tests
>> Testing ocl_constant function...
>> Testing ocl_lib function...
>> Testing ocl_context function...
>> ocl: calling OpenCL function 'clGetPlatformIDs'
>>   returned error 'CL_PLATFORM_NOT_FOUND_KHR' (-1001).
>>   Please check your OpenCL installation.
>> error: ocl_context: OpenCL function call error
>> error: called from:
>> error:   /home/cfrangos/octave/ocl-1.0.0/ocl_tests.m at line 85, column
>> 11
>> octave:24>
>>
>>
>>
>>
> Constantinos,
>
> the OCL package comes with a README file, in the doc/ subdirectory.  You
> can use the octave command 'pkg list' to find your directory where the
> package is installed, in order to get to the file.  The README contains
> comprehensive info on using the package, including a "troubleshooting"
> section distinguishing OpenCL installation issues from OCL issues.
>
>  From your messages, I estimate that your system contains an OpenCL
> library (=the "ICD loader"), but no specific hardware device drivers (or
> none correctly installed; see also your /etc/OpenCL/vendors/* in Linux).
>   You can find lots of infos on OpenCL Linux driver installation in the
> web.
>
> Once you have your drivers accessible, you can use the OCL function
> 'ocl_context' to list and choose your hardware to use - type 'help
> ocl_context' to see its syntax help.
>
> Best,
> Matt
>
>

Reply | Threaded
Open this post in threaded view
|

Re: OCL package 1.0.0 released

PhilipNienhuis
In reply to this post by Matthias W. Klein
Matthias W. Klein wrote

> Hi Octave folks,
>
> a new release of the OCL package providing OpenCL support for
> parallelized calculations (including GPGPU) is available [1], version
> 1.0.0 .
>
> It is the first package release which is fully compatible with all
> recently released octave versions.  (Thanks to the "communications"
> package, I learned a crucial octave programming technique.)  A summary
> of all important user-visible changes is available online [2].
>
> Users and developers can choose to either download and install the
> package tarball [3], or clone the repo [4] and use 'make dist' and other
> Makefile targets for local testing.
>
> Feedback is welcome, by e-mail or project ticket.

I just tested ocl-1.0 on a cross-built dev Octave 6.0.0 on my Windows 7 box
with 2 graphics HW, i.e., built-in Intel plus an NVidia graphics card.
Results: ocl_tests works fine & gives no errors and the example in the
doc/README works fine compared to mimicking the commands in Octave.

While installing/building the package I got a LOT of errors along the lines
of:

:
C:/Programs/Octave/OCTAVE~1.0_2/mingw64/bin/mkoctfile-6.0.0.exe --verbose -c
ocl_ov_matrix.cc
g++ -c
-I/home/philip/devel/octdev/mxe/mxe_64b_20190808/usr/x86_64-w64-mingw32/include
-IC:\Progr
ams\Octave\OCTAVE~1.0_2\mingw64\include\octave-6.0.0\octave\..
-IC:\Programs\Octave\OCTAVE~1.0_2\m
ingw64\include\octave-6.0.0\octave
-IC:\Programs\Octave\OCTAVE~1.0_2\mingw64\include   -fopenmp -g
 -O2    ocl_ov_matrix.cc -o ocl_ov_matrix.o
ocl_ov_matrix.cc: In member function 'octave_base_ocl_matrix<AT>*
octave_base_ocl_matrix<AT>::ocl_
index_op(const octave_value_list&, bool)':
ocl_ov_matrix.cc:181:13: warning: 'error_state' is deprecated: [6]: this
variable is obsolete and
always has the value 0 [-Wdeprecated-declarations]
         if (error_state) break;
             ^~~~~~~~~~~
In file included from
c:\programs\octave\octave~1.0_2\mingw64\include\octave-6.0.0\octave\oct.h:33
:0,
                 from ocl_octave_versions.h:4,
                 from ocl_ov_matrix.h:37,
                 from ocl_ov_matrix.cc:32:
c:\programs\octave\octave~1.0_2\mingw64\include\octave-6.0.0\octave\error.h:551:26:
note: declared
 here
 extern OCTINTERP_API int error_state;
                          ^~~~~~~~~~~
ocl_ov_matrix.cc:190:11: warning: 'error_state' is deprecated: [6]: this
variable is obsolete and
always has the value 0 [-Wdeprecated-declarations]
:

so I'd suggest to update these statements so that ocl-1.0 isn't outdated the
moment that Octave-6.1.0 is released. Perhaps some configure option stuff is
needed for that.

Next try: on the virtualized HW of the VDI clients at work. Maybe maybe it
works.

Nice work, Matthias!

Philip




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html