SWDEV-293519 - [PAL] Limit mgpu SVM logic only to mgpu cases
Below logic allocates the host buffer whenever a subbuffer is created
from a SVM allocation. This is only needed for multi-device contexts.
HIP does not support multi-device contexts, hence this logic just ends
up performing unnecessary system allocations.
Change-Id: I8eae635f7c5289c52ef73434218c1658b788a456
[ROCm/clr commit: ffbf368f4c]
Tento commit je obsažen v:
odevzdal
Maneesh Gupta
rodič
840d5bbdb5
revize
4a2da6ea45
@@ -1396,7 +1396,8 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (nullptr != owner.parent()->getSvmPtr()) {
|
||||
if ((nullptr != owner.parent()->getSvmPtr()) &&
|
||||
(owner.parent()->getContext().devices().size() > 1)) {
|
||||
amd::Memory* amdParent = owner.parent();
|
||||
{
|
||||
// Lock memory object, so only one commitment will occur
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele