aboutsummaryrefslogtreecommitdiff
path: root/offload/plugins-nextgen/host/src/rtl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'offload/plugins-nextgen/host/src/rtl.cpp')
-rw-r--r--offload/plugins-nextgen/host/src/rtl.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/offload/plugins-nextgen/host/src/rtl.cpp b/offload/plugins-nextgen/host/src/rtl.cpp
index ed52135..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,6 +303,13 @@ 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,
@@ -320,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;