Skip to content

Commit

Permalink
Addition of query for xrt_smi_configuration.json (#8671)
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay Tondak <[email protected]>
  • Loading branch information
aktondak authored Jan 2, 2025
1 parent 3b21481 commit acc1449
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/runtime_src/core/common/query_requests.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ enum class key_type
instance,
edge_vendor,
device_class,
xrt_smi_config,
xclbin_name,
sequence_name,
elf_name,
Expand Down Expand Up @@ -525,6 +526,37 @@ struct edge_vendor : request
}
};

/**
* Used to retieve the path to a configuration file required for the
* current device assuming a valid instance "type" is passed. The shim
* decides the appropriate path and name to return, absolving XRT of
* needing to know where to look.
* This structure can be extended to provide other configurations supporting xrt-smi
*/

struct xrt_smi_config : request
{
enum class type {
options_config
};

static std::string
enum_to_str(const type& type)
{
switch (type) {
case type::options_config:
return "options_config";
}
return "unknown";
}
using result_type = std::string;
static const key_type key = key_type::xrt_smi_config;
static const char* name() { return "xrt_smi_config"; }

virtual std::any
get(const device*, const std::any& req_type) const override = 0;
};

/**
* Used to retrieve the path to an xclbin file required for the
* current device assuming a valid xclbin "type" is passed. The shim
Expand Down

0 comments on commit acc1449

Please sign in to comment.