From c1ea70b539260cade27af25f751d48c9b908b98e Mon Sep 17 00:00:00 2001 From: Tony Tye Date: Sun, 10 Jan 2021 02:26:12 +0000 Subject: [PATCH] Make roc::Device constructor and create() method private Make roc::Device constructor and create() method private as creating devices is performed by the factory static methods. Change-Id: Ifa2edb8ec645b4ce6070c4aef355b9ef88294cf1 --- rocclr/device/rocm/rocdevice.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rocclr/device/rocm/rocdevice.hpp b/rocclr/device/rocm/rocdevice.hpp index 7e4847e625..4b47bd671b 100644 --- a/rocclr/device/rocm/rocdevice.hpp +++ b/rocclr/device/rocm/rocdevice.hpp @@ -309,10 +309,6 @@ class Device : public NullDevice { static bool loadHsaModules(); - bool create(); - - //! Construct a new physical HSA device - Device(hsa_agent_t bkendDevice); virtual 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 @@ -501,6 +497,11 @@ class Device : public NullDevice { void getGlobalCUMask(std::string cuMaskStr); private: + bool create(); + + //! Construct a new physical HSA device + Device(hsa_agent_t bkendDevice); + bool SetSvmAttributesInt(const void* dev_ptr, size_t count, amd::MemoryAdvice advice, bool first_alloc = false, bool use_cpu = false) const; static constexpr hsa_signal_value_t InitSignalValue = 1;