reduce memory alloc (in certain cases)

This commit is contained in:
Xinsheng Chen 2025-03-18 16:04:39 +08:00
parent 4c75b24cc9
commit 95a17684fa
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@
namespace jittor { namespace jittor {
DEFINE_FLAG(int, use_sfrl_allocator, 1, "Enable sfrl allocator"); DEFINE_FLAG(int, use_sfrl_allocator, 1, "Enable sfrl allocator");
DEFINE_FLAG(int64, sfrl_large_block_size_device, 20971520, "sfrl_large_block_size, larger will reduce memory shard, only affect device"); DEFINE_FLAG(int64, sfrl_large_block_size_device, 5242880, "sfrl_large_block_size, larger will reduce memory shard, only affect device");
constexpr int64 sfrl_large_block_size_cpu=20971520; constexpr int64 sfrl_large_block_size_cpu=5242880;
std::vector<size_t> CachingBlockPool::block_ids; std::vector<size_t> CachingBlockPool::block_ids;
//start from 1 //start from 1