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:
Jack Zhou
2022-08-17 10:03:41 +08:00
committed by GitHub
parent 82868d2c4d
commit 13a3d6f9f5
15 changed files with 63 additions and 56 deletions

View File

@@ -117,7 +117,7 @@ void Softmax(const FDTensor& x, FDTensor* out, int axis) {
FDASSERT(
std::abs(axis) < x.shape.size(),
"The absolute given axis should be smaller than the input's "
"dimension. Expected absolute axis is smaller than %d, but receive %d.",
"dimension. Expected absolute axis is smaller than %lu, but receive %d.",
x.shape.size(), std::abs(axis));
FD_VISIT_FLOAT_TYPES(x.dtype, "SoftmaxKernel",
([&] { SoftmaxKernel<data_t>(x, out, axis); }));