All GGML_OPENVINO_* environment variables should be read exactly once, ideally during backend registration or inside ggml_openvino_device_config::init() and stored as fields in the ggml_openvino_device_config struct. The rest of the code should access them through the existing ggml_openvino_get_device_config() accessor rather than calling getenv directly. This would:
- Eliminate repeated
getenv calls inside ov_graph_compute_dynamic() and ov_graph_compute_static(), which are invoked on every inference step.
- Remove the need for the read-and-unset hack for
GGML_OPENVINO_PRINT_CGRAPH_TENSOR_ADDRESS.
- Consolidate all configurations in one place, making it easier to document, maintain, and extend.
All
GGML_OPENVINO_*environment variables should be read exactly once, ideally during backend registration or insideggml_openvino_device_config::init()and stored as fields in theggml_openvino_device_configstruct. The rest of the code should access them through the existingggml_openvino_get_device_config()accessor rather than callinggetenvdirectly. This would:getenvcalls insideov_graph_compute_dynamic()andov_graph_compute_static(), which are invoked on every inference step.GGML_OPENVINO_PRINT_CGRAPH_TENSOR_ADDRESS.