7 Replies Latest reply: Apr 11, 2013 12:05 AM by himanshu.gautam RSS

How to bind same physical device between CAL and OpenCL ?

Raistmer Apprentice
Currently Being Moderated

There are some AMD GPUs that supports CAL only. And some that supports both OpenCL and CAL. There can be some new devices that supports OpenCL only.

So, if mix of such devices presents in PC one should know what physical device can accept only work for CAL-based app and what for OpenCL-based app.

I'm working in distributed computation project that attempts to load all available computational resourses with most relevant work for them.

So, if device supports both OpenCL and CAL we should send only work for OpenCL (or CAL in another subprojects) based app. And don;t send work for app with another supported API. Hence, we should know how to identify same physical device in CAL enueration API and OpenCL enumeration API.

Perhaps this question arose before. Than please point me to relevant info.

 

Once again. I need a way to say that this particular device in CAL is the same physical device as some particular device in OpenCL in case if device supports both APIs.

  • Re: How to bind same physical device between CAL and OpenCL ?
    himanshu.gautam Master
    Currently Being Moderated

    I really dont know what you mean by CAL

    But anyway,

    Let us say You enumerate through CAL and OpenCL and have 2 sets.

    CALSET, OpenCLSET

    Take an intersection of them and remove it from CALSET --- then you have pure CAL device set.

     

    So, the question now boils down to finding a common property.

    I think "devce name" in OpenCL has a "unique Id" associated with it....

    May be, if that unique ID can be obtained in both CAL and OpenCL enumeration -- you can solve this.

     

    Just my few cents. Feel free to Ignore..

    Regards

    Himanshu , Bruhaspati

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

    The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

    • Re: How to bind same physical device between CAL and OpenCL ?
      himanshu.gautam Master
      Currently Being Moderated

      One another proprty that you can look at is "PCI Enumeration" -- Bus / Slot/ Function

      This can identify only 1 device.

      If we can get this information through OpenCL an CAL -- we can do this very easily.

       

      I am not sure, if I can get these details through OpenCL though...It would be good to have though.

      Regards

      Himanshu , Bruhaspati

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

      The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

      • Re: How to bind same physical device between CAL and OpenCL ?
        himanshu.gautam Master
        Currently Being Moderated

        Did you get to solve your problem?

        Regards

        Himanshu , Bruhaspati

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

        The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

        • Re: How to bind same physical device between CAL and OpenCL ?
          himanshu.gautam Master
          Currently Being Moderated

          I just noticed this in the "clinfo" output. It is able to specify PCIe topology.

          Not sure where it gets this info from. This can come handy used to segregate your devices

            Platform Name:                                 AMD Accelerated Parallel Proces

          sing

          Number of devices:                               2

            Device Type:                                   CL_DEVICE_TYPE_GPU

            Device ID:                                     4098

            Board name:                                    AMD Radeon HD 7900 Series

            Device Topology:                               PCI[ B#1, D#0, F#0 ]

          Regards

          Himanshu , Bruhaspati

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

          The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

          • Re: How to bind same physical device between CAL and OpenCL ?
            himanshu.gautam Master
            Currently Being Moderated

            Looks like "'CL_DEVICE_TOPOLOGY_AMD'" is the property that you need to query for in clGetDeviceInfo() API to get the PCI topology.

            This is currently supported only under Linux.

             

            You can find more information in the AMD APP OpenCL Programming Guide - Appendix A

            HTH

            Regards

            Himanshu , Bruhaspati

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

            The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

            • Re: How to bind same physical device between CAL and OpenCL ?
              realhet Novice
              Currently Being Moderated

              Hi,

               

              I think the problem is on the CAL side. As I know, from CAL you can't get any info that you can use for the identification of an OCL device neither an ADL (Amd Display Lib) device.

               

              (ADL and OCL devices could be 'matched' though, because ADL can report pci topology stuff too.)

              • Re: How to bind same physical device between CAL and OpenCL ?
                himanshu.gautam Master
                Currently Being Moderated

                One another forum user (6bolt) is also going through a similar problem....

                He is going to try a new experiment.... I thought it is probably worth sharing it here...

                He is going to populate some memory area through DirectX (which allows PCIe enumeration) and find out OpenCL device which is able to see the memory changes (or something on those lines).

                Check out http://devgurus.amd.com/message/1288881#1288881

                I have asked 6bolt to report any success with his experiments... May be, it might be useful to Raistmer.

                Regards

                Himanshu , Bruhaspati

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

                The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

More Like This

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points