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

[wip] adjust target model to support 5x4 #1106

Closed
wants to merge 3 commits into from

Conversation

makslevental
Copy link
Contributor

@makslevental makslevental commented Mar 7, 2024

This PR parameterizes AIETargetModel with a bool virtualized, which is then queried when checking isShimNOCTile(col, row) || isShimPLTile(col, row). Note, I have only updated IPUTargetModel to the correct result because that is the only one I am familiar with (the rest fallback to virtualized=true, i.e., the current behavior).

Note, this PR touched a lot of lines only because the models were static prior and had to be updated to shared_ptrs.

fixes #1094

@makslevental makslevental force-pushed the virtualized_target_model branch 4 times, most recently from aeeb498 to a373505 Compare March 7, 2024 19:40
lib/Dialect/AIEX/Utils/AIETokenAnalysis.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetAirbin.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetCDODirect.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargetLdScript.cpp Outdated Show resolved Hide resolved
lib/Targets/AIETargets.cpp Outdated Show resolved Hide resolved
@makslevental makslevental force-pushed the virtualized_target_model branch 3 times, most recently from 9688105 to 9b631dc Compare March 7, 2024 20:44
Copy link
Contributor

github-actions bot commented Mar 7, 2024

Coverage Report

Created: 2024-03-08 03:49

Click here for information about interpreting this report.

FilenameFunction CoverageLine CoverageRegion CoverageBranch Coverage
include/aie/Dialect/AIE/IR/AIEDialect.h 81.48% 61.21% 63.16% 6.25%
include/aie/Dialect/AIE/IR/AIETargetModel.h 83.33% 71.82% 70.85% 63.73%
include/aie/Dialect/AIE/Transforms/AIEPathFinder.h 34.09% 15.45% 31.91% 0.00%
lib/Dialect/AIE/IR/AIEDialect.cpp 91.06% 82.47% 85.06% 75.14%
lib/Dialect/AIE/Transforms/AIEAssignBufferDescriptorIDs.cpp 100.00% 94.74% 98.53% 91.94%
lib/Dialect/AIE/Transforms/AIEAssignBuffers.cpp 100.00% 97.80% 96.15% 95.00%
lib/Dialect/AIE/Transforms/AIEAssignLockIDs.cpp 100.00% 100.00% 100.00% 100.00%
lib/Dialect/AIE/Transforms/AIECanonicalizeDevice.cpp 100.00% 100.00% 100.00% 100.00%
lib/Dialect/AIE/Transforms/AIECoreToStandard.cpp 96.55% 84.81% 80.42% 69.00%
lib/Dialect/AIE/Transforms/AIECreatePathFindFlows.cpp 100.00% 92.38% 86.58% 74.42%
lib/Dialect/AIE/Transforms/AIEFindFlows.cpp 100.00% 93.78% 65.40% 50.00%
lib/Dialect/AIE/Transforms/AIELocalizeLocks.cpp 100.00% 96.15% 95.83% 95.00%
lib/Dialect/AIE/Transforms/AIELowerCascadeFlows.cpp 100.00% 93.55% 95.83% 93.75%
lib/Dialect/AIE/Transforms/AIEObjectFifoStatefulTransform.cpp 100.00% 95.69% 94.47% 89.55%
lib/Dialect/AIE/Transforms/AIEPathFinder.cpp 100.00% 95.72% 88.07% 75.90%
lib/Dialect/AIEX/IR/AIEXDialect.cpp 100.00% 85.09% 84.44% 75.00%
lib/Dialect/AIEX/Transforms/AIECreateLocks.cpp 100.00% 95.10% 76.60% 52.22%
lib/Dialect/AIEX/Utils/AIETokenAnalysis.cpp 83.33% 78.61% 82.73% 67.59%
Totals 86.08% 86.85% 83.19% 74.26%
Generated by llvm-cov -- llvm version 14.0.0

@jgmelber
Copy link
Collaborator

jgmelber commented Mar 8, 2024

Do you have a new test for 5 columns?

@makslevental
Copy link
Contributor Author

Do you have a new test for 5 columns?

In another branch yes

location,
AIEDeviceAttr::get(builder.getContext(), AIEDevice::xcvc1902));
location, AIEDeviceAttr::get(builder.getContext(), AIEDevice::xcvc1902),
/*virtualized*/ builder.getBoolAttr(true));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems wrong, because the vc1902 is not virtualized.

@@ -27,9 +27,9 @@ struct AIECanonicalizeDevicePass

ModuleOp moduleOp = getOperation();

for (auto deviceOp : moduleOp.getOps<AIETarget>()) {
for (auto deviceOp : moduleOp.getOps<DeviceOp>()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed that interface - there was only one op that implemented it AIEDeviceOp

public:
AIETargetModel() = default;
AIETargetModel(bool virtualized = true) : virtualized(virtualized) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems insufficient, since we actually have many potential 'virtual' targets (for instance, of different column widths.

@stephenneuendorffer
Copy link
Collaborator

Obsolete with #1443

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.

IPU isShimNOCTile is wrong for 5x4 designs.
3 participants