Skip to content
Snippets Groups Projects
Commit a59450ea authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Merge branch 'consumerProducerRefactor' into 'master'

Remove the consumer/producer system from the forward method.

See merge request eclipse/aidge/aidge_backend_cpu!5
parents ef96324d 871215bb
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,14 @@ Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getNbConsumedData(Aidge::IOIndex_t /*inp
Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getNbProducedData(Aidge::IOIndex_t /*outputIdx*/) const {
return mNbProducedData[0];
}
void Aidge::SoftmaxImpl_cpu::updateConsummerProducer(){
// Update producer-consumer data
for (std::size_t inputIdx = 0; inputIdx < mNbConsumedData.size(); ++inputIdx)
mNbConsumedData[inputIdx] += getNbRequiredData(static_cast<IOIndex_t>(inputIdx)); // each input is consumed by the minimum
// amount for a forward pass
mNbProducedData[0] += getRequiredMemory(0, {});
}
void Aidge::SoftmaxImpl_cpu::forward() {
// FIXME: uncomment the following code once memory handling will work
assert(mOp.getInput(0) && "missing input #0");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment