@@ -40,8 +40,7 @@ limitations under the License.
4040#include " core/framework/config/parallel_config.h"
4141#include " core/framework/config/service_config.h"
4242#include " framework/block/block_utils.h"
43- // hierarchy temporarily disabled during the block-manager refactor
44- // #include "framework/block/hierarchy_block_manager_pool.h"
43+ #include " framework/block/hierarchy_block_manager_pool.h"
4544#include " framework/kv_cache/kv_cache_estimation.h"
4645#include " framework/kv_cache/kv_cache_shape.h"
4746#include " framework/model/model_args.h"
@@ -566,19 +565,12 @@ bool LLMEngine::allocate_kv_cache(const KVCacheCapacity& kv_cache_cap) {
566565 kv_cache_cap.swa_count (), std::numeric_limits<uint32_t >::max ())));
567566 }
568567
569- if (options_.host_blocks_factor () > 1.0 || options_.enable_kvcache_store ()) {
570- // hierarchy temporarily disabled during the block-manager refactor.
571- // host-offload / kvcache-store routes the device + host dual
572- // KVCacheState through HierarchyBlockManagerPool, which is parked while
573- // the composite block-manager refactor lands in smaller pieces. Until
574- // then this path fails loudly rather than silently degrading to a
575- // device-only pool.
576- LOG (FATAL ) << " host-offload / kvcache-store is temporarily disabled during "
577- " the block-manager refactor (hierarchy rebuild in progress). "
578- " Please disable --host_blocks_factor and "
579- " --enable_kvcache_store for now." ;
568+ if (options_.host_blocks_factor () > 1.0 ) {
569+ kv_cache_manager_ =
570+ std::make_unique<HierarchyBlockManagerPool>(options, this , dp_size_);
571+ } else {
572+ kv_cache_manager_ = std::make_unique<BlockManagerPool>(options, dp_size_);
580573 }
581- kv_cache_manager_ = std::make_unique<BlockManagerPool>(options, dp_size_);
582574
583575 // init kv cache for each worker in parallel
584576 std::vector<folly::SemiFuture<bool >> futures;
0 commit comments