From 44c701192b3ea3f927f9eaee7a05b30b87ba9b1f Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 15 Dec 2021 23:38:45 -0800 Subject: [PATCH] Revert a bad change in bfc_arena.cc (#10057) --- onnxruntime/core/framework/bfc_arena.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/framework/bfc_arena.cc b/onnxruntime/core/framework/bfc_arena.cc index 4b41222474..57e4fea00b 100644 --- a/onnxruntime/core/framework/bfc_arena.cc +++ b/onnxruntime/core/framework/bfc_arena.cc @@ -164,7 +164,7 @@ Status BFCArena::Extend(size_t rounded_bytes) { static constexpr float kBackpedalFactor = 0.9f; // Try allocating less memory. while (mem_addr == nullptr) { - bytes = RoundedBytes(static_cast(bytes) * static_cast(kBackpedalFactor)); + bytes = RoundedBytes(static_cast(bytes * kBackpedalFactor)); // give up if we can't satisfy the requested size, or we're attempting an allocation of less than 8K. //