[OpClassifier](fix) propagate per-result core_type for multi-result s… - #1882
Open
245516766 wants to merge 1 commit into
Open
[OpClassifier](fix) propagate per-result core_type for multi-result s…#1882245516766 wants to merge 1 commit into
245516766 wants to merge 1 commit into
Conversation
olivervnc
approved these changes
Aug 31, 2026
| if (!isa<scf::SCFDialect>(def->getDialect())) { | ||
| LLVM_DEBUG(DBGS() << "[handleSCFYield] ERROR: def has multiple " | ||
| "results but is not scf dialect: " | ||
| << def->getName().getStringRef() << "\n"); |
Contributor
There was a problem hiding this comment.
最好直接打印 op,而不是 op 名称,方便定位
Comment on lines
+1436
to
+1437
| auto ctAttr = def->getAttr("ssbuffer.core_type"); | ||
| if (auto ctStrAttr = dyn_cast<StringAttr>(ctAttr)) { |
Contributor
There was a problem hiding this comment.
用 getAttrOfType(kCoreType)
| auto ctAttr = def->getAttr("ssbuffer.core_type"); | ||
| if (auto ctStrAttr = dyn_cast<StringAttr>(ctAttr)) { | ||
| std::string ctStr = ctStrAttr.getValue().str(); | ||
| coreTypes.push_back(parseCoreTypeFromString(ctStr, resultIdx)); |
Contributor
There was a problem hiding this comment.
架构可以改进:把 Value 对应的 CoreType 记录下来,最终 stamp 到 ir
| if (isa<scf::YieldOp>(elseYield)) { | ||
| processYieldOperation(elseYield, thenYield); | ||
| // Walk all scf.yield operations directly | ||
| getOperation().walk([&](scf::YieldOp yield) { |
Contributor
There was a problem hiding this comment.
walkWalkOrder::PostOrder
olivervnc
approved these changes
Aug 31, 2026
| // multi-value) | ||
| auto ctAttr = def->getAttr("ssbuffer.core_type"); | ||
| if (auto ctStrAttr = dyn_cast<StringAttr>(ctAttr)) { | ||
| std::string ctStr = ctStrAttr.getValue().str(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…cf ops
New contributor declaration
I am not making a trivial change, such as fixing a typo in a comment.
I have written a PR description following these
rules.
I have run
pre-commit run --from-ref origin/main --to-ref HEAD.Select one of the following.
/testforlittests/unittestfor C++ tests/python/testfor end-to-end testsFILL THIS IN.Select one of the following.
littests.littests I have added follow these best practices,including the "tests should be minimal" section. (Usually running Python code
and using the instructions it generates is not minimal.)