Forum Discussion

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

Using Channel with multiple Compute Unit

Hi everyone,

I read from the AOCL programming guide that a kernel with channel can not be vectorized (SIMD I assume). But is it possible to use channel in kernels with multiple compute units (but no vectorization) ?

I am trying to use a multiple CU kernel to write to the separate channels based on the value of global_work_id % number of CUs, and then read those channels in a consumer tasked kernel. Is there a way to accomplish this or is this disallowed by AOCL?

Thanks!

3 Replies

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

    Yes of course you can! although officially there is no support for invoking multiple compute units with channels, you can manually create them by replicating the kernels while maintaining channel and NDRange constructs across the kernels.

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

    --- Quote Start ---

    I am trying to use a multiple CU kernel to write to the separate channels based on the value of global_work_id % number of CUs, and then read those channels in a consumer tasked kernel. Is there a way to accomplish this or is this disallowed by AOCL?

    --- Quote End ---

    The most convenient way to achieve this is to use replicated single work-item autorun kernels, and use the compute unit ID to customize the channel connections. This cannot be done using num_compute_unit replication for NDRange kernels.