Skip to content

Commit a987d8b

Browse files
DianaChenigcbot
authored andcommitted
IGA: Preserve special token from the input
Preserve special token from the input when auto-dep-set is enabled and insert a sync for additional swsb info if required
1 parent 1248bd1 commit a987d8b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

visa/iga/IGALibrary/IR/SWSBSetter.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,16 @@ void SWSBAnalyzer::run()
11211121
inst->setSWSB(
11221122
SWSB(SWSB::DistType::NO_DIST, distanceDependency.tokenType, 0, distanceDependency.sbid));
11231123
} else {
1124-
inst->setSWSB(distanceDependency);
1124+
// if the input SWSB is a special token, preserve it and insert a sync before to carry the dependency info
1125+
// Note that dpas must not have special token so we only do this check for non-dpas here
1126+
if (inst->getSWSB().hasSpecialToken()) {
1127+
if (distanceDependency.hasSWSB()) {
1128+
Instruction* syncInst = m_kernel.createSyncNopInstruction(distanceDependency);
1129+
bb->insertInstBefore(instIter, syncInst);
1130+
}
1131+
} else {
1132+
inst->setSWSB(distanceDependency);
1133+
}
11251134
}
11261135
assert(distanceDependency.verify(m_swsbMode, inst->getSWSBInstType(m_swsbMode)));
11271136

visa/iga/IGALibrary/Models/Models.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ SPDX-License-Identifier: MIT
3232

3333
using namespace iga;
3434

35-
3635
// full "constructor"
3736
#define UNWRAP_TUPLE(...) {__VA_ARGS__}
3837
#define IGA_REGISTER_SPEC(\

0 commit comments

Comments
 (0)