//
KernelGenerator::KernelGenerator(const neurun::model::Operands &ctx,
const std::shared_ptr<TensorBuilder> &tensor_builder)
- : _ctx(ctx), _tensor_builder(tensor_builder)
+ : _ctx(ctx), _tensor_builder(tensor_builder), _current_subg_layout(model::Layout::UNKNOWN)
{
// DO NOTHING
}
//
KernelGenerator::KernelGenerator(const neurun::model::Operands &ctx,
const std::shared_ptr<TensorBuilder> &tensor_builder)
- : _ctx(ctx), _tensor_builder(tensor_builder)
+ : _ctx(ctx), _tensor_builder(tensor_builder), _current_subg_layout(model::Layout::UNKNOWN)
{
// DO NOTHING
}
KernelGenerator::KernelGenerator(const neurun::model::Operands &operand_ctx,
const std::shared_ptr<TensorBuilder> &tensor_builder,
const std::shared_ptr<custom::KernelRegistry> &kernel_registry)
- : _ctx(operand_ctx), _tensor_builder(tensor_builder), _kernel_registry(kernel_registry)
+ : _ctx(operand_ctx), _tensor_builder(tensor_builder), _kernel_registry(kernel_registry),
+ _current_subg_layout(model::Layout::UNKNOWN)
{
// DO NOTHING
}
}
private:
- std::shared_ptr<::neurun::backend::operand::IObject> _input;
- std::shared_ptr<::neurun::backend::operand::IObject> _output;
- model::Shape _output_shape;
+ std::shared_ptr<::neurun::backend::operand::IObject> _input{nullptr};
+ std::shared_ptr<::neurun::backend::operand::IObject> _output{nullptr};
+ model::Shape _output_shape{};
model::operation::PermuteNode::Type _type{model::operation::PermuteNode::Type::COPY};
- model::DataType _dataType;
+ model::DataType _dataType{model::DataType::FLOAT32};
};
} // namespace kernel
bool operator!=(const PermuteFactor &other) const { return !(*this == other); }
private:
- const backend::Backend *_backend;
- model::Layout _layout;
+ const backend::Backend *_backend{nullptr};
+ model::Layout _layout{model::Layout::UNKNOWN};
};
} // namespace operand
class OperationValidator : public model::OperationVisitor
{
public:
- OperationValidator(const neurun::model::Operands &ctx) : _ctx{ctx} {}
+ OperationValidator(const neurun::model::Operands &ctx)
+ : _ctx{ctx}, _current_subg_layout{model::Layout::UNKNOWN}
+ {
+ }
public:
void visit(const model::Subgraph &node) override;