Skip to content
Snippets Groups Projects
Commit 61b0402b authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed scheduling

parent 50d21397
No related branches found
No related tags found
1 merge request!17Update with default operator impl
Pipeline #33221 passed
This commit is part of merge request !17. Comments created here will be created in the context of that merge request.
...@@ -55,6 +55,8 @@ class test_scheduler(unittest.TestCase): ...@@ -55,6 +55,8 @@ class test_scheduler(unittest.TestCase):
graph_view.set_datatype(aidge_core.DataType.Float32) graph_view.set_datatype(aidge_core.DataType.Float32)
graph_view.set_backend("cpu") graph_view.set_backend("cpu")
graph_view.forward_dims()
scheduler = aidge_core.SequentialScheduler(graph_view) scheduler = aidge_core.SequentialScheduler(graph_view)
scheduler.generate_scheduling() scheduler.generate_scheduling()
...@@ -80,6 +82,8 @@ class test_scheduler(unittest.TestCase): ...@@ -80,6 +82,8 @@ class test_scheduler(unittest.TestCase):
graph_view.set_datatype(aidge_core.DataType.Float32) graph_view.set_datatype(aidge_core.DataType.Float32)
graph_view.set_backend("cpu") graph_view.set_backend("cpu")
graph_view.forward_dims()
scheduler = aidge_core.SequentialScheduler(graph_view) scheduler = aidge_core.SequentialScheduler(graph_view)
scheduler.generate_scheduling() scheduler.generate_scheduling()
......
...@@ -28,7 +28,8 @@ public: ...@@ -28,7 +28,8 @@ public:
return std::make_unique<ProducerImpl_cpu>(op); return std::make_unique<ProducerImpl_cpu>(op);
} }
void forward() override {}; NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
void forward() override;
}; };
namespace { namespace {
......
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#include <cassert>
#include <numeric> // std::accumulate
#include <vector>
#include "aidge/data/Tensor.hpp"
#include "aidge/operator/Producer.hpp"
#include "aidge/utils/Types.h"
#include "aidge/backend/cpu/operator/ProducerImpl.hpp"
Aidge::DimSize_t Aidge::ProducerImpl_cpu::getNbProducedData(
Aidge::IOIndex_t outputIdx) const
{
// Requires the whole tensors, regardless of available data on inputs
assert(outputIdx == 0 && "operator has only one output");
(void) outputIdx;
return std::static_pointer_cast<Tensor>(mOp.getOutput(0))->size();
}
void Aidge::ProducerImpl_cpu::forward()
{
}
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