Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReduceSum node not implemented #1657

Closed
tanguycdls opened this issue Aug 20, 2019 · 2 comments
Closed

ReduceSum node not implemented #1657

tanguycdls opened this issue Aug 20, 2019 · 2 comments

Comments

@tanguycdls
Copy link

Describe the bug
To create a test to check an inference wrapper around OnnxRuntime I created a really simple model adding the inputs and expanding dims as so:

class model(nn.Module):
    def __init__(self):
        super().__init__()
    def forward(self, x):
        return x.sum(dim=1).reshape(-1, 1).expand(-1, 10)

System information

  • Linux Debian
  • binary pip
  • 0.5 and tested on 0.4
  • 3.7 and tested 3.6
  • Visual Studio version na
  • GCC/Compiler version na
  • CUDA/cuDNN version: na
  • GPU model and memory: na

To Reproduce
Export the model from Pytorch using

from torch import onnx
a = model()
onnx.export(a, torch.from_numpy(np.array([1, 2, 3, 4])), 'model.onnx')
b = InferenceSession('model.onnx')

Expected behavior
We should be able to load since ReduceSum is implemented in the list of operators.
'''
RuntimeError: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for the node ReduceSum(1)
'''

@faxu
Copy link
Contributor

faxu commented Aug 20, 2019

See this page for the list of supported ops and types: https://github.com/microsoft/onnxruntime/blob/master/docs/OperatorKernels.md

What is the datatype for the ReduceSum op in your model? Current support types in ORT are:
T = tensor(int32), tensor(float), tensor(double)

@tanguycdls
Copy link
Author

Hi thanks for the answer !
it's indeed int64 type (Long in Pytorch) I checked and its compatible with ONNX itself (int64). Maybe it would worth having a more verbose explanation when getting ReduceSum not implemented and adds the dtype for which it's not implemented ?

Thanks for the help,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants