Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ mlir::getBufferizationOptionsForSparsification(bool analysisOnly) {
options.testAnalysisOnly = true;
options.printConflicts = true;
}
// Since this mini-pipeline may be used in alternative pipelines (viz.
// different from the default "sparsifier" pipeline) where unknown ops
// are handled by alternative bufferization methods that are downstream
// of this mini-pipeline, we allow unknown ops by default (failure to
// bufferize is eventually apparent by failing to convert to LLVM IR).
options.allowUnknownOps = true;
Copy link
Member

Choose a reason for hiding this comment

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

just fyi: From a correctness perspective, setting allowUnknownOps = true is always safe. The main benefit of setting allowUnknownOps = false is that we get more descriptive error messages in case there are ops that cannot be bufferized (and are not lowered by subsequent passes). Bufferizing the entire IR with One-Shot Bufferize is generally more efficient. If an op is bufferized later, a buffer copy will likely be inserted by that pass (when buffering an op that writes to memory).

return options;
}

Expand Down