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

Add a CSR view method #52

Open
3 tasks
KyleVaughn opened this issue Oct 13, 2023 · 9 comments
Open
3 tasks

Add a CSR view method #52

KyleVaughn opened this issue Oct 13, 2023 · 9 comments
Assignees
Labels
Accepted Issue is ready to be assigned and worked on
Milestone

Comments

@KyleVaughn
Copy link
Collaborator

KyleVaughn commented Oct 13, 2023

Description:

The sparse matrix multiplication is implemented in various methods where the matrix is stored in different formats. It would be easier for developers to check the correctness of the CSR method when the matrix is printed in the original 2D format. In light of this, the CSR view method is designed to print the 2D matrix by taking the rowPtrs, colIdx, and value arrays in CSR format.

Tasks:

  • Take rowPtrs, colIdx, and value arrays to be the inputs.
  • Loop through the elements and rearrange them in a correct 2D matrix format.
  • Print the matrix to a file from the given filename.

Definition of done:

The method can print the correct matrix to screen and a file given the arrays in CSR format. The method can pass all the CSR view method tests.

@bkochuna bkochuna added this to the Lab 07 milestone Oct 13, 2023
@KyleVaughn
Copy link
Collaborator Author

Review by @jacob-umich

@jacob-umich
Copy link
Collaborator

jacob-umich commented Oct 13, 2023

Description:

  • I think your description could have some more clarity (ex. are you showing just one element at a time or all elements at once?)
  • Also give more background for the purpose of this task. What functionality requirement is it fulfilling?

Also, I my thought was the view method is supposed to print the whole matrix. I am not sure though.

Tasks:

  • How does your task depend on other's tasks?
  • Isn't your CSR convert function being created by another issue?

Definition of done:

  • include how tests can be used to define done
  • please provide more detail. (what "must print the element of the matrix given indices i, j")

@zkjiaumich zkjiaumich added the Created Issue requires further details for acceptance label Oct 17, 2023
@jacob-umich jacob-umich added Accepted Issue is ready to be assigned and worked on and removed Created Issue requires further details for acceptance labels Oct 18, 2023
@lwh1106
Copy link
Collaborator

lwh1106 commented Oct 19, 2023

Hi, the CSR class has been added to the "csr" branch. You may start to write your "view" function if you want. Just add some comments or examples to tell me "what it supposed to be" in your definition -- otherwise I have no clue in my test. Also, just let me know if there are any bugs ...

@jacob-umich
Copy link
Collaborator

@zkjiaumich go ahead and make a pull request for your view method and I can start reviewing it

@zkjiaumich
Copy link
Collaborator

@lwh1106 Can you add the view test to our branch? I may need to double check the correctness of the view method.

@lwh1106
Copy link
Collaborator

lwh1106 commented Oct 26, 2023

@zkjiaumich I try to run your view function but it seems that it cannot be built ...

@lwh1106
Copy link
Collaborator

lwh1106 commented Oct 26, 2023

@jacob-umich Sorry, I am a bit late (hopefully not the very last minute) to finish this test! Now the test is over there (in the directory of spmv/tests/CSR_View_Test), and you are free to review my work! Thanks for your patience.

@jacob-umich
Copy link
Collaborator

@lwh1106 I think I am only reviewing the implementation of the view method. I think the review of the tests is going to be handled by someone else if that's what you are talking about.

@lwh1106
Copy link
Collaborator

lwh1106 commented Oct 26, 2023

@jacob-umich Thanks! Sorry, I messed up these two, but in the version at midnight (not the current one), based on the test results, the view method works well, after it was modified by Zikang -- also thanks for his hard work.

@lwh1106 lwh1106 mentioned this issue Oct 26, 2023
3 tasks
@jacob-umich jacob-umich mentioned this issue Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue is ready to be assigned and worked on
Projects
Status: In Progress
Development

No branches or pull requests

5 participants