@@ -62,6 +62,14 @@ DEFINE_int32(acl_graph_decode_batch_size_limit,
6262 " When actual decode batch_size > this value, ACL graph decode "
6363 " falls back to eager mode to avoid OOM." );
6464
65+ DEFINE_bool (enable_encoder_graph,
66+ false ,
67+ " Whether to enable ACL graph for vision encoder" );
68+
69+ DEFINE_string (encoder_graph_budgets,
70+ " 1024,2048,4096,8192" ,
71+ " Comma-separated token budgets for encoder graph buckets" );
72+
6573DEFINE_bool (enable_shm,
6674 false ,
6775 " Whether to enable shared memory for executing model." );
@@ -91,6 +99,8 @@ void ExecutionConfig::from_flags() {
9199 XLLM_CONFIG_ASSIGN_FROM_FLAG (enable_graph_vmm_pool);
92100 XLLM_CONFIG_ASSIGN_FROM_FLAG (max_tokens_for_graph_mode);
93101 XLLM_CONFIG_ASSIGN_FROM_FLAG (acl_graph_decode_batch_size_limit);
102+ XLLM_CONFIG_ASSIGN_FROM_FLAG (enable_encoder_graph);
103+ XLLM_CONFIG_ASSIGN_FROM_FLAG (encoder_graph_budgets);
94104 XLLM_CONFIG_ASSIGN_FROM_FLAG (enable_shm);
95105 XLLM_CONFIG_ASSIGN_FROM_FLAG (use_contiguous_input_buffer);
96106 XLLM_CONFIG_ASSIGN_FROM_FLAG (input_shm_size);
@@ -106,6 +116,8 @@ void ExecutionConfig::from_json(const JsonReader& json) {
106116 XLLM_CONFIG_ASSIGN_FROM_JSON (enable_graph_vmm_pool);
107117 XLLM_CONFIG_ASSIGN_FROM_JSON (max_tokens_for_graph_mode);
108118 XLLM_CONFIG_ASSIGN_FROM_JSON (acl_graph_decode_batch_size_limit);
119+ XLLM_CONFIG_ASSIGN_FROM_JSON (enable_encoder_graph);
120+ XLLM_CONFIG_ASSIGN_FROM_JSON (encoder_graph_budgets);
109121 XLLM_CONFIG_ASSIGN_FROM_JSON (enable_shm);
110122 XLLM_CONFIG_ASSIGN_FROM_JSON (use_contiguous_input_buffer);
111123 XLLM_CONFIG_ASSIGN_FROM_JSON (input_shm_size);
@@ -130,6 +142,10 @@ void ExecutionConfig::append_config_json(
130142 config_json, default_config, max_tokens_for_graph_mode);
131143 APPEND_CONFIG_JSON_VALUE_IF_NOT_DEFAULT (
132144 config_json, default_config, acl_graph_decode_batch_size_limit);
145+ APPEND_CONFIG_JSON_VALUE_IF_NOT_DEFAULT (
146+ config_json, default_config, enable_encoder_graph);
147+ APPEND_CONFIG_JSON_VALUE_IF_NOT_DEFAULT (
148+ config_json, default_config, encoder_graph_budgets);
133149 APPEND_CONFIG_JSON_VALUE_IF_NOT_DEFAULT (
134150 config_json, default_config, enable_shm);
135151 APPEND_CONFIG_JSON_VALUE_IF_NOT_DEFAULT (
0 commit comments