diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp --- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp @@ -469,16 +469,6 @@ KernelArgsTy &KernelArgs, uint32_t NumThreads, uint64_t NumBlocks) const override; - /// The default number of blocks is common to the whole device. - uint32_t getDefaultNumBlocks(GenericDeviceTy &GenericDevice) const override { - return GenericDevice.getDefaultNumBlocks(); - } - - /// The default number of threads is common to the whole device. - uint32_t getDefaultNumThreads(GenericDeviceTy &GenericDevice) const override { - return GenericDevice.getDefaultNumThreads(); - } - /// Get group and private segment kernel size. uint32_t getGroupSize() const { return GroupSize; } uint32_t getPrivateSize() const { return PrivateSize; } diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h @@ -318,10 +318,6 @@ llvm::SmallVectorImpl &Args, llvm::SmallVectorImpl &Ptrs) const; - /// Get the default number of threads and blocks for the kernel. - virtual uint32_t getDefaultNumThreads(GenericDeviceTy &Device) const = 0; - virtual uint32_t getDefaultNumBlocks(GenericDeviceTy &Device) const = 0; - /// Get the number of threads and blocks for the kernel based on the /// user-defined threads and block clauses. uint32_t getNumThreads(GenericDeviceTy &GenericDevice, diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp @@ -227,8 +227,7 @@ Error GenericKernelTy::init(GenericDeviceTy &GenericDevice, DeviceImageTy &Image) { - PreferredNumThreads = getDefaultNumThreads(GenericDevice); - + PreferredNumThreads = GenericDevice.getDefaultNumThreads(); MaxNumThreads = GenericDevice.getThreadLimit(); return initImpl(GenericDevice, Image); @@ -318,7 +317,7 @@ return std::min(NumTeamsClause[0], GenericDevice.getBlockLimit()); } - uint64_t DefaultNumBlocks = getDefaultNumBlocks(GenericDevice); + uint64_t DefaultNumBlocks = GenericDevice.getDefaultNumBlocks(); uint64_t TripCountNumBlocks = std::numeric_limits::max(); if (LoopTripCount > 0) { if (isSPMDMode()) { diff --git a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp --- a/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp @@ -66,16 +66,6 @@ uint64_t NumBlocks, KernelArgsTy &KernelArgs, void *Args, AsyncInfoWrapperTy &AsyncInfoWrapper) const override; - /// The default number of blocks is common to the whole device. - uint32_t getDefaultNumBlocks(GenericDeviceTy &GenericDevice) const override { - return GenericDevice.getDefaultNumBlocks(); - } - - /// The default number of threads is common to the whole device. - uint32_t getDefaultNumThreads(GenericDeviceTy &GenericDevice) const override { - return GenericDevice.getDefaultNumThreads(); - } - private: /// The CUDA kernel function to execute. CUfunction Func; diff --git a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp --- a/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp +++ b/openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp @@ -84,10 +84,6 @@ return Plugin::success(); } - /// Get the default number of blocks and threads for the kernel. - uint32_t getDefaultNumBlocks(GenericDeviceTy &) const override { return 1; } - uint32_t getDefaultNumThreads(GenericDeviceTy &) const override { return 1; } - private: /// The kernel function to execute. void (*Func)(void);