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

No GPU devices error on AMD ATI 7600M series #59

Open
kkarnatak opened this issue Mar 4, 2017 · 8 comments
Open

No GPU devices error on AMD ATI 7600M series #59

kkarnatak opened this issue Mar 4, 2017 · 8 comments

Comments

@kkarnatak
Copy link

Hi,

I installed OpenCL on AMD ATI Radeon HD 7600M series. As far as I know my GPU is configured and installed correctly. But, I am getting "No GPU devices error" while running make runtest.

~/OpenCL-caffe$ clinfo | grep CPU
  Device Type:					 CL_DEVICE_TYPE_CPU
~/OpenCL-caffe$ clinfo | grep GPU // No output

However, glxinfo displays the AMD GPU.

~/OpenCL-caffe$ glxinfo  | grep OpenGL
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7600M Series
OpenGL core profile version string: 4.3.13416 Core Profile Context 15.201.1151

ERROR:


~/OpenCL-caffe$ make runtest
[100%] Built target proto
[100%] Built target caffe
[100%] Built target gtest
[100%] Built target test.testbin
Current device id: 0
F0304 18:49:09.351958  1995 device.cpp:75] Err: No GPU devices
*** Check failure stack trace: ***
    @     0x2b783ee9cdaa  (unknown)
    @     0x2b783ee9cce4  (unknown)
    @     0x2b783ee9c6e6  (unknown)
    @     0x2b783ee9f687  (unknown)
    @     0x2b783e8322a4  caffe::Device::Init()
    @           0x6f4468  main
    @     0x2b7840bb5f45  (unknown)
    @           0x6f7d02  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)
@naibaf7
Copy link

naibaf7 commented Mar 4, 2017

@kkarnatak
Copy link
Author

Thanks. however, I have a question. I cannot see any flag in the makefile.config to enable/disable opencl. How can I configure it?

@naibaf7
Copy link

naibaf7 commented Mar 5, 2017

It is enabled by default (USE_GREENTEA := 1) and CUDA should be disabled by default. This is the excert from Makefile.config.example that you can copy to your own Makefile.config, just like normal Caffe:

# Enable the CUDA backend
# USE_CUDA := 1
# Enable the OpenCL/Greentea backend
USE_GREENTEA := 1

It's a bit of an inside joke, since Caffe is the "CUDA Caffe" and Greentea (the refreshing alternative beverage to it) is the "OpenCL Caffe" ;)

@kkarnatak
Copy link
Author

kkarnatak commented Mar 5, 2017

I compiled it without changing anything in the example Makefile.config. Just commented out the CUDA lines. My compilation and runtest were successful ( although I am not sure if its considering opencl and my gpu). I didnt even enable the CPU mode. The CPU line is commented.

Now, when I run the example training script, I get following error:

$ examples/cifar10/train_quick.sh 
I0305 03:02:22.887403 28627 caffe.cpp:218] Using GPUs 0
F0305 03:02:22.887708 28627 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.
*** Check failure stack trace: ***
    @     0x7f765e621daa  (unknown)
    @     0x7f765e621ce4  (unknown)
    @     0x7f765e6216e6  (unknown)
    @     0x7f765e624687  (unknown)
    @     0x7f765ec4f800  caffe::Caffe::SetDevice()
    @           0x40a7fe  train()
    @           0x40818c  main
    @     0x7f765d610f45  (unknown)
    @           0x4089fb  (unknown)
    @              (nil)  (unknown)

@naibaf7
Copy link

naibaf7 commented Mar 5, 2017

Hm that should not happen, and you shouldn't have to change anything in the Makefile.config...
the NO_GPU error is usually occuring if you try to use a GPU but you compiled Caffe with CPU_ONLY uncommented in the Makefile.config. So check that and rebuild using make clean; make all -j4

@kkarnatak
Copy link
Author

Sorry, my bad. I didnt clone from the right branch and didnt used the correct code/Makefile.config. I wasnt expecting such a late night reply and thus didnt even read your comment before posting my previous post :D
I will try now with new file and repost thanks!

@kkarnatak
Copy link
Author

kkarnatak commented Mar 5, 2017

I tried again and now I am not getting any of the errors I mentioned before. However, I am getting another error. The code is trying to look for a file "solver_data_list.txt.gen.cmake" which isnt generated. I believe somehow the file isnt created or so.

 22  protected:
 23   HDF5DataLayerTest()
 24       : filename(NULL),
 33     // Check out generate_sample_data.py in the same directory.
 34     filename = new string(
 35     CMAKE_SOURCE_DIR "caffe/test/test_data/sample_data_list.txt" CMAKE_EXT);
 36     LOG(INFO)<< "Using sample HDF5 data file " << filename;
 37   }
 AdaDeltaSolverTest/3.TestAdaDeltaLeastSquaresUpdate
F0305 04:16:52.231627  8628 hdf5_data_layer.cpp:89] Failed to open source file: /home/kartikeya/Caffe/caffe/src/caffe/test/test_data/solver_data_list.txt.gen.cmake
*** Check failure stack trace: ***
    @     0x2af6faff3daa  (unknown)
    @     0x2af6faff3ce4  (unknown)
    @     0x2af6faff36e6  (unknown)
    @     0x2af6faff6687  (unknown)
    @     0x2af6fa209b66  caffe::HDF5DataLayer<>::LayerSetUp()
    @     0x2af6fa303ac3  caffe::Net<>::Init()
    @     0x2af6fa305699  caffe::Net<>::Net()
    @     0x2af6fa2d84c7  caffe::Solver<>::InitTrainNet()
    @     0x2af6fa2d89f7  caffe::Solver<>::Init()
    @     0x2af6fa2d8cbb  caffe::Solver<>::Solver()
    @           0x948572  caffe::AdaDeltaSolverTest<>::InitSolver()
    @           0x946e43  caffe::GradientBasedSolverTest<>::InitSolverFromProtoString()
    @           0x90270d  caffe::GradientBasedSolverTest<>::RunLeastSquaresSolver()
    @           0x905d19  caffe::GradientBasedSolverTest<>::TestLeastSquaresUpdate()
    @           0xda2d83  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0xd99437  testing::Test::Run()
    @           0xd994de  testing::TestInfo::Run()
    @           0xd995e5  testing::TestCase::Run()
    @           0xd9a458  testing::internal::UnitTestImpl::RunAllTests()
    @           0xd9a707  testing::UnitTest::Run()
    @           0x8caf35  main
    @     0x2af6fd136f45  (unknown)
    @           0x8ce792  (unknown)
    @              (nil)  (unknown)

@kkarnatak
Copy link
Author

I manually renamed the file sample_data_list.txt to the expected name ( with cmake ext) and it passed through. The overall test perf:

----------] Global test environment tear-down
[==========] 2062 tests from 274 test cases ran. (1441081 ms total)
[ PASSED ] 2060 tests.
[ FAILED ] 2 tests, listed below:
[ FAILED ] NetTest/0.TestSharedWeightsUpdate, where TypeParam = caffe::CPUDevice
[ FAILED ] NetTest/2.TestSharedWeightsUpdate, where TypeParam = caffe::GPUDevice

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