SWDEV-264166 - Remove gcnArch

Change-Id: Ief4bdbdd5373adb73a291633067c9a8e11f05a32


[ROCm/clr commit: ab303e6440]
Αυτή η υποβολή περιλαμβάνεται σε:
Jason Tang
2022-07-12 17:47:17 -04:00
υποβλήθηκε από Jason Tang
γονέας f4642fc0d4
υποβολή d12900e000
2 αρχεία άλλαξαν με 2 προσθήκες και 3 διαγραφές
@@ -302,8 +302,6 @@ hipError_t ihipGetDeviceProperties(hipDeviceProp_t* props, hipDevice_t device) {
deviceProps.pciDeviceID = info.deviceTopology_.pcie.device;
deviceProps.maxSharedMemoryPerMultiProcessor = info.localMemSizePerCU_;
deviceProps.canMapHostMemory = 1;
// FIXME: This should be removed, targets can have character names as well.
deviceProps.gcnArch = isa.versionMajor() * 100 + isa.versionMinor() * 10 + isa.versionStepping();
sprintf(deviceProps.gcnArchName, "%s", isa.targetId());
deviceProps.cooperativeLaunch = info.cooperativeGroups_;
deviceProps.cooperativeMultiDeviceLaunch = info.cooperativeMultiDeviceGroups_;
@@ -151,7 +151,8 @@ hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr,
// Linear layout access is supported if P2P is enabled
// Opaque Images are supported only on homogeneous systems
// Might have more conditions to check, in future.
if (srcDeviceProp.gcnArch == dstDeviceProp.gcnArch) {
if (0 == strncmp(srcDeviceProp.gcnArchName, dstDeviceProp.gcnArchName,
sizeof(srcDeviceProp.gcnArchName))) {
HIP_RETURN_ONFAIL(canAccessPeer(value, srcDevice, dstDevice));
} else {
*value = 0;