24.02.1
|
Provide context necessary for the creation and configuration of a workload e.g. More...
#include <GpuWorkloadContext.h>
Data Structures | |
class | Impl |
Internal implementation of workload context. More... | |
Public Member Functions | |
GpuWorkloadContext (CLCompileContext *cl_compile_context) | |
Constructor. More... | |
~GpuWorkloadContext () | |
Destructor. More... | |
GpuWorkloadContext (const GpuWorkloadContext &config)=delete | |
Prohibit instances of this class to be copy constructed. More... | |
GpuWorkloadContext & | operator= (const GpuWorkloadContext &config)=delete |
Prohibit instances of this class to be copied. More... | |
GpuWorkloadContext (GpuWorkloadContext &&config) | |
Allow instances of this class to be move constructed. More... | |
GpuWorkloadContext & | operator= (GpuWorkloadContext &&config) |
Allow instances of this class to be moved. More... | |
GpuLanguage | gpu_language () const |
Get GpuLanguage of the context. More... | |
GpuTarget | gpu_target () const |
Get GpuTarget of the context. More... | |
const CLCompileContext * | cl_compile_context () const |
Get CLCompileContext If the gpu language is not OpenCL, then return nullptr. More... | |
template<typename... TArgs> | |
ITensorInfo * | create_tensor_info (TArgs &&...args) |
Create a TensorInfo associated with the workload context. More... | |
Impl & | implementation () |
Get the internal implementation. More... | |
const Impl & | implementation () const |
Get the internal implementation. More... | |
Provide context necessary for the creation and configuration of a workload e.g.
gpu targets and capabilities, cl::Device for querying OpenCl extensions. Both can affect how a kernel is generated
This context is shared between different operators within a sketch, and has to stay valid for the entire workload creation session. This context may also be shared between different sketches.
This class only contains information for workload creation, but not for runtime (e.g. cl::Queue for enqueueing the kernels)
Definition at line 57 of file GpuWorkloadContext.h.
GpuWorkloadContext | ( | CLCompileContext * | cl_compile_context | ) |
Constructor.
Definition at line 37 of file GpuWorkloadContext.cpp.
References arm_compute::experimental::dynamic_fusion::OpenCL.
|
default |
Destructor.
|
delete |
Prohibit instances of this class to be copy constructed.
|
default |
Allow instances of this class to be move constructed.
const CLCompileContext * cl_compile_context | ( | ) | const |
Get CLCompileContext If the gpu language is not OpenCL, then return nullptr.
Definition at line 58 of file GpuWorkloadContext.cpp.
Referenced by ClWorkloadRuntime::configure(), GpuSoftmax::create_op(), GpuReshape::create_op(), and GpuPool2d::create_op().
|
inline |
Create a TensorInfo associated with the workload context.
Definition at line 88 of file GpuWorkloadContext.h.
References GemmTuner::args, and tensor_info.
GpuLanguage gpu_language | ( | ) | const |
Get GpuLanguage of the context.
Definition at line 53 of file GpuWorkloadContext.cpp.
Referenced by ClWorkloadRuntime::configure().
GpuTarget gpu_target | ( | ) | const |
Get GpuTarget of the context.
Definition at line 48 of file GpuWorkloadContext.cpp.
Referenced by GpuDepthwiseConv2d::create_op(), and GpuConv2d::create_op().
const GpuWorkloadContext::Impl & implementation | ( | ) |
Get the internal implementation.
Definition at line 68 of file GpuWorkloadContext.cpp.
Referenced by GpuWorkloadSketch::Implementation::create_auxiliary_tensor(), GpuWorkloadSketch::Implementation::create_virtual_tensor(), GpuWorkloadSketch::Implementation::generate_source_code(), and GpuWorkloadSketch::Implementation::get_tensor_info().
const Impl& implementation | ( | ) | const |
Get the internal implementation.
|
delete |
Prohibit instances of this class to be copied.
|
default |
Allow instances of this class to be moved.