pointnet2
pointnet2 copied to clipboard
No OpKernel issue on FarthestPointSample
Hi Charlers, When I tried to run your train.py code, I got some error. It seems FarthestPointSample is running on CPU not GPU, but I did not change anything about your codes. I am wondering if you have any suggestion about it? I looked at the cuda code, but I can not find any issue (I am pretty new about CUDA). I listed the error below.
Thank you.
Traceback (most recent call last):
File "train.py", line 284, in
[[Node: layer1/FarthestPointSample = FarthestPointSample[npoint=512, _device="/device:GPU:0"](Placeholder)]]
Caused by op u'layer1/FarthestPointSample', defined at:
File "train.py", line 284, in
InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'FarthestPointSample' with these attrs. Registered devices: [CPU], Registered kernels: device='GPU'
[[Node: layer1/FarthestPointSample = FarthestPointSample[npoint=512, _device="/device:GPU:0"](Placeholder)]]
I think the main reason for this error is that you are using a tensorflow-cpu installation. Reinstall using tensorflow-gpu instead
@Kaiwind88 Have you solved the problem? i have encountered the same problem
I'm using a tenserflow-gpu installation but I'm still getting the same error.
This is actually a GPU problem. Run the tensorflow GPU test to make sure the test is passed. https://www.tensorflow.org/programmers_guide/using_gpu
@kingsvalley Yes, I just found the solution as mentioned by @merium and @KamalM8 . I have tensorflow-cpu installed by chance, so the code does not recognize GPU. I install the gpu version, and it works.
conda install tensorflow-gpu
Check whether tensorflow is able to access gpu via these command in command line
import tensorflow as tf
tf.test.tf.is_gpu_available()
You should get True
then check
tf.test.is_built_with_cuda()
here also you should get True
If you get False than you will have to install tensorflow-gpu
pip install tensorflow-gpu==XXXX
XXXX is the version in case you need to install any specific version
Hi, You should do the following is checks:
-
cuda
version was used during compilingtensorflow-gpu
. This link tells you thecuda
version of pre-builttensorflow-gpu
which you may get throughpip
. -
cuda
version you actually have in your system, which is normally at/usr/local/
If the twocuda
versions are not the same. You are in bad luck, and it causes the error you see, which means that you install the righttensorflow
with gpu support but the actual driver is not the right one to run.
Cheers.
If you have a single GPU, just set os.environ['CUDA_VISIBLE_DEVICES'] in main.py file to str(0)
os.environ['CUDA_VISIBLE_DEVICES'] = str(0)
and make sure you have tensorflow-gpu installed.