diff --git a/paddle/operators/crop_op.cu b/paddle/operators/crop_op.cu index f499ce3f2759dcb87784cbe3a018a49f28c6a07c..05782145b84c235bcc56c27a6a04368e670ef46d 100644 --- a/paddle/operators/crop_op.cu +++ b/paddle/operators/crop_op.cu @@ -91,12 +91,11 @@ void CropCUDAFunctoin(const framework::ExecutionContext& context) { int block = 512; int grid = (n * d + block - 1) / block; - auto* device_context = - const_cast(context.device_context_); - CropKernel<<(device_context) - ->stream()>>>( + CropKernel< + T, + D><<( + context.device_context()) + .stream()>>>( out_count, out_shape_gpu.data(), x_shape_gpu.data(), crop_rules_gpu.data(), x_data, out_data); }