-
Notifications
You must be signed in to change notification settings - Fork 12
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
[AIEX] Actively avoid bank conflicts in the scheduler #95
Conversation
4203db5
to
f92675a
Compare
33f4c80
to
5fd0102
Compare
5fd0102
to
13d6dd9
Compare
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file declares the AIEngine V2 Address Space and DM banks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please check with @abnikant or @konstantinschwarz , but I think we are starting to move version-specific files into separate sub-folders. Maybe we should move that new file into a aie2/
folder already.
llvm/test/CodeGen/AIE/aie2/GlobalISel/inst-select-indexed-vlda_ups.mir
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of great improvements, thanks for also splitting the code in nice commits! Please look through my remaining commits, we are almost there 💪
02ee584
to
c341c2c
Compare
PM, // Address space for Program Memory (PM) | ||
DM, // Address space for Data Memory(DM) includes Bank A, B, C, D | ||
DM_test, | ||
stack, // Address space for stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are DM_test
and stack
actually used somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stack
could be used as per AIE-API, Not sure about DM_test but we need to have the same enum
number for flows to work in future. We can discuss this in more detail.
} | ||
|
||
void FuncUnitWrapper::blockResources() { | ||
Required = ~0; | ||
Reserved = ~0; | ||
Slots = ~0; | ||
// Since the HW stalls in the event of memory bank conflicts, we don't need to | ||
// block the resource. It is overly conservative if we block all memory banks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a unit test in HazardRecognizerTest
to show that blockResources
does not touch MemoryBanks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the comments I left, mostly to better disambiguate between TM and DM memories. We are almost there 💪
c341c2c
to
ceed3ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great work :)
This uses MemInstrItinData records to generate InstrInfo::getMemoryCycles(unsigned SchedClass)
The work expect --aie-stack-addrspace passed to describe which AS stack is allocated
ceed3ee
to
f4c07c8
Compare
Use bank annotation information in Hazard recognizer to avoid scheduling multiple memory operation to a bank in same cycle.
In the current approach