The error is not created by the true_divide operation, but by the ceil operation, since the CUDA result is not exactly 29, but contains a small eps value of ~1e-6. This eps might be created, if the division is executed as a multiplication using the reciprocal.