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

Computing wrong result for Column Summation #568

Open
ShidehHashemian opened this issue Oct 25, 2024 · 0 comments
Open

Computing wrong result for Column Summation #568

ShidehHashemian opened this issue Oct 25, 2024 · 0 comments

Comments

@ShidehHashemian
Copy link

Hi,

I want to compute the column summation of a sparse matrix in CSR format. Here is the code snippet I wrote in cpp.

    int I = 5, J = 4;
    taco::Format B_format({taco::Dense, taco::Sparse});
    taco::Tensor<int> B({I, J}, B_format);
    B.insert({0, 1}, 1);
    B.insert({2, 0}, 2);
    B.insert({2, 2}, 5);
    B.insert({4, 2}, 3);
    B.pack();
    Format A_format({taco::Sparse});
    taco::Tensor<int> A({J}, A_format);
    taco::IndexVar i, j;
    A(j) = B(i, j);
    A.compile();
    A.assemble();
    A.compute();
    taco::write("A_taco.mtx", A);

And here is how A_taco.mtx looks like:

1  1
0  2
2  5
2  3

My operating system is Ubuntu 22.04 LTS.
I have built the version of TACO on the master branch as instructed. I didn't change the default compiler and optimization flags.

I would be grateful if you could help me with this problem.

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

2 participants
@ShidehHashemian and others