question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: Fix np.einsum errors on Power9 Linux and z/Linux.

See original GitHub issue

An array index fails on Power9 Linux and z/Linux.

PR follows this issue, but not sure that x86 will be happy with the proposed fix

Reproducing code example:

(qdev_venv) [linux1@jwoehr1 Qiskit]$ python
Python 3.6.8 (default, Jun 11 2019, 14:52:20) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> tensor = np.random.rand(10, 10, 10, 10)
>>> np.einsum('ijij->', tensor)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<__array_function__ internals>", line 6, in einsum
  File "/home/linux1/work/Qiskit/qdev_venv/lib64/python3.6/site-packages/numpy/core/einsumfunc.py", line 1356, in einsum
    return c_einsum(*operands, **kwargs)
ValueError: dimensions in operand 0 for collapsing index 'þ' don't match (-1419377904 != 10)
>>> 

Error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<__array_function__ internals>", line 6, in einsum
  File "/home/linux1/work/Qiskit/qdev_venv/lib64/python3.6/site-packages/numpy/core/einsumfunc.py", line 1356, in einsum
    return c_einsum(*operands, **kwargs)
ValueError: dimensions in operand 0 for collapsing index 'þ' don't match (-1419377904 != 10)

Numpy/Python version information:

1.17.2 3.6.8 (default, Jun 11 2019, 14:52:20) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (25 by maintainers)

github_iconTop GitHub Comments

1reaction
charriscommented, Oct 19, 2019

I know that it would run on machines with unsigned characters after we fixed things before, so possibly this problem is fairly newly introduced. See original at #2398. I suspect #11095 might be related and it looks like @mattip has been looking in some of the same places.

1reaction
jwoehrcommented, Oct 14, 2019

Thank you for promising suggestion. I will work on it tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EEH errors on IBM POWER9 systems that are enabled with ...
Abstract. On IBM POWER9 systems that are enabled with Virtual Persistent Memory, Enhanced Error Handling (EEH) errors might be observed. Content.
Read more >
Bug in tf.einsum - Returns different values from np ... - GitHub
EDIT: The same type of error persists but with slightly different parameters. I am now certain that this is a Tensorflow issue.
Read more >
onnx-mlir - GithubHelp
ONNX-MLIR runs natively on Linux, OSX, and Windows. ... What can i do to fix the infer shape warnings and the key error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found