diff options
Diffstat (limited to 'offload/plugins-nextgen/common/include/PluginInterface.h')
| -rw-r--r-- | offload/plugins-nextgen/common/include/PluginInterface.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/offload/plugins-nextgen/common/include/PluginInterface.h b/offload/plugins-nextgen/common/include/PluginInterface.h index f9dcdea..2135e06 100644 --- a/offload/plugins-nextgen/common/include/PluginInterface.h +++ b/offload/plugins-nextgen/common/include/PluginInterface.h @@ -819,10 +819,6 @@ struct GenericDeviceTy : public DeviceAllocatorTy { Error unloadBinary(DeviceImageTy *Image); virtual Error unloadBinaryImpl(DeviceImageTy *Image) = 0; - /// Setup the global device memory pool, if the plugin requires one. - Error setupDeviceMemoryPool(GenericPluginTy &Plugin, DeviceImageTy &Image, - uint64_t PoolSize); - // Setup the RPC server for this device if needed. This may not run on some // plugins like the CPU targets. By default, it will not be executed so it is // up to the target to override this using the shouldSetupRPCServer function. @@ -1067,6 +1063,16 @@ struct GenericDeviceTy : public DeviceAllocatorTy { virtual Error getDeviceStackSize(uint64_t &V) = 0; + virtual bool hasDeviceHeapSize() { return false; } + virtual Error getDeviceHeapSize(uint64_t &V) { + return Plugin::error(error::ErrorCode::UNSUPPORTED, + "%s not supported by platform", __func__); + } + virtual Error setDeviceHeapSize(uint64_t V) { + return Plugin::error(error::ErrorCode::UNSUPPORTED, + "%s not supported by platform", __func__); + } + /// Returns true if current plugin architecture is an APU /// and unified_shared_memory was not requested by the program. bool useAutoZeroCopy(); @@ -1159,12 +1165,6 @@ private: /// plugin can implement the setters as no-op and setting the output /// value to zero for the getters. virtual Error setDeviceStackSize(uint64_t V) = 0; - virtual Error getDeviceHeapSize(uint64_t &V) = 0; - virtual Error setDeviceHeapSize(uint64_t V) = 0; - - /// Indicate whether the device should setup the global device memory pool. If - /// false is return the value on the device will be uninitialized. - virtual bool shouldSetupDeviceMemoryPool() const { return true; } /// Indicate whether or not the device should setup the RPC server. This is /// only necessary for unhosted targets like the GPU. @@ -1251,10 +1251,6 @@ protected: /// Internal representation for OMPT device (initialize & finalize) std::atomic<bool> OmptInitialized; #endif - -private: - DeviceMemoryPoolTy DeviceMemoryPool = {nullptr, 0}; - DeviceMemoryPoolTrackingTy DeviceMemoryPoolTracking = {0, 0, ~0U, 0}; }; /// Class implementing common functionalities of offload plugins. Each plugin |
