rocr: Make Open() and Close() virtual in Driver
Change-Id: Iac054c08383b080ca2b2ec6d65019bf2f083b763
This commit is contained in:
committed by
David Yat Sin
parent
8bbc44d51b
commit
77fa5af618
@@ -68,6 +68,8 @@ public:
|
||||
|
||||
hsa_status_t Init() override;
|
||||
hsa_status_t QueryKernelModeDriver(core::DriverQuery query) override;
|
||||
hsa_status_t Open() override;
|
||||
hsa_status_t Close() override;
|
||||
hsa_status_t GetAgentProperties(core::Agent &agent) const override;
|
||||
hsa_status_t
|
||||
GetMemoryProperties(uint32_t node_id,
|
||||
|
||||
@@ -142,6 +142,8 @@ public:
|
||||
std::unordered_map<uint32_t, void*>& GetHandleMappings();
|
||||
std::unordered_map<void*, uint32_t>& GetAddrMappings();
|
||||
|
||||
hsa_status_t Open() override;
|
||||
hsa_status_t Close() override;
|
||||
hsa_status_t GetAgentProperties(core::Agent &agent) const override;
|
||||
hsa_status_t
|
||||
GetMemoryProperties(uint32_t node_id,
|
||||
|
||||
@@ -84,11 +84,11 @@ class Driver {
|
||||
|
||||
/// @brief Open a connection to the driver using name_.
|
||||
/// @retval HSA_STATUS_SUCCESS if the driver was opened successfully.
|
||||
hsa_status_t Open();
|
||||
virtual hsa_status_t Open() = 0;
|
||||
|
||||
/// @brief Close a connection to the open driver using fd_.
|
||||
/// @retval HSA_STATUS_SUCCESS if the driver was opened successfully.
|
||||
hsa_status_t Close();
|
||||
virtual hsa_status_t Close() = 0;
|
||||
|
||||
/// @brief Get driver version information.
|
||||
/// @retval DriverVersionInfo containing the driver's version information.
|
||||
|
||||
Reference in New Issue
Block a user