P4 to Git Change 1491909 by gandryey@gera-w8 on 2017/12/07 16:33:58
SWDEV-79445 - OCL generic changes and code clean-up
- Add device validation call for LiquidFlash library before usage.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_lqdflash_amd.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#294 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/pro/prodevice.hpp#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/pro/prodriver.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#77 edit
[ROCm/clr commit: 0604712f5a]
This commit is contained in:
@@ -575,6 +575,10 @@ struct Info : public amd::EmbeddedObject {
|
||||
size_t globalVariablePreferredTotalSize_;
|
||||
//! Driver store location
|
||||
char driverStore_[200];
|
||||
//! Device ID
|
||||
uint32_t pcieDeviceId_;
|
||||
//! Revision ID
|
||||
uint32_t pcieRevisionId_;
|
||||
};
|
||||
|
||||
//! Device settings
|
||||
|
||||
@@ -35,6 +35,11 @@ public:
|
||||
virtual void* AllocDmaBuffer(
|
||||
hsa_agent_t agent, size_t size, void** host_ptr) const override;
|
||||
virtual void FreeDmaBuffer(void* ptr) const override;
|
||||
virtual void GetAsicIdAndRevisionId(uint32_t* asic_id, uint32_t* rev_id) const override
|
||||
{
|
||||
*asic_id = gpu_info_.asic_id;
|
||||
*rev_id = gpu_info_.pci_rev_id;
|
||||
}
|
||||
|
||||
private:
|
||||
static void* lib_drm_handle_;
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
virtual void* AllocDmaBuffer(hsa_agent_t agent, size_t size, void** host_ptr) const = 0;
|
||||
virtual void FreeDmaBuffer(void* ptr) const = 0;
|
||||
virtual void GetAsicIdAndRevisionId(uint32_t* asic_id, uint32_t* rev_id) const = 0;
|
||||
|
||||
IProDevice() {}
|
||||
virtual ~IProDevice() {}
|
||||
|
||||
@@ -568,6 +568,7 @@ bool Device::create() {
|
||||
if (pro_device_ != nullptr) {
|
||||
pro_ena_ = true;
|
||||
settings_->enableExtension(ClAMDLiquidFlash);
|
||||
pro_device_->GetAsicIdAndRevisionId(&info_.pcieDeviceId_, &info_.pcieRevisionId_);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user