Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] StarPU SVN and OpenCL on CPU

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] StarPU SVN and OpenCL on CPU


Chronologique Discussions 
  • From: George Russell <george@codeplay.com>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] StarPU SVN and OpenCL on CPU
  • Date: Wed, 23 Feb 2011 16:46:06 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hi,

I have tried to get StarPU trunk from SVN to work for OpenCL on the CPU, but have met with no success. Is this not expected to be a usable approach?

I have made one change to StarPU code itself, to allow CPU OpenCL devices

to provide
cl_device_type device_type = CL_DEVICE_TYPE_CPU|CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR;

in the init function of the OpenCL driver.

I built StarPU as follows:

./configure --with-opencl-include-dir=/home/george/Desktop/ati-stream-sdk-v2.3-lnx32/include/ --with-opencl-lib-dir=/home/george/Desktop/ati-stream-sdk-v2.3-lnx32/lib/x86 --prefix=/home/george --disable-cpu --enable-debug --enable-verbose

Here is a log of the attempt to run one of the examples; It hangs, and I aborted it with Ctrl-C.

george@george-VirtualBox:~/Desktop/starpu/trunk$ examples/basic_examples/vector_scal
BEFORE : First element was 1.000000
[starpu][_starpu_opencl_init] Initialising OpenCL
[starpu][_starpu_opencl_init] Platforms detected: 1
[starpu][_starpu_opencl_init] Platform: ATI Stream - Advanced Micro Devices, Inc.
[starpu][_starpu_opencl_init]   1 devices detected
[starpu][load_sched_policy] Use eager scheduler (greedy policy)
[starpu][_starpu_launch_drivers] initialising worker 0
[starpu][_starpu_opencl_init_context] Initialising context for dev 0
[starpu][_starpu_opencl_get_device_name] Device 0 : [Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz]
[starpu][_starpu_opencl_worker] OpenCL (Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz) dev id 0 thread is ready to run on CPU 0 !
[starpu][_starpu_opencl_locate_file] Trying to locate <examples/basic_examples/vector_scal_opencl_kernel.cl>
[starpu][starpu_opencl_load_opencl_from_file] Source file name : <examples/basic_examples/vector_scal_opencl_kernel.cl>
[starpu][_starpu_opencl_load_program_source] OpenCL kernel </* StarPU --- Runtime system for heterogeneous multicore architectures.
 *
 * Copyright (C) 2010  Centre National de la Recherche Scientifique
 *
 * StarPU is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 *
 * StarPU is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
 */

__kernel void vector_mult_opencl(__global float* val, int nx, float factor)
{
        const int i = get_global_id(0);
        if (i < nx) {
                val[i] *= 11.0f+factor;
        }
}
>

Cheers,
George
^C
Compilation terminated.




Archives gérées par MHonArc 2.6.19+.

Haut de le page