diff --git a/paddle/operators/crop_op.cu b/paddle/operators/crop_op.cu index 561dbe48039e444429e0593f37cfd82bddce6471..a40eb7af3857372faa93a3d2ff3413554ff14880 100644 --- a/paddle/operators/crop_op.cu +++ b/paddle/operators/crop_op.cu @@ -88,7 +88,13 @@ void CropCUDAFunctoin(const framework::ExecutionContext& context) { int d = out_dims[1]; int block = 512; int grid = (n * d + block - 1) / block; - CropKernel<<>>(out_count, out_shape_gpu, x_shape_gpu, + + auto* device_context = + const_cast(context.device_context_); + CropKernel<<(device_context) + ->stream()>>>(out_count, out_shape_gpu, x_shape_gpu, crop_rules_gpu, x_data, out_data); cudaFree(crop_rules_gpu); cudaFree(x_shape_gpu);