diff options
Diffstat (limited to 'offload/plugins-nextgen/host/src')
-rw-r--r-- | offload/plugins-nextgen/host/src/rtl.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/offload/plugins-nextgen/host/src/rtl.cpp b/offload/plugins-nextgen/host/src/rtl.cpp index d950572..0a2bb5a 100644 --- a/offload/plugins-nextgen/host/src/rtl.cpp +++ b/offload/plugins-nextgen/host/src/rtl.cpp @@ -114,6 +114,14 @@ struct GenELF64KernelTy : public GenericKernelTy { return Plugin::success(); } + /// Return maximum block size for maximum occupancy + Expected<uint64_t> maxGroupSize(GenericDeviceTy &Device, + uint64_t DynamicMemSize) const override { + return Plugin::error( + ErrorCode::UNSUPPORTED, + "occupancy calculations are not implemented for the host device"); + } + private: /// The kernel function to execute. void (*Func)(void); @@ -295,9 +303,17 @@ struct GenELF64DeviceTy : public GenericDeviceTy { "dataExchangeImpl not supported"); } + /// Insert a data fence between previous data operations and the following + /// operations. This is a no-op for Host devices as operations inserted into + /// a queue are in-order. + Error dataFence(__tgt_async_info *Async) override { + return Plugin::success(); + } + /// All functions are already synchronous. No need to do anything on this /// synchronization function. - Error synchronizeImpl(__tgt_async_info &AsyncInfo) override { + Error synchronizeImpl(__tgt_async_info &AsyncInfo, + bool ReleaseQueue) override { return Plugin::success(); } @@ -319,6 +335,12 @@ struct GenELF64DeviceTy : public GenericDeviceTy { "initDeviceInfoImpl not supported"); } + Error enqueueHostCallImpl(void (*Callback)(void *), void *UserData, + AsyncInfoWrapperTy &AsyncInfo) override { + Callback(UserData); + return Plugin::success(); + }; + /// This plugin does not support the event API. Do nothing without failing. Error createEventImpl(void **EventPtrStorage) override { *EventPtrStorage = nullptr; @@ -333,6 +355,9 @@ struct GenELF64DeviceTy : public GenericDeviceTy { AsyncInfoWrapperTy &AsyncInfoWrapper) override { return Plugin::success(); } + Expected<bool> hasPendingWorkImpl(AsyncInfoWrapperTy &AsyncInfo) override { + return true; + } Error syncEventImpl(void *EventPtr) override { return Plugin::success(); } /// Print information about the device. |