mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
ROCM IFU: Fix getValueLivenessRange
This commit is contained in:
@@ -507,14 +507,16 @@ private:
|
||||
// Analyze liveness of explicit buffers
|
||||
Liveness liveness(operation);
|
||||
auto getValueLivenessRange = [&](Value value) {
|
||||
LivenessR ranges;
|
||||
// Shared memory allocated by mbarrier cannot be reused
|
||||
if (value.getDefiningOp() &&
|
||||
isa<triton::nvidia_gpu::AllocMBarrierOp>(value.getDefiningOp()))
|
||||
return Interval(std::numeric_limits<size_t>::min(),
|
||||
std::numeric_limits<size_t>::max());
|
||||
isa<triton::nvidia_gpu::AllocMBarrierOp>(value.getDefiningOp())) {
|
||||
ranges.push_back(Interval(std::numeric_limits<size_t>::min(),
|
||||
std::numeric_limits<size_t>::max()));
|
||||
return ranges;
|
||||
}
|
||||
|
||||
auto liveOperations = liveness.resolveLiveness(value);
|
||||
LivenessR ranges;
|
||||
std::for_each(liveOperations.begin(), liveOperations.end(),
|
||||
[&](Operation *liveOp) {
|
||||
ranges.add(operationId[liveOp]);
|
||||
|
||||
Reference in New Issue
Block a user