OpenCL: increase maximum number of pipe arguments












7















I have a design composed of several kernels communicated via pipes.



One of my kernels has more than 20 pipes, but the limitation on a Intel i5 CPU seems to be 16:



# clinfo | grep pipe
Max number of pipe args 16
Max active pipe reservations 65535
Max pipe packet size 1024


Question: is there any way to increase number of pipes args?



Any help would be appreciated!










share|improve this question


















  • 1





    I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

    – huseyin tugrul buyukisik
    Jan 1 at 13:51








  • 1





    struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

    – huseyin tugrul buyukisik
    Jan 1 at 13:59













  • @huseyin why not type all your comments into an answer then?

    – Matthieu
    Jan 6 at 1:45











  • @Matthieu its not what L30nardo SV. asks. Just a workaround.

    – huseyin tugrul buyukisik
    Jan 6 at 14:49











  • @huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

    – Matthieu
    Jan 6 at 22:31
















7















I have a design composed of several kernels communicated via pipes.



One of my kernels has more than 20 pipes, but the limitation on a Intel i5 CPU seems to be 16:



# clinfo | grep pipe
Max number of pipe args 16
Max active pipe reservations 65535
Max pipe packet size 1024


Question: is there any way to increase number of pipes args?



Any help would be appreciated!










share|improve this question


















  • 1





    I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

    – huseyin tugrul buyukisik
    Jan 1 at 13:51








  • 1





    struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

    – huseyin tugrul buyukisik
    Jan 1 at 13:59













  • @huseyin why not type all your comments into an answer then?

    – Matthieu
    Jan 6 at 1:45











  • @Matthieu its not what L30nardo SV. asks. Just a workaround.

    – huseyin tugrul buyukisik
    Jan 6 at 14:49











  • @huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

    – Matthieu
    Jan 6 at 22:31














7












7








7


2






I have a design composed of several kernels communicated via pipes.



One of my kernels has more than 20 pipes, but the limitation on a Intel i5 CPU seems to be 16:



# clinfo | grep pipe
Max number of pipe args 16
Max active pipe reservations 65535
Max pipe packet size 1024


Question: is there any way to increase number of pipes args?



Any help would be appreciated!










share|improve this question














I have a design composed of several kernels communicated via pipes.



One of my kernels has more than 20 pipes, but the limitation on a Intel i5 CPU seems to be 16:



# clinfo | grep pipe
Max number of pipe args 16
Max active pipe reservations 65535
Max pipe packet size 1024


Question: is there any way to increase number of pipes args?



Any help would be appreciated!







pipe opencl






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 18:51









L30nardo SV.L30nardo SV.

281213




281213








  • 1





    I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

    – huseyin tugrul buyukisik
    Jan 1 at 13:51








  • 1





    struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

    – huseyin tugrul buyukisik
    Jan 1 at 13:59













  • @huseyin why not type all your comments into an answer then?

    – Matthieu
    Jan 6 at 1:45











  • @Matthieu its not what L30nardo SV. asks. Just a workaround.

    – huseyin tugrul buyukisik
    Jan 6 at 14:49











  • @huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

    – Matthieu
    Jan 6 at 22:31














  • 1





    I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

    – huseyin tugrul buyukisik
    Jan 1 at 13:51








  • 1





    struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

    – huseyin tugrul buyukisik
    Jan 1 at 13:59













  • @huseyin why not type all your comments into an answer then?

    – Matthieu
    Jan 6 at 1:45











  • @Matthieu its not what L30nardo SV. asks. Just a workaround.

    – huseyin tugrul buyukisik
    Jan 6 at 14:49











  • @huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

    – Matthieu
    Jan 6 at 22:31








1




1





I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

– huseyin tugrul buyukisik
Jan 1 at 13:51







I'd do this: Producer writes data pipe, also saves indexes (20 of them) into command pipe. Consumer reads command pipe, extracts 20 id values and does 20 x reads on data pipe. If all 20 datas can fit into single packet, why not make 1 struct to hold all data? Are those pipes completely decoupled from each other or have different number of reads/writes? Maybe you can achieve same thing using a "any" type design to hold any data type at a time but not all and do 20x reads/writes again. Maybe having an extra "type" field in struct and a float, int, userDefined1, userDefined20, .. near that field.

– huseyin tugrul buyukisik
Jan 1 at 13:51






1




1





struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

– huseyin tugrul buyukisik
Jan 1 at 13:59







struct myType { int typeId; float data1; int data2; float4 data20; } but I don't know if type based code branching and using a big struct is slower or faster.

– huseyin tugrul buyukisik
Jan 1 at 13:59















@huseyin why not type all your comments into an answer then?

– Matthieu
Jan 6 at 1:45





@huseyin why not type all your comments into an answer then?

– Matthieu
Jan 6 at 1:45













@Matthieu its not what L30nardo SV. asks. Just a workaround.

– huseyin tugrul buyukisik
Jan 6 at 14:49





@Matthieu its not what L30nardo SV. asks. Just a workaround.

– huseyin tugrul buyukisik
Jan 6 at 14:49













@huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

– Matthieu
Jan 6 at 22:31





@huseyintugrulbuyukisik too bad, because it looks good (at least better than "buy a new CPU" ;))

– Matthieu
Jan 6 at 22:31












1 Answer
1






active

oldest

votes


















3





+100









No, and yes.



No, because this is a descriptive information related to your hardware.
That line is the output of the following code:



{ CLINFO_BOTH, DINFO(CL_DEVICE_MAX_PIPE_ARGS, "Max number of pipe args", int), dev_is_20 },


CL_DEVICE_MAX_PIPE_ARGS seams to be a new feature of opencl 2.0 New in version 2015.2.



This is the same like how many cores you have.



If you have only 2 cpu cores you hardly using 8.



Yes, because there is a way to increase number of pipes args.
You Have to buy an other CPU one which supports more arguments.



My answer is probably disappointing.
Sorry
Good luck with your project.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53487310%2fopencl-increase-maximum-number-of-pipe-arguments%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3





    +100









    No, and yes.



    No, because this is a descriptive information related to your hardware.
    That line is the output of the following code:



    { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_PIPE_ARGS, "Max number of pipe args", int), dev_is_20 },


    CL_DEVICE_MAX_PIPE_ARGS seams to be a new feature of opencl 2.0 New in version 2015.2.



    This is the same like how many cores you have.



    If you have only 2 cpu cores you hardly using 8.



    Yes, because there is a way to increase number of pipes args.
    You Have to buy an other CPU one which supports more arguments.



    My answer is probably disappointing.
    Sorry
    Good luck with your project.






    share|improve this answer




























      3





      +100









      No, and yes.



      No, because this is a descriptive information related to your hardware.
      That line is the output of the following code:



      { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_PIPE_ARGS, "Max number of pipe args", int), dev_is_20 },


      CL_DEVICE_MAX_PIPE_ARGS seams to be a new feature of opencl 2.0 New in version 2015.2.



      This is the same like how many cores you have.



      If you have only 2 cpu cores you hardly using 8.



      Yes, because there is a way to increase number of pipes args.
      You Have to buy an other CPU one which supports more arguments.



      My answer is probably disappointing.
      Sorry
      Good luck with your project.






      share|improve this answer


























        3





        +100







        3





        +100



        3




        +100





        No, and yes.



        No, because this is a descriptive information related to your hardware.
        That line is the output of the following code:



        { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_PIPE_ARGS, "Max number of pipe args", int), dev_is_20 },


        CL_DEVICE_MAX_PIPE_ARGS seams to be a new feature of opencl 2.0 New in version 2015.2.



        This is the same like how many cores you have.



        If you have only 2 cpu cores you hardly using 8.



        Yes, because there is a way to increase number of pipes args.
        You Have to buy an other CPU one which supports more arguments.



        My answer is probably disappointing.
        Sorry
        Good luck with your project.






        share|improve this answer













        No, and yes.



        No, because this is a descriptive information related to your hardware.
        That line is the output of the following code:



        { CLINFO_BOTH, DINFO(CL_DEVICE_MAX_PIPE_ARGS, "Max number of pipe args", int), dev_is_20 },


        CL_DEVICE_MAX_PIPE_ARGS seams to be a new feature of opencl 2.0 New in version 2015.2.



        This is the same like how many cores you have.



        If you have only 2 cpu cores you hardly using 8.



        Yes, because there is a way to increase number of pipes args.
        You Have to buy an other CPU one which supports more arguments.



        My answer is probably disappointing.
        Sorry
        Good luck with your project.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 0:30









        András NagyAndrás Nagy

        302210




        302210
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53487310%2fopencl-increase-maximum-number-of-pipe-arguments%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            How to fix TextFormField cause rebuild widget in Flutter

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith