From 08f3126f6c47a172e652d4a7152d953ba050645b Mon Sep 17 00:00:00 2001 From: Tony Tye Date: Sun, 10 Jan 2021 02:49:42 +0000 Subject: [PATCH] Make roc::Device::getBackendDevice non-virtual Make roc::Device::getBackendDevice non-virtual and only defined by roc::Device and not roc::NullDevice. It is only meaningful for an online device. Change-Id: Ic333a3a42f650bea524e80dab587a34f1353e593 --- rocclr/device/rocm/rocdevice.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rocclr/device/rocm/rocdevice.hpp b/rocclr/device/rocm/rocdevice.hpp index 4b47bd671b..30db05e573 100644 --- a/rocclr/device/rocm/rocdevice.hpp +++ b/rocclr/device/rocm/rocdevice.hpp @@ -127,12 +127,6 @@ class NullDevice : public amd::Device { //! Construct an HSAIL program object from the ELF assuming it is valid virtual device::Program* createProgram(amd::Program& owner, amd::option::Options* options = nullptr); const AMDDeviceInfo& deviceInfo() const { return deviceInfo_; } - //! Gets the backend device for the Null device type - virtual hsa_agent_t getBackendDevice() const { - ShouldNotReachHere(); - const hsa_agent_t kInvalidAgent = {0}; - return kInvalidAgent; - } // List of dummy functions which are disabled for NullDevice @@ -309,7 +303,7 @@ class Device : public NullDevice { static bool loadHsaModules(); - virtual hsa_agent_t getBackendDevice() const { return _bkendDevice; } + hsa_agent_t getBackendDevice() const { return _bkendDevice; } const hsa_agent_t &getCpuAgent() const { return cpu_agent_; } // Get the CPU agent with the least NUMA distance to this GPU static const std::vector& getGpuAgents() { return gpu_agents_; }