[Beignet] [BUG] Build-in function get_work_dim isn't implemented

Zhigang Gong zhigang.gong at linux.intel.com
Mon May 27 01:48:37 PDT 2013


Thanks for reporting this bug, I will look into it. Could you
refine the case a little bit more complete? For example, add some
code to read the work_dim back to CPU side and do the verification?

On Mon, May 27, 2013 at 07:54:29AM +0000, Sun, Yi wrote:
> The build-in function get_work_dim is not implemented yet.
> 
> Attachment is the test case for that. 

> Date: Sun, 26 May 2013 23:24:27 +0800
> From: Yi Sun <yi.sun at intel.com>
> To: beignet at lists.freedesktop.org
> CC: Yi Sun <yi.sun at intel.com>, gordon.jin at intel.com
> Subject: [Beignet] [PATCH] utest: Add test case for build-in function
>  get_work_dim.
> X-Mailer: git-send-email 1.7.6.4
> 
> We're starting to implement the test cases for each build-in fucntions, of course, occording to OpenCL 1.0 specification.
> 
> Now this case is only for compiling since function get_work_dim is just in the TO-DO list. We can enhance test case when the function is implemented.
> 
> Signed-off-by: Yi Sun <yi.sun at intel.com>
> 
> diff --git a/kernels/buildin_work_dim.cl b/kernels/buildin_work_dim.cl
> new file mode 100644
> index 0000000..67bc2e7
> --- /dev/null
> +++ b/kernels/buildin_work_dim.cl
> @@ -0,0 +1,3 @@
> +kernel void buildin_work_dim() {
> +  int i = get_work_dim();
> +}
> diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
> index 63c873d..5775357 100644
> --- a/utests/CMakeLists.txt
> +++ b/utests/CMakeLists.txt
> @@ -76,6 +76,7 @@ set (utests_sources
>    compiler_volatile.cpp
>    compiler_copy_image1.cpp
>    compiler_get_image_info.cpp
> +  buildin_work_dim.cpp
>    runtime_createcontext.cpp
>    utest_assert.cpp
>    utest.cpp
> diff --git a/utests/buildin_work_dim.cpp b/utests/buildin_work_dim.cpp
> new file mode 100644
> index 0000000..730be86
> --- /dev/null
> +++ b/utests/buildin_work_dim.cpp
> @@ -0,0 +1,13 @@
> +#include "utest_helper.hpp"
> +
> +static void buildin_work_dim(void)
> +{
> +  // Setup kernel and buffers
> +  OCL_CREATE_KERNEL("buildin_work_dim");
> +
> +  OCL_NDRANGE(1);
> +
> +}
> +
> +MAKE_UTEST_FROM_FUNCTION(buildin_work_dim);
> +
> -- 
> 1.7.6.4
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet

> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet



More information about the Beignet mailing list