Skip to content

Commit e28b569

Browse files
authored
MethodMeta API to query of backends number and names
1 parent 4e1d2e5 commit e28b569

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

runtime/executor/method_meta.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,21 @@ class MethodMeta final {
193193
*/
194194
bool uses_backend(const char* backend_name) const;
195195

196+
/**
197+
* Get the number of backends used in this method.
198+
*
199+
* @returns The total number of backend names.
200+
*/
201+
size_t num_backends() const;
202+
203+
/**
204+
* Get the backend name at the given index.
205+
*
206+
* @param[in] index The index of the backend name.
207+
* @returns The backend name as a C-style string, or nullptr if the index is invalid.
208+
*/
209+
const char* get_backend_name(size_t index) const;
210+
196211
/**
197212
* Get the number of instructions in this method.
198213
*

0 commit comments

Comments
 (0)