|
19 | 19 | #pragma once |
20 | 20 |
|
21 | 21 | #include <stdint.h> |
| 22 | +#include <glib.h> |
22 | 23 |
|
23 | 24 | /** |
24 | 25 | * @brief AI Execution Provider |
@@ -63,6 +64,31 @@ dt_ai_provider_t dt_ai_provider_from_string(const char *str); |
63 | 64 | * @return 1 if available, 0 if not. */ |
64 | 65 | int dt_ai_probe_provider(dt_ai_provider_t provider); |
65 | 66 |
|
| 67 | +/** Probe a shared library to check if it's a valid ONNX Runtime build. |
| 68 | + * @return version string (caller must g_free) or NULL on failure. */ |
| 69 | +char *dt_ai_ort_probe_library(const char *path); |
| 70 | + |
| 71 | +/** Probe a library and return version + supported execution providers. |
| 72 | + * @param out_version version string (caller must g_free), may be NULL |
| 73 | + * @param out_eps comma-separated EP names (caller must g_free), may be NULL |
| 74 | + * @return 1 if valid ORT library, 0 otherwise */ |
| 75 | +int dt_ai_ort_probe_library_full(const char *path, char **out_version, char **out_eps); |
| 76 | + |
| 77 | +/** Result from dt_ai_ort_find_libraries(). Caller owns all strings. */ |
| 78 | +typedef struct dt_ai_ort_found_t |
| 79 | +{ |
| 80 | + char *path; // full path to the library |
| 81 | + char *version; // ORT version string |
| 82 | + char *eps; // comma-separated execution provider names |
| 83 | +} dt_ai_ort_found_t; |
| 84 | + |
| 85 | +/** Scan system and user-space paths for valid ORT libraries. |
| 86 | + * @return GList of dt_ai_ort_found_t (caller must free with dt_ai_ort_found_free) */ |
| 87 | +GList *dt_ai_ort_find_libraries(void); |
| 88 | + |
| 89 | +/** Free a dt_ai_ort_found_t */ |
| 90 | +void dt_ai_ort_found_free(dt_ai_ort_found_t *f); |
| 91 | + |
66 | 92 | /** |
67 | 93 | * @brief Graph Optimization Level |
68 | 94 | * |
|
0 commit comments