Skip to content

Commit

Permalink
Fixing XRT issue for Ubuntu 23.10 (#7841)
Browse files Browse the repository at this point in the history
* Fixing XRT issue for Ubuntu 23.10

Signed-off-by: Homa Aghilinasab <haghilin@amd.com>

* Fixing XRT issue for Ubuntu 23.10

Signed-off-by: Homa Aghilinasab <haghilin@amd.com>

* Fixing XRT issue for Ubuntu 23.10

Signed-off-by: Homa Aghilinasab <haghilin@amd.com>

* Fixing XRT issue for Ubuntu 23.10

Signed-off-by: Homa Aghilinasab <haghilin@amd.com>

---------

Signed-off-by: Homa Aghilinasab <haghilin@amd.com>
  • Loading branch information
haghilin authored Dec 14, 2023
1 parent d1b361e commit 283155b
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 26 deletions.
4 changes: 4 additions & 0 deletions src/runtime_src/core/common/api/xrt_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
#include <utility>
using namespace std::chrono_literals;

#ifdef __linux__
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
#endif

#ifdef _WIN32
# pragma warning( disable : 4244 4267 4996 4100 4201)
#endif
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/core/common/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define xrtcore_util_time_h_

#include "core/common/config.h"
#include <cstdint>
#include <string>

namespace xrt_core {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ get_mgmtpf_device(device::id_type id) const

void
system::
program_plp(const xrt_core::device* dev, const std::vector<char> &buffer) const
program_plp(const xrt_core::device* dev, const std::vector<char> &buffer,bool) const
{
throw std::runtime_error("plp program is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class system : public system_pcie
get_mgmtpf_device(device::id_type id) const;

void
program_plp(const device* dev, const std::vector<char> &buffer) const;
program_plp(const device* dev, const std::vector<char> &buffer, bool) const override;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ get_mgmtpf_device(device::id_type id) const

void
system::
program_plp(const xrt_core::device* dev, const std::vector<char> &buffer) const
program_plp(const xrt_core::device* dev, const std::vector<char> &buffer, bool) const
{
throw std::runtime_error("plp program is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class system : public system_pcie
get_mgmtpf_device(device::id_type id) const;

void
program_plp(const device* dev, const std::vector<char> &buffer) const;
program_plp(const device* dev, const std::vector<char> &buffer, bool) const override;
};

/**
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/tools/xclbinutil/CBOR.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
// ----------------------- I N C L U D E S -----------------------------------

// #includes here - please keep these to a bare minimum!
#include <cstdint>
#include <string>
#include <sstream>

Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define __DTCStringsBlock_h_

// ----------------------- I N C L U D E S -----------------------------------
#include <cstdint>
#include <sstream>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/tools/xclbinutil/XclBinSignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef __XclBinSignature_h_
#define __XclBinSignature_h_

#include <cstdint>
#include <string>

// ----------------------- I N C L U D E S -----------------------------------
Expand Down
24 changes: 12 additions & 12 deletions src/runtime_src/xdp/profile/database/dynamic_event_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace xdp {
VTFEventType type)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->findMatchingStart(monitorId, type));
return device_db->findMatchingStart(monitorId, type);
}

bool VPDynamicDatabase::hasMatchingDeviceEventStart(uint64_t deviceId,
Expand Down Expand Up @@ -161,25 +161,25 @@ namespace xdp {

UserRangeInfo VPDynamicDatabase::matchingRange(uint64_t functionID)
{
return std::move(host->lookupUserStart(functionID));
return host->lookupUserStart(functionID);
}

std::vector<VTFEvent*>
VPDynamicDatabase::copySortedHostEvents(std::function<bool(VTFEvent*)> filter)
{
return std::move(host->filterSortedEvents(filter));
return host->filterSortedEvents(filter);
}

std::vector<std::unique_ptr<VTFEvent>> VPDynamicDatabase::moveSortedHostEvents(std::function<bool(VTFEvent*)> filter)
{
return std::move(host->moveSortedEvents(filter));
return host->moveSortedEvents(filter);
}

std::vector<VTFEvent*>
VPDynamicDatabase::
moveUnsortedHostEvents(std::function<bool(VTFEvent*)> filter)
{
return std::move(host->moveUnsortedEvents(filter));
return host->moveUnsortedEvents(filter);
}

bool VPDynamicDatabase::hostEventsExist(std::function<bool(VTFEvent*)> filter)
Expand All @@ -197,7 +197,7 @@ namespace xdp {
VPDynamicDatabase::moveDeviceEvents(uint64_t deviceId)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->moveEvents());
return device_db->moveEvents();
}

void VPDynamicDatabase::setCounterResults(const uint64_t deviceId,
Expand All @@ -212,7 +212,7 @@ namespace xdp {
xrt_core::uuid uuid)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->getPLCounterResults(uuid));
return device_db->getPLCounterResults(uuid);
}

void VPDynamicDatabase::addOpenCLMapping(uint64_t openclID,
Expand All @@ -225,7 +225,7 @@ namespace xdp {
std::pair<uint64_t, uint64_t>
VPDynamicDatabase::lookupOpenCLMapping(uint64_t openclID)
{
return std::move(host->lookupOpenCLMapping(openclID));
return host->lookupOpenCLMapping(openclID);
}

void VPDynamicDatabase::addDependency(uint64_t id, uint64_t dependency)
Expand All @@ -236,7 +236,7 @@ namespace xdp {
std::map<uint64_t, std::vector<uint64_t>>
VPDynamicDatabase::getDependencyMap()
{
return std::move(host->copyDependencyMap());
return host->copyDependencyMap();
}

void VPDynamicDatabase::addAIETraceData(uint64_t deviceId,
Expand Down Expand Up @@ -267,7 +267,7 @@ namespace xdp {
VPDynamicDatabase::getPowerSamples(uint64_t deviceId)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->getPowerSamples());
return device_db->getPowerSamples();
}

void VPDynamicDatabase::addAIESample(uint64_t deviceId, double timestamp,
Expand All @@ -281,7 +281,7 @@ namespace xdp {
VPDynamicDatabase::getAIESamples(uint64_t deviceId)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->getAIESamples());
return device_db->getAIESamples();
}

void VPDynamicDatabase::addAIETimerSample(uint64_t deviceId, unsigned long timestamp1,
Expand All @@ -295,7 +295,7 @@ namespace xdp {
VPDynamicDatabase::getAIETimerSamples(uint64_t deviceId)
{
auto device_db = getDeviceDB(deviceId);
return std::move(device_db->getAIETimerSamples());
return device_db->getAIETimerSamples();
}

void VPDynamicDatabase::setPLTraceBufferFull(uint64_t deviceId, bool val)
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/xdp/profile/database/dynamic_info/aie_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ namespace xdp {

inline
std::vector<counters::Sample> getAIESamples()
{ return std::move(samples.getSamples()); }
{ return samples.getSamples(); }

inline
std::vector<counters::DoubleSample> getAIETimerSamples()
{ return std::move(timerSamples.getSamples()); }
{ return timerSamples.getSamples(); }
};

} // end namespace xdp
Expand Down
10 changes: 5 additions & 5 deletions src/runtime_src/xdp/profile/database/dynamic_info/device_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace xdp {
inline bool eventsExist() { return pl_db.eventsExist(); }

inline std::vector<std::unique_ptr<VTFEvent>> moveEvents()
{ return std::move(pl_db.moveEvents()); }
{ return pl_db.moveEvents(); }

inline void markStart(uint64_t monitorId, const DeviceEventInfo& info)
{ pl_db.markStart(monitorId, info); }
Expand All @@ -81,14 +81,14 @@ namespace xdp {
inline void setPLCounterResults(xrt_core::uuid uuid, CounterResults& values)
{ pl_db.setPLCounterResults(uuid, values); }
inline CounterResults getPLCounterResults(xrt_core::uuid uuid)
{ return std::move(pl_db.getPLCounterResults(uuid)); }
{ return pl_db.getPLCounterResults(uuid); }

inline
void addPowerSample(double timestamp, const std::vector<uint64_t>& values)
{ pl_db.addPowerSample(timestamp, values); }

inline std::vector<counters::Sample> getPowerSamples()
{ return std::move(pl_db.getPowerSamples()); }
{ return pl_db.getPowerSamples(); }

// ****************************************************************
// Functions to access the AIE portion of the device. These are all
Expand All @@ -112,10 +112,10 @@ namespace xdp {
{ aie_db.addAIETimerSample(timestamp1, timestamp2, values); }

inline std::vector<counters::Sample> getAIESamples()
{ return std::move(aie_db.getAIESamples()); }
{ return aie_db.getAIESamples(); }

inline std::vector<counters::DoubleSample> getAIETimerSamples()
{ return std::move(aie_db.getAIETimerSamples()); }
{ return aie_db.getAIETimerSamples(); }

inline void setPLDeadlockInfo(const std::string& info)
{ pl_db.setDeadlockInfo(info); }
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/xdp/profile/database/dynamic_info/host_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ namespace xdp {
startXDPEventId); }

inline std::pair<uint64_t, uint64_t> lookupOpenCLMapping(uint64_t openclId)
{ return std::move(openclDependencies.lookupOpenCLMapping(openclId)); }
{ return openclDependencies.lookupOpenCLMapping(openclId); }

inline void addDependency(uint64_t id, uint64_t dependency)
{ openclDependencies.addDependency(id, dependency); }

inline std::map<uint64_t, std::vector<uint64_t>> copyDependencyMap()
{ return std::move(openclDependencies.copyDependencyMap()); }
{ return openclDependencies.copyDependencyMap(); }

};

Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/xdp/profile/database/dynamic_info/pl_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace xdp {
inline void addPowerSample(double timestamp, const std::vector<uint64_t>& values)
{ powerSamples.addSample({timestamp, values}); }
inline std::vector<counters::Sample> getPowerSamples()
{ return std::move(powerSamples.getSamples()); }
{ return powerSamples.getSamples(); }

inline void setDeadlockInfo(const std::string& info)
{ deadlockInfo = info; }
Expand Down
2 changes: 2 additions & 0 deletions src/runtime_src/xdp/profile/database/events/device_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef DEVICE_EVENTS_DOT_H
#define DEVICE_EVENTS_DOT_H

#include <cstdint>

#include "xdp/profile/database/events/vtf_event.h"

#include "xdp/config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef HAL_API_CALLS_DOT_H
#define HAL_API_CALLS_DOT_H

#include <cstdint>
#include <fstream>

#include "xdp/profile/database/events/vtf_event.h"
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/xdp/profile/database/events/vtf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef VTF_EVENT_DOT_H
#define VTF_EVENT_DOT_H

#include <cstdint>
#include <fstream>

#include "xdp/config.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef XDP_PROFILE_AIE_TRACE_LOGGER_H
#define XDP_PROFILE_AIE_TRACE_LOGGER_H

#include <cstdint>
#include<iostream>

namespace xdp {
Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef VP_WRITER_DOT_H
#define VP_WRITER_DOT_H

#include <cstdint>
#include <fstream>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions src/xma/include/app/xmahw.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef _XMA_HW_H_
#define _XMA_HW_H_

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
1 change: 1 addition & 0 deletions src/xma/include/plg/xmasess.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define __XMA_SESS_H__

#include <stdbool.h>
#include <stdint.h>

#include "app/xmahw.h"

Expand Down

0 comments on commit 283155b

Please sign in to comment.