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

DaphneDSL: Integer matrix multiplication #352

Closed
RetoKrummenacher opened this issue May 6, 2022 · 2 comments
Closed

DaphneDSL: Integer matrix multiplication #352

RetoKrummenacher opened this issue May 6, 2022 · 2 comments
Labels
good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor.

Comments

@RetoKrummenacher
Copy link

Matrix multiplication with dense matrices filled with integers (int64_t) is not working.

i1 = reshape(seq(1,5,1),1,5);
print(i1);
i2 = reshape(seq(1,5,1),5,1);
print(i2);
print(i1 @ i2);

Output:
grafik

@RetoKrummenacher RetoKrummenacher changed the title Integer matrix multiplication DaphneDSL: Integer matrix multiplication May 6, 2022
@pdamme
Copy link
Collaborator

pdamme commented May 12, 2022

Thanks for bringing this to our attention, @RetoKrummenacher. Currently, we only have matrix multiplication kernels for f32 and f64 value types (based on BLAS routines). We need either a general implementation of matrix multiplication for a generic value type, or specializations for typical integer value types.

@pdamme pdamme added the good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor. label May 12, 2022
@KostasBitsakos
Copy link
Contributor

KostasBitsakos commented May 23, 2022

Hello, as far as Ι checked, blas does not natively support integer types.
Perhaps we could look for another third party library that supports integers matrix multiplication.

For now, I have implemented a solution, that uses the CastObj.h to transform integer inputs to double or float and then multiply the input matrixes.
I have also implemented the tests. It works fine, but of course it is not the optimal solution.

I could upload it and make a pull request.

corepointer pushed a commit to corepointer/daphne that referenced this issue Jun 19, 2023
This commit adds an integer version of the matrix multiplication op.

Closes daphne-eu#352, Closes daphne-eu#384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Non-urgent, simple task with limited scope, suitable for getting started as a contributor.
Projects
None yet
Development

No branches or pull requests

3 participants