"src/eliminate_common_subexpression.cpp" did not exist on "53fd3f748473f1449d2f2ee8edd4dbf12936ffe2"
Commit 86b49567 authored by Paul's avatar Paul
Browse files

Fix div by zero

parent 124ed38d
......@@ -20,6 +20,10 @@ static std::vector<std::size_t> vector_sizes(const std::vector<shape>& inputs)
vectorize vectorize::elements(std::size_t axis, const std::vector<shape>& inputs)
{
if (std::all_of(inputs.begin(), inputs.end(), [&](const auto& s) {
return s.lens()[axis] == 1;
}))
return {1, axis};
auto sizes = vector_sizes(inputs);
std::vector<std::size_t> max_vec_size;
std::transform(inputs.begin(),
......
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