24.02.1
|
OpenCL context implementation class. More...
#include <ClContext.h>
Public Member Functions | |
ClContext (const AclContextOptions *options) | |
Default Constructor. More... | |
const mlgo::MLGOHeuristics & | mlgo () const |
Extract MLGO heuristics. More... | |
::cl::Context | cl_ctx () |
Underlying cl context accessor. More... | |
::cl::Device | cl_dev () |
Underlying cl device accessor. More... | |
bool | set_cl_ctx (::cl::Context ctx) |
Update/inject an underlying cl context object. More... | |
ITensorV2 * | create_tensor (const AclTensorDescriptor &desc, bool allocate) override |
Create a tensor object. More... | |
IQueue * | create_queue (const AclQueueOptions *options) override |
Create a queue object. More... | |
std::tuple< IOperator *, StatusCode > | create_activation (const AclTensorDescriptor &src, const AclTensorDescriptor &dst, const AclActivationDescriptor &act, bool is_validate) override |
Public Member Functions inherited from IContext | |
IContext (Target target) | |
virtual | ~IContext () |
Virtual Destructor. More... | |
Target | type () const |
Target type accessor. More... | |
void | inc_ref () const |
Increment context refcount. More... | |
void | dec_ref () const |
Decrement context refcount. More... | |
int | refcount () const |
Reference counter accessor. More... | |
bool | is_valid () const |
Checks if an object is valid. More... | |
Additional Inherited Members | |
Data Fields inherited from AclContext_ | |
arm_compute::detail::Header | header {arm_compute::detail::ObjectType::Context, nullptr} |
OpenCL context implementation class.
Definition at line 39 of file ClContext.h.
|
explicit |
Default Constructor.
[in] | options | Creational options |
Definition at line 52 of file ClContext.cpp.
References CLKernelLibrary::context(), CLKernelLibrary::get(), CLKernelLibrary::get_device(), and AclContextOptions::kernel_config_file.
cl::Context cl_ctx | ( | ) |
Underlying cl context accessor.
Definition at line 68 of file ClContext.cpp.
cl::Device cl_dev | ( | ) |
Underlying cl device accessor.
Definition at line 73 of file ClContext.cpp.
|
overridevirtual |
Implements IContext.
Definition at line 58 of file ClActivation.cpp.
References ARM_COMPUTE_LOG_ERROR_ACL, arm_compute::detail::convert_to_activation_info(), arm_compute::detail::convert_to_legacy_tensor_info(), arm_compute::test::validation::dst, CLKernelLibrary::get(), arm_compute::test::validation::info, arm_compute::OutOfMemory, TensorInfo::set_is_resizable(), arm_compute::test::validation::src, arm_compute::test::validation::src_info, arm_compute::Success, arm_compute::UnsupportedConfig, and ClActivation::validate().
|
overridevirtual |
Create a queue object.
[in] | options | Queue options to be used |
Implements IContext.
Definition at line 99 of file ClContext.cpp.
|
overridevirtual |
Create a tensor object.
[in] | desc | Descriptor to use |
[in] | allocate | Flag to allocate tensor |
Implements IContext.
Definition at line 89 of file ClContext.cpp.
References tensor.
const mlgo::MLGOHeuristics & mlgo | ( | ) | const |
Extract MLGO heuristics.
Definition at line 63 of file ClContext.cpp.
Referenced by arm_compute::test::validation::TEST_CASE().
bool set_cl_ctx | ( | ::cl::Context | ctx | ) |
Update/inject an underlying cl context object.
[in] | ctx | Underlying cl context to be used |
Definition at line 78 of file ClContext.cpp.
References CLScheduler::get(), IContext::refcount(), and CLScheduler::set_context().