Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

OpenCL Channel Extension Support on Arria 10 SoC Platform

Hi,

I am trying to use the OpenCL channels on Arria 10 SoC Platform. To start with, I am trying out Channelizer example from the design examples here (https://www.altera.com/support/support-resources/design-examples/design-software/opencl/channelizer.html). I do not see any problem with the FPGA bitstream generation. However, when I run the host application, it gets hung waiting for the commands to complete (line 216 in main.cpp status = clFinish(queues[i])) Is there any reason for this to happen? It waits forever. Appreciate suggestions.

Thanks.

Gopal.

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am not sure if that example is supposed to work on SoC platforms. Contact Altera directly and ask them.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for your response.

    I think that the channel extension itself is not supported for SoC platforms. Because even the simple kernel like the one below is not working. It compiles fine. However, the commands will not finish at all. I am using Arria 10 SoC platform with Quartus Pro 16.1. Please help to clarify. I tried posting is forum but I was asked to contact Altera directly. Please suggest / redirect this request accordingly.

    ------------------This is the kernel I am using-----------------------------

    #pragma OPENCL_EXTENSION cl_altera_channels : enable

    channel int c0;

    __kernel void producer() {

    for(int i=0; i < 10; i++) {

    write_channel_altera(c0, i);

    printf("Producer : Writing %d into Channel\n", i);

    }

    }

    __kernel void consumer( __global uint * restrict dst ) {

    for(int i=0; i < 5; i++) {

    dst = read_channel_altera(c0);

    printf("consumer : read %d from channel\n", dst);

    }

    }

    --------------------------------------------------------------------------------

    ========Device Query Log========

    Querying platform for info:

    ==========================

    CL_PLATFORM_NAME = Altera SDK for OpenCL

    CL_PLATFORM_VENDOR = Altera Corporation

    CL_PLATFORM_VERSION = OpenCL 1.0 Altera SDK for OpenCL, Version 16.1

    Querying device for info:

    ========================

    CL_DEVICE_NAME = a10socArria 10 SoC Development Kit

    CL_DEVICE_VENDOR = Altera Corporation

    CL_DEVICE_VENDOR_ID = 4466

    CL_DEVICE_VERSION = OpenCL 1.0 Altera SDK for OpenCL, Version 16.1

    CL_DRIVER_VERSION = 16.1

    CL_DEVICE_ADDRESS_BITS = 64

    CL_DEVICE_AVAILABLE = true

    CL_DEVICE_ENDIAN_LITTLE = true

    CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 0

    CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0

    CL_DEVICE_GLOBAL_MEM_SIZE = 0

    CL_DEVICE_IMAGE_SUPPORT = true

    CL_DEVICE_LOCAL_MEM_SIZE = 0

    CL_DEVICE_MAX_CLOCK_FREQUENCY = 0

    CL_DEVICE_MAX_COMPUTE_UNITS = 0

    CL_DEVICE_MAX_CONSTANT_ARGS = 0

    CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 0

    CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3

    CL_DEVICE_MEM_BASE_ADDR_ALIGN = 8192

    CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1

    CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0

    Command queue out of order? = false

    Command queue profiling enabled? = true
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It appears that this is the problem with the Ubuntu OepnCL driver. I am able to run the applications that use Channels on Arria 10 running Angstrom OS. It does not work with Ubuntu. Any suggestions on how to modify driver to get it working with Ubuntu?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    If you are suing an OS that is not officially supported by Altera, then there is little to nothing the average user can do about such issues. If, however, the OS is supported by Altera on this particular platform, you should contact Altera directly as I mentioned. Just go to Altera.com, create an account, and then open a support request and explain your problem.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I contacted Altera. If you think that this thread is not of any use in this forum, you are free to take it off. However, I feel that knowing something that does not work in Ubuntu contains more information than both of your answers.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It looks like you think I am a moderator or something here, I am not; I am just a user like the rest. This forum is simply a user forum and not even moderated/watched by Altera. I am suggesting that you should contact Altera directly so that you can find a solution to your problem, because I know you will never find a solution to such problems here on this forum. If you want to sit and wait, be my guest; I am just trying to save you time and effort.