Skip to content

Commit

Permalink
Fix stride issue for ZeroDims
Browse files Browse the repository at this point in the history
  • Loading branch information
riverlijunjie committed Oct 25, 2023
1 parent dc4240b commit bbd48ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inference/src/dev/make_tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ViewTensor : public ITensor {
auto& shape = get_shape();
if (m_strides.empty() && !shape.empty()) {
m_strides.resize(shape.size());
m_strides.back() = m_element_type.size();
m_strides.back() = shape.back() == 0 ? 0 : m_element_type.size();
std::transform(shape.crbegin(),
shape.crend() - 1,
m_strides.rbegin(),
Expand Down

0 comments on commit bbd48ca

Please sign in to comment.