Skip to content
Snippets Groups Projects
Commit b95fdae5 authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

change Slice attr to int64

parent 42445cbd
No related branches found
No related tags found
2 merge requests!50version 0.2.0,!20Vit operators
...@@ -33,9 +33,9 @@ void SliceImpl_cpu_forward_kernel(const typename Slice_Op::Attrs& attrs, ...@@ -33,9 +33,9 @@ void SliceImpl_cpu_forward_kernel(const typename Slice_Op::Attrs& attrs,
for(std::size_t i=0; i<nbAxes;++i) for(std::size_t i=0; i<nbAxes;++i)
{ {
// For each slice operation get the params and cast them to size_t // For each slice operation get the params and cast them to size_t
int axis_ = std::get<2>(attrs)[i]; std::int32_t axis_ = std::get<2>(attrs)[i];
int start_ = std::get<0>(attrs)[i]; std::int32_t start_ = std::get<0>(attrs)[i];
int end_ = std::get<1>(attrs)[i]; std::int32_t end_ = std::get<1>(attrs)[i];
std::size_t axis = axis_>=0?axis_:axis_+inputDims.size(); std::size_t axis = axis_>=0?axis_:axis_+inputDims.size();
std::size_t start = start_>=0?start_:start_+inputDims[axis]; std::size_t start = start_>=0?start_:start_+inputDims[axis];
std::size_t end = end_>=0?end_:end_+inputDims[axis]; std::size_t end = end_>=0?end_:end_+inputDims[axis];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment