SWDEV-204804 - Detecing pcie atomic support

- check pcie atomci support for printf functionality
- if not enabled printf wont work

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ib366e8e71772b02210c4a830bca4bd8cc7a11664


[ROCm/clr commit: 15f1632dfa]
This commit is contained in:
sdashmiz authored and Shadi Dashmiz committed 2022-04-22 08:53:16 -04:00
1 parent 4d04262d2c
commit dafc64ea0a
4 files changed
+22 -1

No files matched your search

@@ -207,6 +207,16 @@ void Device::setupCpuAgent() {
system_segment_.handle, system_coarse_segment_.handle, _bkendDevice.handle);
}
void Device::checkAtomicSupport() {
std::vector<amd::Device::LinkAttrType> link_attrs;
link_attrs.push_back(std::make_pair(LinkAttribute::kLinkAtomicSupport, 0));
if (findLinkInfo(system_segment_, &link_attrs)) {
if (link_attrs[0].second == 1) {
info_.pcie_atomics_ = true;
}
}
}
Device::~Device() {
#ifdef WITH_AMDGPU_PRO
delete pro_device_;
@@ -1167,6 +1177,8 @@ bool Device::populateOCLDeviceConstants() {
setupCpuAgent();
checkAtomicSupport();
assert(system_segment_.handle != 0);
if (HSA_STATUS_SUCCESS != hsa_amd_agent_iterate_memory_pools(
_bkendDevice, Device::iterateGpuMemoryPoolCallback, this)) {