Skip to content

Commit

Permalink
Removing redundant setting of he device name that resulted in a less …
Browse files Browse the repository at this point in the history
…clear name (#8617)
  • Loading branch information
jvillarre authored Nov 25, 2024
1 parent 308dae7 commit c3f3fcc
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ namespace xdp {
(db->getStaticInfo()).setDeviceName(deviceID, "win_device");
#else
(db->getStaticInfo()).updateDevice(deviceID, nullptr, handle);
std::string deviceName = util::getDeviceName(handle);
if (deviceName != "") {
(db->getStaticInfo()).setDeviceName(deviceID, deviceName);
}
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,6 @@ namespace xdp {
if (!(db->getStaticInfo()).isDeviceReady(deviceID)) {
// Update the static database with information from xclbin
(db->getStaticInfo()).updateDevice(deviceID, nullptr, handle);
{
std::string deviceName = util::getDeviceName(handle);
if(deviceName != "") {
(db->getStaticInfo()).setDeviceName(deviceID, deviceName);
}
}
}

// Grab AIE metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ void AieTracePluginUnified::updateAIEDevice(void *handle) {
#else
// Update the static database with information from xclbin
(db->getStaticInfo()).updateDevice(deviceID, std::move(std::make_unique<HalDevice>(handle)), handle);
std::string deviceName = util::getDeviceName(handle);
if (deviceName != "")
(db->getStaticInfo()).setDeviceName(deviceID, deviceName);

#endif

// Metadata depends on static information from the database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ namespace xdp {
// Update the static database with all the information that
// will be needed later
db->getStaticInfo().updateDevice(deviceId, std::move(std::make_unique<HalDevice>(ownedHandle)), userHandle) ;
{
std::string deviceName = util::getDeviceName(userHandle);
if (deviceName != "")
(db->getStaticInfo()).setDeviceName(deviceId, deviceName);
}

// For the HAL level, we must create a device interface using
// the xdp::HalDevice to communicate with the physical device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@ namespace xdp {
// Update the static database with all the information that
// will be needed later
db->getStaticInfo().updateDevice(deviceId, std::move(std::make_unique<HalDevice>(userHandle)), userHandle) ;
{
std::string deviceName = util::getDeviceName(userHandle);
if (deviceName != "") {
(db->getStaticInfo()).setDeviceName(deviceId, deviceName);
}
}

// For the HAL level, we must create a device interface using
// the xdp::HalDevice to communicate with the physical device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,6 @@ namespace xdp {
if (!(db->getStaticInfo()).isDeviceReady(deviceId)) {
// Update the static database with information from xclbin
(db->getStaticInfo()).updateDevice(deviceId,std::move(std::make_unique<HalDevice>(handle)), handle);
{
std::string deviceName = util::getDeviceName(handle);
if(deviceName != "") {
(db->getStaticInfo()).setDeviceName(deviceId, deviceName);
}
}
}

PLDeviceIntf* deviceIntf = (db->getStaticInfo()).getDeviceIntf(deviceId);
Expand Down

0 comments on commit c3f3fcc

Please sign in to comment.