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

Failed in nopython mode pipeline (step: nopython mode backend) Can only insert i64* at [4] in {i8*, i8*, i64, i64, i64*, [1 x i64], [1 x i64]}: got i32* #2

Open
zinwalin opened this issue Nov 29, 2019 · 3 comments

Comments

@zinwalin
Copy link

zinwalin commented Nov 29, 2019

(pytorch) C:\src\snakeplissken-pytorch>python play.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Device: cuda
Traceback (most recent call last):
  File "play.py", line 55, in <module>
    wall = get_walls(width, height)
  File "C:\src\snakeplissken-pytorch\utils\utilities.py", line 116, in get_walls
    + [Wall(width - 10, y, GRAY) for y in np.arange(0, height, 10)]
  File "C:\src\snakeplissken-pytorch\utils\utilities.py", line 113, in <listcomp>
    [Wall(x, 0, GRAY) for x in np.arange(0, width, 10)]
  File "G:\Anaconda3\envs\pytorch\lib\site-packages\numba\jitclass\base.py", line 126, in __call__
    return cls._ctor(*bind.args[1:], **bind.kwargs)
  File "G:\Anaconda3\envs\pytorch\lib\site-packages\numba\dispatcher.py", line 401, in _compile_for_args
    error_rewrite(e, 'typing')
  File "G:\Anaconda3\envs\pytorch\lib\site-packages\numba\dispatcher.py", line 344, in error_rewrite
    reraise(type(e), e, None)
  File "G:\Anaconda3\envs\pytorch\lib\site-packages\numba\six.py", line 668, in reraise
    raise value.with_traceback(tb)
numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Internal error at <numba.typeinfer.CallConstraint object at 0x000001C38C019188>.
Failed in nopython mode pipeline (step: nopython mode backend)
Can only insert i64* at [4] in {i8*, i8*, i64, i64, i64*, [1 x i64], [1 x i64]}: got i32*

File "objects\classes.py", line 43:
    def __init__(self, x, y, color):
        <source elided>
        self.y = y
        self.color = color
        ^

[1] During: lowering "(self).color = color" at C:\src\snakeplissken-pytorch\objects\classes.py (43)
[2] During: resolving callee type: jitclass.Wall#1c383ca42c8<x:int64,y:int64,color:array(int64, 1d, A),position:array(int64, 1d, A)>
[3] During: typing of call at <string> (3)

Enable logging at debug level for details.

File "<string>", line 3:
<source missing, REPL/exec in use?>

This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new

@rdenadai
Copy link
Owner

rdenadai commented Dec 2, 2019

Which version of numba?
Which version of python?

And most important, which file you are running?? play.py, train.py or main.py?

@rdenadai
Copy link
Owner

rdenadai commented Dec 6, 2019

Hey @zinwalin did you were able to run the snake??

@zinwalin
Copy link
Author

zinwalin commented Mar 14, 2022

Hey @zinwalin did you were able to run the snake??

I used Ubuntu 20.04, it's failed to install packages in requirements at the first time, after installed following package, it's able to set up. But PyGame window is not correctly displayed.

sudo apt install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libportmidi-dev libfreetype6-dev

Successfully installed Pillow-9.0.0 llvmlite-0.31.0 numba-0.48.0 numpy-1.21.0 pygame-1.9.6 torch-1.4.0 torchvision-0.5.0

Screenshot from 2022-03-14 21-53-56

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