Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of query for xrt_smi_configuration.json #8671

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading