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

DWIM rewrite patterns for graphblas.reduce_to_vector and matrix multiply ops #239

Merged
merged 3 commits into from
Nov 19, 2021

Conversation

paul-tqh-nguyen
Copy link
Contributor

This PR also:

  • Comments out unused code that causes warnings.
  • Refactors *::buildAlgorithm to have a smaller signature.
  • Adds functional tests.

@coveralls
Copy link

coveralls commented Nov 15, 2021

Pull Request Test Coverage Report for Build 1461170608

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 83.914%

Totals Coverage Status
Change from base Build 1449149872: 0.1%
Covered Lines: 3683
Relevant Lines: 4389

💛 - Coveralls

@jim22k
Copy link
Contributor

jim22k commented Nov 15, 2021

I had an internal dialog with myself -- capturing here for others to consider.

I had the thought that DWIM rewriting should happen on the generic versions of operations. That way anyone who manually writes a generic call (useful for user-defined operators) will get the benefit of DWIM rewriting.

I have decided this is a bad choice because several operations have custom operators which don't go through the generic machinery. For example, ReduceToVector with count doesn't lower to generic. Instead, it writes the full lowering pass directly (because it is both easy to write and much more efficient than going through the generic looping). For the case of ReduceToVector, that would require DWIM rewriting to handle both ReduceToVector and ReduceToVectorGeneric. That is asking too much of DWIM rewriting.

So, I think we should only perform DWIM rewriting on the non-generic operations. That should cover the 99% of normal cases, giving users freedom in writing algorithms without worrying about the strict requirements of the lowering algorithm. And for those users who need to manually write generic operations, they will have to operate in strict mode. But they are already "expert" users, so this is not much of a burden.

@jim22k jim22k merged commit 268a6ed into metagraph-dev:main Nov 19, 2021
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

Successfully merging this pull request may close these issues.

3 participants