You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unclear if the unreachable code is needed for correct behavior. Reference
It seems to be sorting by index to meet this statement (present since v1): Given two equivalent values, this operator uses the indices along the axis as a tiebreaker. That is, the element with the lower index will appear first.
But, the same spec says that unsorted order is undefined (new in v11): If “sorted” is 0, order of returned ‘Values’ and ‘Indices’ are undefined.
Describe the issue
The following code is unreachable:
https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/cuda/math/topk_impl.cuh#L463
due to this previous (0 == sorted) code path:
} else if (K <= BT * 16 || 0 == sorted) {
https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/providers/cuda/math/topk_impl.cuh#L416
To reproduce
code inspection
Urgency
Unclear if the unreachable code is needed for correct behavior. Reference
It seems to be sorting by index to meet this statement (present since v1):
Given two equivalent values, this operator uses the indices along the axis as a tiebreaker. That is, the element with the lower index will appear first.
But, the same spec says that unsorted order is undefined (new in v11):
If “sorted” is 0, order of returned ‘Values’ and ‘Indices’ are undefined.
Platform
Linux
OS Version
Ubuntu 22.04
ONNX Runtime Installation
Built from Source
ONNX Runtime Version or Commit ID
15cb2f5
ONNX Runtime API
C++
Architecture
X64
Execution Provider
CUDA
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: