fix: keep scalar bitwise src/dst in distinct storage#631
fix: keep scalar bitwise src/dst in distinct storage#631HecreReed wants to merge 3 commits intohw-native-sys:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces logic to ensure that scalar bitwise operations (TAndS, TOrS, TXorS) use distinct local storage for their source and destination operands. This is implemented by adding a static analysis helper to trace tile storage and updating the memory planning pass to record semantic conflicts between these operands. A review comment identifies a critical type mismatch in the IR verification logic where an attribute is passed to a function expecting a value, which would result in a compilation error.
| auto addressSpace = getPTOMemorySpaceEnum(allocTile.getResult().getType()); | ||
| if (!isLocalStorageSpace(addressSpace) || !allocTile.getAddr()) | ||
| return std::nullopt; | ||
| auto addr = getConstantIntegerValue(allocTile.getAddr()); |
There was a problem hiding this comment.
Codex Review该评论由 review 机器人自动更新。
SummaryPR #631 introduces a deterministic sample/CI regression by forcing the mgather/mscatter Python samples to emit A5-targeted modules. Findings
Adding |
|
/run a5 |
|
已接收
页面会自动刷新,可以直接看当前阶段、排队情况和最近结果。 |
A5 板测失败
日志尾部 |
|
/run a5 |
|
已接收
页面会自动刷新,可以直接看当前阶段、排队情况和最近结果。 |
A5 板测失败
失败用例
|
A5 板测失败详情:PR #631quant
quant_asym
partarg
mscatter
mgather
abs
|
Summary
pto.tands,pto.tors, andpto.txorsDetails
This follows issue #614 direction 2: keep the ISA/frontend distinct-storage constraint and make PTOAS planning honor it.
PlanMemory already had semantic conflict tracking for scratch-vs-dst style cases, but it did not explicitly model the
src/dststorage constraint for scalar bitwise ops. That allowed memory planning to potentially co-locate those buffers if liveness alone looked reusable.The verifier side also only rejected
src == dst, which missed aliasing forms such as zero-offset subviews of the same statically addressed local tile.Validation
git diff --checklib/PTO/IR/PTO.cpp.olib/PTO/Transforms/PTOPlanMemory.cpp.optoasbuild is currently blocked by pre-existing unrelated-Werrorfailures inPTOToEmitC.cpp,PTOTypeDefs.cpp, andPTOSyncUtils.cpp