Download presentation
Presentation is loading. Please wait.
Published bySarah Morton Modified over 9 years ago
1
Repeated pattern hints Original plan: attach all EDT hints to the EDT template; there is no field in the ocrEdtCreate call for hints Observation: 1 repeated patterns assume logical multi-worker synchronization point: “you worked together on this job, now do it again” Natural candidate: Finish EDT Iterative nature property of Finish EDT, not its template, but can only attach info to EDT via template, not at EDT creation time need different template for each different loop But: Finish EDTs are evil anyway! Repeated patterns preferable be non-globally-synchronizing/implicit, i.e. recursion/chaining Consequence: must make chain property part of template of EDT(s) that start the chain EDT A EDT B EDT C EDT D EDT E Sanjay Chatterjee
2
Repeated pattern hints Observation 2: repeated patterns hints should be used by scheduler to optimize locality New ideas – (Sanjay) Attach repeated pattern hints (or other hints) to affinity group, which may be specified in ocrEdtCreate – Add affinity group parameter to each ocrObjectCreate, so hints can be passed to any OCR object Advantages: – Hints can be passed to EDT at time of creation, not in advance via template – Iterations and chains can be treated uniformly – All EDTs in link of chain can specify same affinity group Disadvantages: – Some exisiting APIs need to change to accommodate affinity group parameter – If hints change, affinity group must be changed
3
Repeated pattern hints 1.Declare and initialize hint 2.Set type of hint and hint parameters 3.Attach hint to affinity group 4.Pass affinity group to repeated pattern EDT(s) at time of creation. Example: Instantiate myEDT nmax times ocrHint_t myHint; ocrGuid_t myAffinity; octHintInit(&myHint); ocrSetHintProperty(&myHint, OCR_REPEAT_COUNT, nmax); ocrAffinityCreate(&myAffinity, /*parent*/NULL_GUID, &myHint, /*properties*/NULL); ocrEdtCreate(&throwawayGuid, myEDTtemplate, paramc, paramv, depc, depv, myAffinity, NULL); 5.Rejected proposal: assign affinity group to certain OCR object after creating the object. Issue: once EDT’s guid is known, EDT may execute before affinity group can be attached ocrSetAffinity(ocrGuid_t guid, ocrGuid_t affinityGuid, u32 properties);
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.