Created by: chenwhql
as title, polish error message CI check rule, let CI check can match PADDLE_ENFORCE_CUDA_SUCCESS.
- test case:
TEST(enforce, cuda_success_check) {
PADDLE_ENFORCE_CUDA_SUCCESS(cudaSuccess); // no msg
PADDLE_ENFORCE_CUDA_SUCCESS(cudaSuccess, "cuda test"); // no error type
PADDLE_ENFORCE_CUDA_SUCCESS(
cudaSuccess,
paddle::platform::errors::External("cuda test")); // msg is too short
PADDLE_ENFORCE_CUDA_SUCCESS(
cudaSuccess, paddle::platform::errors::External(
"paddle enforce cuda success test")); // correct
}
- test result