Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*omatcopy_ct input parameter checking #640

Open
markbmuller opened this issue Jul 7, 2022 · 9 comments
Open

*omatcopy_ct input parameter checking #640

markbmuller opened this issue Jul 7, 2022 · 9 comments

Comments

@markbmuller
Copy link

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.

@ajz34
Copy link

ajz34 commented Feb 29, 2024

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

@jeffhammond
Copy link
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.

@devinamatthews
Copy link
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.

@kvaragan
Copy link
Contributor

kvaragan commented Mar 1, 2024

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

@sireeshasanga
Copy link

Issues Tab is currently disabled in amd/blis. Regarding the issues related to AMD BLIS Repo, please write to toolchainsupport@amd.com. Thanks.

@ajz34
Copy link

ajz34 commented Mar 1, 2024

Thanks for suggestions! I've tried managed writing to toolchainsupport@amd.com.

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.

@amigalemming
Copy link

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?

@kvaragan
Copy link
Contributor

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

@amigalemming
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants