for (uint32_t r = 0; r < rank(); ++r)
{
if (dim(r).known())
- shape.dim(r) = loco::make_dimension(dim(r).value());
+ shape.dim(r) = dim(r).value();
else
shape.dim(r).unset();
}
for (uint32_t r = 0; r < shape.rank(); ++r)
{
if (shape.dim(r).known())
- dim(r) = loco::make_dimension(shape.dim(r).value());
+ dim(r) = shape.dim(r).value();
else
dim(r).unset();
}
loco::Pull *pull = input->node();
ASSERT_EQ(pull->dtype(), loco::DataType::FLOAT32);
ASSERT_EQ(pull->rank(), 4);
- loco::Dimension dim1 = loco::make_dimension(1);
- loco::Dimension dim2 = loco::make_dimension(2);
+ loco::Dimension dim1 = 1;
+ loco::Dimension dim2 = 2;
ASSERT_EQ(pull->dim(0).value(), dim1.value());
ASSERT_EQ(pull->dim(1).value(), dim2.value());
ASSERT_EQ(pull->dim(2).value(), dim1.value());
zero_sized_shape = true;
if (d.size() >= 0)
- const_node->dim(index++) = loco::make_dimension(d.size());
+ const_node->dim(index++) = d.size();
else
throw std::runtime_error{"Error: Unknown dim size for " + node.name()};
}
if (dim_value >= 0ULL)
{
uint32_t dim_value32 = static_cast<uint32_t>(dim_value);
- pull_node->dim(d) = loco::make_dimension(dim_value32);
+ pull_node->dim(d) = dim_value32;
}
else
{
throw std::runtime_error("Shape that user entered is different from shape in Placeholder");
// set shape of pull
- pull_node->dim(d) = loco::make_dimension(arg_dim);
+ pull_node->dim(d) = arg_dim;
}
}
loco::Pull *pull = input->node();
ASSERT_EQ(pull->dtype(), loco::DataType::FLOAT32);
ASSERT_EQ(pull->rank(), 2);
- loco::Dimension dim2 = loco::make_dimension(2);
- loco::Dimension dim3 = loco::make_dimension(3);
+ loco::Dimension dim2 = 2;
+ loco::Dimension dim3 = 3;
ASSERT_EQ(pull->dim(0).value(), dim2.value());
ASSERT_EQ(pull->dim(1).value(), dim3.value());
loco::Pull *pull = input->node();
ASSERT_EQ(pull->dtype(), loco::DataType::FLOAT32);
ASSERT_EQ(pull->rank(), 2);
- loco::Dimension dim2 = loco::make_dimension(2);
- loco::Dimension dim3 = loco::make_dimension(3);
+ loco::Dimension dim2 = 2;
+ loco::Dimension dim3 = 3;
ASSERT_EQ(pull->dim(0).value(), dim2.value());
ASSERT_EQ(pull->dim(1).value(), dim3.value());
for (uint32_t index = 0; index < rank; ++index)
{
if (src->dim(index).known())
- dst->dim(index) = loco::make_dimension(src->dim(index).value());
+ dst->dim(index) = src->dim(index).value();
else
dst->dim(index).unset();
}
uint32_t new_dim = (index == axis_loco) ? lhs_dim + rhs_dim : lhs_dim;
if (lhs_shapedata->dim(index).known())
- shape_data->dim(index) = loco::make_dimension(new_dim);
+ shape_data->dim(index) = new_dim;
else
shape_data->dim(index).unset();
}
for (uint32_t index = 0; index < rank; ++index)
{
if (src->dim(index).known())
- dst->dim(index) = loco::make_dimension(src->dim(index).value());
+ dst->dim(index) = src->dim(index).value();
else
dst->dim(index).unset();
}