hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
867 stars 199 forks source link

Error when run "deepcl_unittests.exe" on Win7 x64 #40

Closed aqua7regia closed 8 years ago

aqua7regia commented 8 years ago

error code:-1

C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.

It seems that it can't find my GPU.But other tests can find it. You can see the last part of test log as follows:

[ RUN      ] testsgd.basic
Using NVIDIA Corporation , OpenCL platform: NVIDIA CUDA
Using OpenCL device: GeForce GTX 760
layer 0:InputLayer{ outputPlanes=1 outputSize=5 }
layer 1:ConvolutionalLayer{ LayerDimensions{ inputPlanes=1 inputSize=5 numFilter
s=1 filterSize=3 outputSize=3 padZeros=0 biased=0 skip=0} }
layer 2:SquareLossLayer{}

inputtotalsize=50 outputTotalSize=18
forward try kernel 0
  ... not plausibly optimal, skipping
forward try kernel 1
   ... seems valid
ForwardAuto: kernel 1 0ms
calcGradWeights try kernel 0
  ... not plausibly optimal, skipping
calcGradWeights try kernel 1
   ... seems valid
BackpropWeightsAuto: kernel 1 0ms
[       OK ] testsgd.basic (234 ms)
[----------] 1 test from testsgd (234 ms total)

[----------] 9 tests from testCLMathWrapper
[ RUN      ] testCLMathWrapper.assign
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.assign (0 ms)
[ RUN      ] testCLMathWrapper.assignScalar
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.assignScalar (0 ms)
[ RUN      ] testCLMathWrapper.addinplace
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.addinplace (0 ms)
[ RUN      ] testCLMathWrapper.multiplyinplace
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.multiplyinplace (0 ms)
[ RUN      ] testCLMathWrapper.addscalar
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.addscalar (0 ms)
[ RUN      ] testCLMathWrapper.sqrt
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.sqrt (0 ms)
[ RUN      ] testCLMathWrapper.squared
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.squared (0 ms)
[ RUN      ] testCLMathWrapper.inverse
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.inverse (0 ms)
[ RUN      ] testCLMathWrapper.perelementmult
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testCLMathWrapper.perelementmult (0 ms)
[----------] 9 tests from testCLMathWrapper (15 ms total)

[----------] 1 test from testreducesegments
[ RUN      ] testreducesegments.basic
Using NVIDIA Corporation , OpenCL platform: NVIDIA CUDA
Using OpenCL device: GeForce GTX 760
[       OK ] testreducesegments.basic (94 ms)
[----------] 1 test from testreducesegments (94 ms total)

[----------] 4 tests from testGpuOp
[ RUN      ] testGpuOp.addinplace
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testGpuOp.addinplace (0 ms)
[ RUN      ] testGpuOp.addoutofplace
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testGpuOp.addoutofplace (0 ms)
[ RUN      ] testGpuOp.inverse
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testGpuOp.inverse (0 ms)
[ RUN      ] testGpuOp.addscalarinplace
unknown file: error: C++ exception with description "Error getting OpenCL device
 ids: -1" thrown in the test body.
[  FAILED  ] testGpuOp.addscalarinplace (0 ms)
[----------] 4 tests from testGpuOp (15 ms total)

[----------] 1 test from testjpeghelper
[ RUN      ] testjpeghelper.writeread
[       OK ] testjpeghelper.writeread (0 ms)
[----------] 1 test from testjpeghelper (0 ms total)

[----------] Global test environment tear-down
[==========] 158 tests from 29 test cases ran. (63525 ms total)
[  PASSED  ] 145 tests.
[  FAILED  ] 13 tests, listed below:
[  FAILED  ] testCLMathWrapper.assign
[  FAILED  ] testCLMathWrapper.assignScalar
[  FAILED  ] testCLMathWrapper.addinplace
[  FAILED  ] testCLMathWrapper.multiplyinplace
[  FAILED  ] testCLMathWrapper.addscalar
[  FAILED  ] testCLMathWrapper.sqrt
[  FAILED  ] testCLMathWrapper.squared
[  FAILED  ] testCLMathWrapper.inverse
[  FAILED  ] testCLMathWrapper.perelementmult
[  FAILED  ] testGpuOp.addinplace
[  FAILED  ] testGpuOp.addoutofplace
[  FAILED  ] testGpuOp.inverse
[  FAILED  ] testGpuOp.addscalarinplace

13 FAILED TESTS
  YOU HAVE 2 DISABLED TESTS

E:\dist\bin>
hughperkins commented 8 years ago

Hmmm, I'm going to guess that:

I've pushed some changes in https://github.com/hughperkins/DeepCL/commit/c87dfce77c628549de92e78bdcea6c3ec1899fb9 , which should hopefully address this issue. Can you pull down the latest changes, and retry please?

aqua7regia commented 8 years ago

Thx for your reply. I have pull the latest code, but I can't build the project in VS2010. The error was found in binary zip files. So, would you update those files on http://deepcl.hughperkins.com/Downloads/ please? I'm still searching the reason of build failure in VS2010. Thanks a lot.

hughperkins commented 8 years ago

For the vs2010 build failure, please give me the error you are seeing, or the entire build log (via eg a github gist), or a screenshot of the error you are seeing.

For the built zip file, you can find it for win64 at: http://deepcl.hughperkins.com/Downloads/deepcl-win64-v8.2.0alpha1.zip

aqua7regia commented 8 years ago

I use the new built file to run unit test. Now all tests have passed!

I may mistake some config in cmake. So I re-config and re-generate projects. Now all projects can build successfully in VS2010.

The problem has been solved.

Thanks~

hughperkins commented 8 years ago

Ok, great!