const auto bias_index{node.getInputs().at(Conv2DNode::Input::BIAS)};
const auto stride = node.param().stride;
- const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
- const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
+ const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(_current_subg_layout);
+ const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(_current_subg_layout);
// Kernel format is [depth_out, kernel_height, kernel_width, depth_in].
const auto &ker_shape = _ctx.at(ker_index).shape();
const auto ker_height = ker_shape.dim(1);
stride, ker_width, ker_height);
const auto activation = node.param().activation;
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index));
- const auto ker_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ker_index));
- const auto bias_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index), _current_subg_layout);
+ const auto ker_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ker_index), model::Layout::UNKNOWN);
+ const auto bias_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index), model::Layout::UNKNOWN);
auto ofm_alloc = _tensor_builder->at(ofm_index);
auto ifm_alloc = _tensor_builder->at(ifm_index);
const auto bias_index{node.getInputs().at(DepthwiseConv2DNode::Input::BIAS)};
const auto stride = node.param().stride;
- const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
- const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
+ const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(_current_subg_layout);
+ const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(_current_subg_layout);
// Kernel format is [1, kernel_height, kernel_width, depth_out].
const auto &ker_shape = _ctx.at(ker_index).shape();
const auto ker_height = ker_shape.dim(1);
const auto padding = neurun::util::calculatePadding(node.param().padding, ifm_shape, ofm_shape,
stride, ker_width, ker_height);
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index));
- const auto ker_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ker_index));
- const auto bias_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index), _current_subg_layout);
+ const auto ker_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ker_index), model::Layout::UNKNOWN);
+ const auto bias_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index), model::Layout::UNKNOWN);
const auto multiplier = node.param().multiplier;
const auto activation = node.param().activation;
const auto kw = node.param().kw;
const auto stride = node.param().stride;
- const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
- const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
+ const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(_current_subg_layout);
+ const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(_current_subg_layout);
const auto padding =
neurun::util::calculatePadding(node.param().padding, ifm_shape, ofm_shape, stride, kw, kh);
const auto activation = node.param().activation;
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index), _current_subg_layout);
auto ofm_alloc = _tensor_builder->at(ofm_index).get();
auto ifm_alloc = _tensor_builder->at(ifm_index).get();
const auto kh = node.param().kh;
const auto kw = node.param().kw;
const auto stride = node.param().stride;
- const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
- const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
+ const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(_current_subg_layout);
+ const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(_current_subg_layout);
const auto padding =
neurun::util::calculatePadding(node.param().padding, ifm_shape, ofm_shape, stride, kw, kh);
const auto activation = node.param().activation;
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ifm_index), _current_subg_layout);
auto ofm_alloc = _tensor_builder->at(ofm_index).get();
auto ifm_alloc = _tensor_builder->at(ifm_index).get();
const auto axis = node.param().axis;
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
std::vector<::neurun::backend::cpu::kernel::Shape> ifm_backend_shapes;
for (auto &in_idx : node.getInputs())
- ifm_backend_shapes.emplace_back(::neurun::backend::cpu::kernel::getShape(_ctx.at(in_idx)));
+ ifm_backend_shapes.emplace_back(
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(in_idx), _current_subg_layout));
auto output_alloc = _tensor_builder->at(ofm_index).get();
const auto weight_index{node.getInputs().at(FullyConnectedNode::Input::WEIGHT)};
const auto bias_index{node.getInputs().at(FullyConnectedNode::Input::BIAS)};
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index));
- const auto weight_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(weight_index));
- const auto bias_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index), _current_subg_layout);
+ const auto weight_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(weight_index), model::Layout::UNKNOWN);
+ const auto bias_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(bias_index), model::Layout::UNKNOWN);
const auto activation = node.param().activation;
const auto output_index{node.getOutputs().at(0)};
const auto input_index{node.getInputs().at(model::operation::ReshapeNode::Input::INPUT)};
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index), _current_subg_layout);
auto output_alloc = _tensor_builder->at(output_index).get();
auto input_alloc = _tensor_builder->at(input_index).get();
const auto output_index{node.getOutputs().at(0)};
const auto input_index{node.getInputs().at(model::operation::SoftmaxNode::Input::INPUT)};
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index));
- const auto ifm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(output_index), _current_subg_layout);
+ const auto ifm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(input_index), _current_subg_layout);
const auto beta = node.param().beta;
const auto lhs_index{node.getInputs().at(model::operation::AddNode::Input::LHS)};
const auto rhs_index{node.getInputs().at(model::operation::AddNode::Input::RHS)};
- const auto ofm_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index));
- const auto lhs_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(lhs_index));
- const auto rhs_backend_shape = ::neurun::backend::cpu::kernel::getShape(_ctx.at(rhs_index));
+ const auto ofm_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(ofm_index), _current_subg_layout);
+ const auto lhs_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(lhs_index), _current_subg_layout);
+ const auto rhs_backend_shape =
+ ::neurun::backend::cpu::kernel::getShape(_ctx.at(rhs_index), _current_subg_layout);
const auto activation = node.param().activation;