Closed NKUCodingCat closed 8 years ago
I don't know if this works for the unit test but for the others this should do it
gpuindex=X
where X is the card index you want to use
https://github.com/hughperkins/DeepCL/blob/master/doc/Commandline.md
@merceyz It is useless for unittest.....I am going to try it on trainning MNIST. By the way, how can I use this feature in Python?
Anyway, thank you very much
I honestly got no clue. You'll have to wait for @hughperkins
For deepcl_unittests
, addressed in 8acd97d What platform are you on? Do you need a binary release build?
For python, see python/examples/choose_gpu.py
Output on my machine:
(env3) ubuntu@peach:~/git/DeepCL/python$ python examples/choose_gpu.py
major_version 3
major vresion 3
Using NVIDIA Corporation , OpenCL platform: NVIDIA CUDA
Using OpenCL device: GeForce 940M
initializing clblas
Using Intel , OpenCL platform: Intel Gen OCL Driver
Using OpenCL device: Intel(R) HD Graphics 5500 BroadWell U-Processor GT2
initializing clblas
clblas teardown
clblas teardown
(note to self: fix that weird mis-spelled major version message...)
(weird mis-spelled major version message removed in ea5fd2d )
(Updated Windows binaries here http://deepcl.hughperkins.com/Downloads/ v8.5.1)
(and also some python packages are in the process of building into https://pypi.python.org/pypi/DeepCL/8.5.1 )
>>> import PyDeepCL
major_version 2
major vresion 2
>>> PyDeepCL.DeepCL()
Using Intel(R) Corporation , OpenCL platform: Intel(R) OpenCL
Using OpenCL device: Intel(R) HD Graphics 4400
initializing clblas
<PyDeepCL.DeepCL object at 0x02E950D0>
>>> PyDeepCL.DeepCL(gpuindex=1)
Using Advanced Micro Devices, Inc. , OpenCL platform: AMD Accelerated Parallel Processing
Using OpenCL device: Capeverde
initializing clblas
clblas teardown
<PyDeepCL.DeepCL object at 0x02E950E0>
It works! Thank you very much for your help.
But what does clblas teardown
mean?
That's when it's done, it free's all resources
Right, I should probalby remove that.
(Removed in ebf2792 )
Well, one more odd behavior is when I call a gpu which does not exist, Python.exe will crash immediately. Seriously it's reasonable, but not friendly.
>>> import PyDeepCL
major_version 2
major vresion 2
>>> PyDeepCL.DeepCL(gpuindex=0)
Using Advanced Micro Devices, Inc. , OpenCL platform: AMD Accelerated Parallel Processing
Using OpenCL device: Devastator
<PyDeepCL.DeepCL object at 0x036690D0>
>>> PyDeepCL.DeepCL(gpuindex=65536)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
And jump a Dialog said "Python has Stopped, Windows is seraching for solution......"
(there should have an screenshot but nothing, thanks for The GFW)
Addressed in 6833b52 , hopefully, it is currently building as v8.5.2
I have a laptop have both Intel HD4400 and AMD R9 M270X graphic card, When I run deepcl_unittests, it told me that it is running on Intel HD4400, so is it possible to use R9 M270X for it?
Meanwhile, sorry for my poor English :)