SWDEV-325708 - Query for FineGrained support
Change-Id: Idd20a71467595ab6577bf47c081c437a4b166988
[ROCm/clr commit: 3c2dc1f646]
이 커밋은 다음에 포함됨:
@@ -1751,6 +1751,9 @@ class Device : public RuntimeObject {
|
||||
|
||||
virtual const uint32_t getPreferredNumaNode() const { return 0; }
|
||||
virtual void ReleaseGlobalSignal(void* signal) const {}
|
||||
virtual const bool isFineGrainSupported() const {
|
||||
return (info().svmCapabilities_ & CL_DEVICE_SVM_ATOMICS) != 0 ? true : false;
|
||||
}
|
||||
|
||||
//! Returns TRUE if the device is available for computations
|
||||
bool isOnline() const { return online_; }
|
||||
|
||||
@@ -1064,6 +1064,15 @@ Memory* Device::getGpuMemory(amd::Memory* mem) const {
|
||||
return static_cast<roc::Memory*>(mem->getDeviceMemory(*this));
|
||||
}
|
||||
|
||||
const bool Device::isFineGrainSupported() const {
|
||||
bool result = (info().svmCapabilities_ & CL_DEVICE_SVM_ATOMICS) != 0 ? true : false;
|
||||
if (result) {
|
||||
if (gpu_fine_grained_segment_.handle != 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// ================================================================================================
|
||||
bool Device::populateOCLDeviceConstants() {
|
||||
info_.available_ = true;
|
||||
|
||||
@@ -540,6 +540,7 @@ class Device : public NullDevice {
|
||||
virtual amd::Memory* GetArenaMemObj(const void* ptr, size_t& offset);
|
||||
|
||||
const uint32_t getPreferredNumaNode() const { return preferred_numa_node_; }
|
||||
const bool isFineGrainSupported() const;
|
||||
|
||||
private:
|
||||
bool create();
|
||||
|
||||
새 이슈에서 참조
사용자 차단