diff --git a/paddle/fluid/framework/details/nan_inf_utils_detail.cc b/paddle/fluid/framework/details/nan_inf_utils_detail.cc index bca61ddae69e7cd199d54f85b3cd601d10e5dd55..f80bb94b30b648e9829e7135d45f2587726b08d4 100644 --- a/paddle/fluid/framework/details/nan_inf_utils_detail.cc +++ b/paddle/fluid/framework/details/nan_inf_utils_detail.cc @@ -157,18 +157,18 @@ static void PrintNanInf(const T* value, } if (count < static_cast(print_num)) { - printf("numel:%lu index:%lu value:%f\n", - static_cast(numel), - static_cast(i), + printf("numel:%zu index:%zu value:%f\n", + numel, + i, static_cast(value[i])); } } printf( - "In cpu, there has %lu,%lu,%lu nan,inf,num. " + "In cpu, there has %zu,%zu,%zu nan,inf,num. " "And in num, min_value is %f, max_value is %f\n", - static_cast(nan_count), - static_cast(inf_count), - static_cast(num_count), + nan_count, + inf_count, + num_count, static_cast(min_value), static_cast(max_value)); if (abort) { diff --git a/paddle/fluid/operators/math/bloomfilter.h b/paddle/fluid/operators/math/bloomfilter.h index 9da9f442e000df7d6ca5bff52984b0477442096e..ba907b5012b3c5a91b2c7d2c4b5b5776c229d831 100644 --- a/paddle/fluid/operators/math/bloomfilter.h +++ b/paddle/fluid/operators/math/bloomfilter.h @@ -20,6 +20,7 @@ limitations under the License. */ #include #include #include +#include namespace paddle { namespace operators { @@ -151,7 +152,7 @@ int bloomfilter_check(struct bloomfilter *filter) { if (filter->magic_num == BLOOMFILTER_MAGIC_NUM_NEW) { return 1; } else { - fprintf(stderr, "error magic_num %ld\n", filter->magic_num); + fprintf(stderr, "error magic_num, %" PRIu64 "\n", filter->magic_num); return 0; } }