Skip to content

*omatcopy_ct input parameter checking #640

Open

Description

@markbmuller

When using a downloaded AMD precompilled blis library and calling domatcopy to perform a transpose copy, I have received the following error message:

libblis: /home/amd/jenkins/workspace/AOCL_Month_Release_Package/blis/frame/compat/bla_omatcopy.c (line 536):
libblis: Invalid function parameter in bli_doMatCopy_ct() .

Upon downloading and compiling BLIS commit 3aa0044, I get the same behavior. In bli_doMatCopy_ct, it checks the input on line 534 with:

if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < rows )

Since it is applying a transpose to b, it should be comparing ldb with cols, not rows. This in the routine bli_doMatCopy_ct. There is the same issue with bli_soMatCopy_ct, bli_coMatCopy_ct, and bli_zoMatCopy_ct.

Activity

  1. ajz34 commented on Feb 29, 2024

    @ajz34

    I think I also encountered this problem on AOCL-BLAS 4.2.
    Perhaps issues has been disabled by amd/blis, so posting my workaround here.

    Minimal reproduction code could be

    /* problem.cpp */
    #include "blis.h"
    
    int main() {
        char trans = 'T';
        double alpha = 1;
        int n = 20, lda = 20;
        int m = 10, ldb = 10;  /* m = ldb smaller than n = lda could reproduce this issue */
        double *A = (double *) malloc(sizeof(double) * m * n);
        double *B = (double *) malloc(sizeof(double) * m * n);
        domatcopy(&trans, &n, &m, &alpha, A, &lda, B, &ldb);
        free(A); free(B);
    }

    and simply compile by

    $ g++ -o problem problem.cpp -I$HOME/aocl/4.2.0/aocc/include -L$HOME/aocl/4.2.0/aocc/lib -lblis
  2. jeffhammond commented on Feb 29, 2024

    @jeffhammond
    Member

    This is not an AMD support channel. Please only report bugs against the BLIS project that's in this repo. If you can reproduce AMD BLIS bugs with this repo, by all means report them. Otherwise, take your issues to AMD.

  3. devinamatthews commented on Feb 29, 2024

    @devinamatthews
    Member

    I would have phrased it nicer but yes, the code in question is not currently in the FLAME BLIS repo. It is part of #567 which has not been merged at this point. I'm going to keep this open in case we do merge that PR.

  4. kvaragan commented on Mar 1, 2024

    @kvaragan
    Contributor

    @markbmuller, @ajz34 - you can post the issue at https://github.com/amd/blis .
    Thanks for reporting, will look into this issue.

  5. sireeshasanga commented on Mar 1, 2024

    @sireeshasanga

    Issues Tab is currently disabled in amd/blis. Regarding the issues related to AMD BLIS Repo, please write to [email protected]. Thanks.

  6. ajz34 commented on Mar 1, 2024

    @ajz34

    Thanks for suggestions! I've tried managed writing to [email protected].

    Some chats follows.
    Actually, I searched this problem on search engines, and found this is (probably) the only related thread discussing this issue.
    Just moments ago I also tried to put this issue on AMD community, but found that posting some source code (or resubmitting draft within 10 minutes) could be difficult task. So finally chose to email.

  7. amigalemming commented on May 17, 2024

    @amigalemming

    I am also hit by this problem. Issue tracker of https://github.com/amd/blis is empty. What is the current state of the bug?

  8. kvaragan commented on May 17, 2024

    @kvaragan
    Contributor

    We fixed this issue, and it will be available in our next release.
    Thanks,
    Kiran V

  9. amigalemming commented on May 17, 2024

    @amigalemming

    We fixed this issue, and it will be available in our next release.

    Is there a branch at GitHub where we can fetch the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions