mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
Upgrade FDASSERT string format (#121)
* upgrade FDASSERT * Add c_str() for reduce * upgrade FDASSERT flag * upgrade flags * upgrade lu * fix tests cmake * Fix pybind FDASSERT
This commit is contained in:
@@ -95,12 +95,12 @@ void Transpose(const FDTensor& x, FDTensor* out,
|
||||
size_t dims_size = dims.size();
|
||||
FDASSERT(dims_size == x.shape.size(),
|
||||
"The input tensor's dimension should be equal to the dims's size. "
|
||||
"Expect dims size is %d, but receive %d.",
|
||||
"Expect dims size is %lu, but receive %lu.",
|
||||
x.shape.size(), dims_size);
|
||||
std::vector<int> count(dims_size, 0);
|
||||
for (size_t i = 0; i < dims_size; i++) {
|
||||
FDASSERT(dims[i] >= 0,
|
||||
"The dims should be greater than or equal to 0, but receive %d.",
|
||||
"The dims should be greater than or equal to 0, but receive %lld.",
|
||||
dims[i]);
|
||||
FDASSERT(dims[i] < static_cast<int>(dims_size) && ++count[dims[i]] == 1,
|
||||
"Each element of Attribute axis should be a unique value range "
|
||||
|
Reference in New Issue
Block a user