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

Update to CUDA-10 #27

Open
tokotchd opened this issue Apr 16, 2019 · 1 comment
Open

Update to CUDA-10 #27

tokotchd opened this issue Apr 16, 2019 · 1 comment

Comments

@tokotchd
Copy link

tokotchd commented Apr 16, 2019

Library no longer functions when upgraded to CUDA-10, Tensorflow 1.13.

Exact error: once upgraded, tests fail with

self.assertEqual(y.get_shape().ndims, 4)
AssertionError: None != 4

It seems that the output tensor always has shape [unknown].

New makefile for Cuda10

TF_INC = $(shell python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_CFLAGS = $(shell python3 -c "import tensorflow as tf; print(' '.join(tf.sysconfig.get_compile_flags()))")
TF_LFLAGS = $(shell python3 -c "import tensorflow as tf; print(' '.join(tf.sysconfig.get_link_flags()))")

CUDA_LIB = /usr/local/cuda-10.0/targets/x86_64-linux/lib/

all: clean build test

build: roi_pooling.so

roi_pooling.cu.o: roi_pooling.cu.cc
	nvcc -std=c++11 -c -o $@ $? -I $(TF_INC) -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC

roi_pooling.so: roi_pooling.cc roi_pooling.cu.o
	g++ -std=c++11 -shared -o $@ $? $(TF_CFLAGS) $(TF_LFLAGS) -fPIC -L$(CUDA_LIB) -O2

test: build
	python3 roi_pooling_test.py

clean:
	rm -f *.o *.so *.pyc *.npy

Steps to build for Cuda10...

  1. Have Tensorflow 1.13 and Cuda 10 working.
  2. Update makefile (seen above)
  3. Follow previous install instructions.
@tokotchd
Copy link
Author

Workaround is to add:

output.set_shape([rois.shape[0], input.shape[-1], pool_height, pool_width])

to roi_pooling function in roi_pooling_ops.py

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

1 participant