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

CUDA fails after installation #475

Open
sergei-sh opened this issue Jun 20, 2017 · 1 comment
Open

CUDA fails after installation #475

sergei-sh opened this issue Jun 20, 2017 · 1 comment

Comments

@sergei-sh
Copy link

sergei-sh commented Jun 20, 2017

Installed torch, cuda, cunn.

test.py

import lutorpy as lua
lua.require('cunn')

Output:

THCudaCheck FAIL file=/home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c line=66 error=30 : unknown error
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    lua.require('cunn')
  File "/home/serj/work/beautytorch/venv/local/lib/python2.7/site-packages/lutorpy/__init__.py", line 112, in require
    ret = luaRuntime.require(module_name)
  File "lutorpy/_lupa.pyx", line 318, in lutorpy._lupa.LuaRuntime.require (lutorpy/_lupa.c:6189)
  File "lutorpy/_lupa.pyx", line 1658, in lutorpy._lupa.call_lua (lutorpy/_lupa.c:25877)
  File "lutorpy/_lupa.pyx", line 1667, in lutorpy._lupa.execute_lua_call (lutorpy/_lupa.c:25987)
  File "lutorpy/_lupa.pyx", line 1620, in lutorpy._lupa.raise_lua_error (lutorpy/_lupa.c:25297)
lutorpy._lupa.LuaError: cuda runtime error (30) : unknown error at /home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c:66

Tests fail the same way:

(venv) serj@venus ~/work/beautytorch/beauty.torch $ luajit -l cunn -e 'cunn.test()'
THCudaCheck FAIL file=/home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c line=66 error=30 : unknown error
luajit: cuda runtime error (30) : unknown error at /home/serj/torch/extra/cutorch/lib/THC/THCGeneral.c:66
stack traceback:
	[C]: at 0x7f73b2cd5b00
	[C]: in function 'require'
	/home/serj/torch/install/share/lua/5.1/cutorch/init.lua:2: in main chunk
	[C]: in function 'require'
	/home/serj/torch/install/share/lua/5.1/cunn/init.lua:3: in main chunk
	[C]: at 0x0046b7a0
	[C]: at 0x00406670

Related code:

{
  if (!state->cudaDeviceAllocator) {
    state->cudaDeviceAllocator = &defaultDeviceAllocator;
  }
  if (!state->cudaHostAllocator) {
    state->cudaHostAllocator = &THCudaHostAllocator;
  }
  if (!state->cudaUVAAllocator) {
    state->cudaUVAAllocator = &THCUVAAllocator;
  }

  int numDevices = 0;
  THCudaCheck(cudaGetDeviceCount(&numDevices)); // FAILS HERE!!!

Maybe the problem relates to the fact that my GPU is not NVidia, but lua.require("cunn") is needed as a part of 3-rd party project which I'm trying to use

@tastyminerals
Copy link

tastyminerals commented Oct 6, 2017

You should have Nvidia GPU if you work with any deep learning framework these days. Yes, you must have Nvidia GPU to run torch on GPU.
Consider closing the issue please.

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