rocr/xdna-driver: Initial support for amdxdna driver
Change-Id: I319b55d89dc644e7151228cb6c19d1a633171295
This commit is contained in:
@@ -244,6 +244,11 @@ void Runtime::RegisterAgent(Agent* agent, bool Enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
// Register driver.
|
||||
void Runtime::RegisterDriver(std::unique_ptr<Driver> &driver) {
|
||||
agent_drivers_.push_back(std::move(driver));
|
||||
}
|
||||
|
||||
void Runtime::DestroyAgents() {
|
||||
agents_by_node_.clear();
|
||||
|
||||
@@ -267,6 +272,14 @@ void Runtime::DestroyAgents() {
|
||||
system_regions_coarse_.clear();
|
||||
}
|
||||
|
||||
void Runtime::DestroyDrivers() {
|
||||
for (auto &d : agent_drivers_) {
|
||||
d->Close();
|
||||
}
|
||||
|
||||
agent_drivers_.clear();
|
||||
}
|
||||
|
||||
void Runtime::SetLinkCount(size_t num_nodes) {
|
||||
num_nodes_ = num_nodes;
|
||||
link_matrix_.resize(num_nodes * num_nodes);
|
||||
@@ -2062,6 +2075,8 @@ void Runtime::Unload() {
|
||||
|
||||
CloseTools();
|
||||
|
||||
DestroyDrivers();
|
||||
|
||||
AMD::Unload();
|
||||
}
|
||||
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user