setup.py 504 B

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