Return always true for P2P validation under ROCr

Change-Id: Id32a5a94a642e708d1d042c5247af38501bec153


[ROCm/clr commit: 059832b526]
Bu işleme şunda yer alıyor:
German Andryeyev
2020-06-30 15:55:48 -04:00
ebeveyn 457a9d48f5
işleme 67c2bf6df4
3 değiştirilmiş dosya ile 12 ekleme ve 6 silme
+2 -1
Dosyayı Görüntüle
@@ -581,7 +581,8 @@ class Settings : public amd::HeapObject {
uint enableCoopGroups_ : 1; //!< Enable cooperative groups feature
uint enableCoopMultiDeviceGroups_ : 1; //!< Enable cooperative groups multi device
uint fenceScopeAgent_ : 1; //!< Enable fence scope agent in AQL dispatch packet
uint reserved_ : 11;
uint rocr_backend_ : 1; //!< Device uses ROCr backend for submissions
uint reserved_ : 10;
};
uint value_;
};
+2
Dosyayı Görüntüle
@@ -89,6 +89,8 @@ Settings::Settings() {
hmmFlags_ = (!flagIsDefault(ROC_HMM_FLAGS)) ? ROC_HMM_FLAGS :
Hmm::EnableSystemMemory | Hmm::EnableMallocPrefetch;
rocr_backend_ = true;
}
bool Settings::create(bool fullProfile, int gfxipMajor, int gfxipMinor, bool coop_groups) {
+8 -5
Dosyayı Görüntüle
@@ -590,6 +590,13 @@ bool TransferBufferFileCommand::validateMemory() {
}
bool CopyMemoryP2PCommand::validateMemory() {
amd::Device* queue_device = &queue()->device();
// Rocr backend maps memory from different devices by default and runtime doesn't need to track
// extra memory objects. Also P2P staging buffer always allocated
if (queue_device->settings().rocr_backend_) {
return true;
}
const std::vector<Device*>& devices = memory1_->getContext().devices();
if (devices.size() != 1) {
LogError("Can't allocate memory object for P2P extension");
@@ -614,11 +621,7 @@ bool CopyMemoryP2PCommand::validateMemory() {
// Validate P2P memories on the current device, if any of them is null, then it's p2p staging
if ((nullptr == memory1_->getDeviceMemory(queue()->device())) ||
(nullptr == memory2_->getDeviceMemory(queue()->device()))) {
// HIP doesn't support emulation
p2pStaging = !amd::IS_HIP;
if (!p2pStaging) {
return false;
}
p2pStaging = true;
}
if (devices[0]->P2PStage() != nullptr && p2pStaging) {