Skip to content

Conversation

@jim22k
Copy link

@jim22k jim22k commented Mar 4, 2022

binary performs a sparse binary operation within linalg.generic,
providing the flexibility to do intersection or union or even more
advanced (ex. A-B -> -B when A is missing)

unary performs a sparse unary operation within linalg.generic
Both the "present" and "missing" values can return a result, allowing
for a simple apply, converting sparse to dense (e.g. A+1), or even
performing a sparse mask inversion

`binary` performs a sparse binary operation within linalg.generic,
providing the flexibility to do intersection or union or even more
advanced (ex. A-B -> -B when A is missing)

`unary` performs a sparse unary operation within linalg.generic
Both the "present" and "missing" values can return a result, allowing
for a simple apply, converting sparse to dense (e.g. A+1), or even
performing a sparse mask inversion
Copy link

@paul-tqh-nguyen paul-tqh-nguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks great!

let summary = "Yield from sparse_tensor set operations";
let description = [{
Yield a value from within a block.
Used to terminate a block in sparse_tensor set-like operations.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description would benefit from what "set-like" explicitly means.

#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "llvm/ADT/TypeSwitch.h"
#include <iostream>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used? Maybe I missed it, but I'm unsure if this include is necessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! That was a leftover from debugging.

Remove unused include
Improve explanatory text about set-like operations
@jim22k jim22k closed this Mar 11, 2022
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