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

Fix sparse addmv ref impl for non-contig tensors #97730

Closed
wants to merge 2 commits into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Mar 28, 2023

Fix logic in test_block_addmm that tested op against itself rather than against dense implementation, by implementing ref_addvm function that converts tensor back to dense before multiplying it with vector.

Fix reference implementation by passing stride for vector and result. (Not sure wether it will be more perf efficient to iterate over strided tensor or request a dense copy as MKL implementation does)

Print more verbose error message if values differ.

Fixes #97629 , #97589 , #97563

Fix logic in `_npref_block_addmm_addmv` that tested op against itself
rather than against dense counterpart.

Print more verbose error message if values differ

Fixes #97629 ,
#97589 and #97563
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 28, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/97730

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5d036a5:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: sparse release notes category label Mar 28, 2023
@malfet malfet added the topic: bug fixes topic category label Mar 28, 2023
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 28, 2023
@malfet malfet requested a review from cpuhrsch March 28, 2023 17:05
@malfet
Copy link
Contributor Author

malfet commented Mar 28, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: sparse release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DISABLED test_block_addmv_block_size_2_int64_noncontiguous_False_cpu_float32 (__main__.TestSparseCSRCPU)
3 participants