Open haowang5128 opened 7 months ago
@haowang5128 , thank you for pointing out this. Would you like to create a PR for the fix. If so, please also correct sample implementation at: https://github.com/onnx/onnx/blob/9cc907f78e91600ab43bfda125592ec34edda0c4/onnx/backend/test/case/node/scatternd.py#L26. The code does produce correct test data. However, to have extra tuple at the right hand side makes more sense.
Is it on CPU or GPU? This PR addresses one issue on GPU: https://github.com/microsoft/onnxruntime/pull/19540.
Bug Report
Describe the bug
In ScatterND doc , it shows scatternd computation as:
For a 3d indices case like this:
It provides results different from ONNXRuntime.
In the doc's method, indices[idx] gives a numpy array, output[indices[idx]] will not select the correct element. Convert indices[idx] to tuple will fix this.