Code Monkey home page Code Monkey logo

psroialign's People

Contributors

hikapok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psroialign's Issues

Linking CXX shared library libps_roi_align.so Error running link command: No such file or directory

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?

undefined symbol problem

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.