hikapok / psroialign Goto Github PK
View Code? Open in Web Editor NEW(Oriented) PsRoIAlign Operation In Tensorflow C++ API
License: MIT License
(Oriented) PsRoIAlign Operation In Tensorflow C++ API
License: MIT License
https://github.com/zengarden/light_head_rcnn/
看的nms的cuda的代码头大哦,
Hello!
I want to import your Light-Head RCNN code. Then i have tried to build PSROIAlign but some trouble has occured.
when trying to make:
[ 10%] Building NVCC (Device) object CMakeFiles/cuda_compile.dir/cuda_compile_generated_rotated_ps_roi_align_grad_op.cu.o
.....
[100%] Linking CXX shared library libps_roi_align.so
Error running link command: No such file or directory
CMakeFiles/ps_roi_align.dir/build.make:236: recipe for target 'libps_roi_align.so' failed
make[2]: *** [libps_roi_align.so] Error 2
make[2]: *** Deleting file 'libps_roi_align.so'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ps_roi_align.dir/all' failed
make[1]: *** [CMakeFiles/ps_roi_align.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
I tried using python2 and tensorflow 1.8. How can I solve this problem?
hi,
how can i solve this problem? very thanks.
I wrote a custom op, and use gcc cmd to build it, it worked well. Then I try to rewirte the build script with cmake, and use your CMakeLists.txt as example, but when calling the op, it gives the undefined symbol error. It seems the op is skipped by the cmake. The following is gcc script and cmakelists. could you give some advice?
gcc script
TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )
nvcc -std=c++11 -c -o resize_trilinear.cu.o resize_trilinear.cu.cc \
${TF_CFLAGS[@]} -I/usr/local \
-D GOOGLE_CUDA=1 \
-x cu -Xcompiler -fPIC -DNDEBUG --expt-relaxed-constexpr
g++ -std=c++11 -shared -o libresize_trilinear.so resize_trilinear.cc resize_trilinear.cu.o \
${TF_CFLAGS[@]} -I/usr/local/cuda/include \
${TF_LFLAGS[@]} -lcudart \
-D GOOGLE_CUDA=1 \
-fPIC -O2
CMakeLists.txt
cmake_minimum_required(VERSION 3.14)
project(resize_trilinear)
set(CMAKE_CXX_STANDARD 11)
#enable_language(CUDA)
find_package(CUDA REQUIRED)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} \
-gencode arch=compute_61,code=sm_61 \
-D GOOGLE_CUDA=1 -x cu \
-Xcompiler -fPIC -DNDEBUG \
--expt-relaxed-constexpr")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-std=c++11 \
-DGOOGLE_CUDA=1 \
-fPIC -O2")
set(TF_INC /home/zoud/program/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/include)
set(TF_LIB /home/zoud/program/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core)
cuda_compile(RESIZE_TRILINEAR_CU_O resize_trilinear.cu.cc MODULE OPTIONS -I$TF_INC -I/usr/local)
include_directories(${TF_INC} /usr/local/cuda/include)
link_directories(${TF_LIB} /usr/local/cuda/lib64)
#add_link_options(-Wl,--no-as-needed)
#add_link_options(-Wl,--allow-multiple-definition)
add_library(resize_trilinear SHARED
${RESIZE_TRILINEAR_CU_O}
resize_trilinear.h
resize_trilinear.cc)
target_link_libraries(resize_trilinear
libtensorflow_framework.so.2
libcudart.so)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.