Commit f13257e4 authored by Robert Kimball's avatar Robert Kimball

add comments and new methods if you only want to createe non-pipelined tensors

parent 9b3846f4
......@@ -124,14 +124,24 @@ void runtime::Executable::save(std::ostream& output_stream)
throw runtime_error("save opertion unimplemented.");
}
vector<shared_ptr<runtime::Tensor>> runtime::Executable::create_input_tensor(size_t input_number,
shared_ptr<runtime::Tensor> runtime::Executable::create_input_tensor(size_t input_index)
{
throw runtime_error("create_input_tensor unimplemented");
}
shared_ptr<runtime::Tensor> runtime::Executable::create_output_tensor(size_t output_index)
{
throw runtime_error("create_output_tensor unimplemented");
}
vector<shared_ptr<runtime::Tensor>> runtime::Executable::create_input_tensor(size_t input_index,
size_t pipeline_depth)
{
throw runtime_error("create_input_tensor unimplemented");
}
vector<shared_ptr<runtime::Tensor>> runtime::Executable::create_output_tensor(size_t input_number,
vector<shared_ptr<runtime::Tensor>> runtime::Executable::create_output_tensor(size_t output_index,
size_t pipeline_depth)
{
throw runtime_error("create_input_tensor unimplemented");
throw runtime_error("create_output_tensor unimplemented");
}
......@@ -73,10 +73,35 @@ public:
/// Saved stream may be read with Backend::load
virtual void save(std::ostream& output_stream);
virtual std::vector<std::shared_ptr<runtime::Tensor>> create_input_tensor(size_t input_number,
size_t pipeline_depth = 1);
virtual std::vector<std::shared_ptr<runtime::Tensor>> create_output_tensor(size_t input_number,
size_t pipeline_depth = 1);
/// \brief Create an input Tensor
/// \param input_index The index position in the input Parameter vector. This would be the same
/// order of Parameters passed into the inputs in the call() method.
/// \returns A Tensor
virtual std::shared_ptr<runtime::Tensor> create_input_tensor(size_t input_index);
/// \brief Create an output Tensor
/// \param output_index The index position in the output Result vector. This would be the same
/// order of Results passed into the outputs in the call() method.
/// \returns A Tensor
virtual std::shared_ptr<runtime::Tensor> create_output_tensor(size_t output_index);
/// \brief Create a vector of input Tensors
/// \param input_index The index position in the input Parameter vector. This would be the same
/// order of Parameters passed into the inputs in the call() method.
/// \param pipeline_depth The number of stages in the input pipeline. For double-buffered input
/// you would specify pipeline_depth=2
/// \returns A vector of Tensors, one for each stage of the pipeline
virtual std::vector<std::shared_ptr<runtime::Tensor>> create_input_tensor(size_t input_index,
size_t pipeline_depth);
/// \brief Create a vector of output Tensors
/// \param output_index The index position in the output Result vector. This would be the same
/// order of Results passed into the outputs in the call() method.
/// \param pipeline_depth The number of stages in the output pipeline. For double-buffered output
/// you would specify pipeline_depth=2
/// \returns A vector of Tensors, one for each stage of the pipeline
virtual std::vector<std::shared_ptr<runtime::Tensor>> create_output_tensor(size_t output_index,
size_t pipeline_depth);
protected:
/// \brief Called at the end of compile to the values to be returned by get_parameters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment