• L
    [cherry-pick 2.0] Fix bug: In dynamic mode, if start or end is negetive,... · 5fe3da39
    liym27 提交于
    [cherry-pick 2.0] Fix bug: In dynamic mode, if start or end is negetive, __getitem__  return wrong result(#30003) (#30146)
    
    1. when slice_item is a slice:
     1) the start of __getitem__ should be std::max(start, 0) if slice
     2) the start of __getitem__ should be std::min(end, dim)
    2. when slice_item is an integer, it should be in [-dim_len, dim_len)
    3. Fix error message to use accurate data
    5fe3da39
imperative.cc 56.7 KB