|
|
@ -45,7 +45,8 @@ class PolygonBoxTransformOpCUDAKernel : public framework::OpKernel<T> {
|
|
|
|
void Compute(const framework::ExecutionContext& ctx) const override {
|
|
|
|
void Compute(const framework::ExecutionContext& ctx) const override {
|
|
|
|
PADDLE_ENFORCE_EQ(
|
|
|
|
PADDLE_ENFORCE_EQ(
|
|
|
|
platform::is_gpu_place(ctx.GetPlace()), true,
|
|
|
|
platform::is_gpu_place(ctx.GetPlace()), true,
|
|
|
|
platform::errors::InvalidArgument("It must use CUDAPlace."));
|
|
|
|
platform::errors::InvalidArgument(
|
|
|
|
|
|
|
|
"The polygon_box_transform operator needs to be executed on GPU."));
|
|
|
|
auto* in = ctx.Input<Tensor>("Input");
|
|
|
|
auto* in = ctx.Input<Tensor>("Input");
|
|
|
|
auto in_dims = in->dims();
|
|
|
|
auto in_dims = in->dims();
|
|
|
|
const T* in_data = in->data<T>();
|
|
|
|
const T* in_data = in->data<T>();
|
|
|
|