Use max_group_size 1 for INDIRECT groups

Change-Id: I8db03a88af06b373d615e05c4b01e47579df2398
This commit is contained in:
Carmelo Cascone 2019-03-19 15:57:59 -07:00
parent a3635abf1d
commit 4f73fac78a

View File

@ -102,13 +102,16 @@ final class PiGroupTranslatorImpl {
actionProfileId, actionProfileModel.maxGroupSize()));
}
// If not INDIRECT, we set the maximum group size as specified in the
// model, however this might be highly inefficient for some HW targets
// which pre-allocate resources for the whole group.
final int maxGroupSize = group.type() == GroupDescription.Type.INDIRECT
? 1 : group.buckets().buckets().size();
final PiActionProfileGroup.Builder piActionGroupBuilder = PiActionProfileGroup.builder()
.withId(PiActionProfileGroupId.of(group.id().id()))
.withActionProfileId(groupKey.actionProfileId())
// We set the maximum group size as specified in the model,
// however this might be highly inefficient for some HW targets
// which pre-allocate resources for the whole group.
.withMaxSize(actionProfileModel.maxGroupSize());
.withMaxSize(maxGroupSize);
// Translate group buckets to PI group members
final PiPipelineInterpreter interpreter = getInterpreterOrNull(device, pipeconf);