Created by: luotao1
In general, it's recommended to use PADDLE_ENFORCE
for error_mesage. However, in CUDA device kernel or HOSTDEVICE function, we must use PADDLE_ASSERT
now.
https://github.com/PaddlePaddle/Paddle/blob/c2063217e7458cfa97a16874b6a6982448259304/paddle/fluid/platform/assert.h#L40
This PR:
- replace part of
PADDLE_ASSERT
toPADDLE_ENFORCE
, and later we will see how to unifyPADDLE_ASSERT
andPADDLE_ENFORCE
, which is so confused for usage now. - remove unused
fallback_alloc_size_
insystem_allocator.cc
and add unit-test forCUDAPinnedAllocator
, to pass thePR_CI_COVERAGE