Forum Discussion

zjinf's avatar
zjinf
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

Seems that aocl (openCL ) can't recognize "__prefetching_load" attribute in aocl 19.2??

Hi inteler

Environment: centos 7.5

aocl verison: 19.2.0.57

1 error: implicit declaration of function '__prefetching_load' is invalid in OpenCL

2 probe_buf[b].vector[s].data[i] = __prefetching_load(&probe[p robe_in_addr++]);

from the error hint, it seems that the openCL can't recognize "__prefetching_load" , but it shows on "Intel FPGA SDK for openCL pro edition best practices guide 19.2", it can found similar usage! Dose it need any other compile command???

5 Replies

    • zjinf's avatar
      zjinf
      Icon for Occasional Contributor rankOccasional Contributor

      HI Mylee

      i run the chapter chapter 1.3 case ,still wrong:

      aoc: Environment checks are completed successfully.

      aoc: Cached files in /var/tmp/aocl/iot may be used to reduce compilation time

      You are now compiling the full flow!!

      aoc: Selected target board a10gx

      aoc: Running OpenCL parser....

      /home/iot/work_example/tmp/prefetch/test.cl:11:35: error: implicit declaration of function '__prefetching_load' is invalid in OpenCL

      sum[k] += __prefetching_load(&a[j]);

      • HRZ's avatar
        HRZ
        Icon for Frequent Contributor rankFrequent Contributor

        I think the possibility to control the LSU type was added in v19.3 and is not [fully] supported in v19.2. Only the guide from v19.3 has the "Controlling the Load-Store Units" section. The example in Section 1.3 of the v19.2 guide is probably a documentation error that mistakenly introduces an unreleased feature.

  • MEIYAN_L_Intel's avatar
    MEIYAN_L_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    The __prefetching_load() builtin is only available for the OpenCL SDK version 19.3 onward. A simple work around for 19.2 would be to replace

    sum[k] += __prefetching_load(&a[j]);

    with

    sum[k] += a[j];

    The old version of this code can be found here https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/archives/aocl-best-practices-guide-19-1.pdf in Chapter 1.3.

    There is an documentation error in 19.2 version which use _prefetching_load which is wrong.

    I had reported to the team about the documentation error as well.

    Thanks