setup.py 504 字节
Newer Older
1 2
import paddle
from paddle.utils.cpp_extension import CppExtension, CUDAExtension, setup
C
cnn 已提交
3 4

if __name__ == "__main__":
5 6 7 8 9 10 11 12 13 14
    if paddle.device.is_compiled_with_cuda():
        setup(
            name='rbox_iou_ops',
            ext_modules=CUDAExtension(
                sources=['rbox_iou_op.cc', 'rbox_iou_op.cu'],
                extra_compile_args={'cxx': ['-DPADDLE_WITH_CUDA']}))
    else:
        setup(
            name='rbox_iou_ops',
            ext_modules=CppExtension(sources=['rbox_iou_op.cc']))