diff options
Diffstat (limited to 'src/gpu/cl/ClContext.h')
-rw-r--r-- | src/gpu/cl/ClContext.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/gpu/cl/ClContext.h b/src/gpu/cl/ClContext.h index e3f16b1c3f..2c67ccf4d2 100644 --- a/src/gpu/cl/ClContext.h +++ b/src/gpu/cl/ClContext.h @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef SRC_GPU_CL_CPUCONTEXT_H -#define SRC_GPU_CL_CPUCONTEXT_H +#ifndef SRC_GPU_CLCONTEXT_H +#define SRC_GPU_CLCONTEXT_H + +#include "arm_compute/core/CL/OpenCL.h" #include "src/common/IContext.h" #include "src/runtime/CL/mlgo/MLGOHeuristics.h" -#include "arm_compute/core/CL/OpenCL.h" - namespace arm_compute { namespace gpu @@ -44,6 +44,7 @@ public: * @param[in] options Creational options */ explicit ClContext(const AclContextOptions *options); + /** Extract MLGO heuristics * * @return Heuristics tree @@ -55,6 +56,13 @@ public: * @return the cl context used */ ::cl::Context cl_ctx(); + + /** Underlying cl device accessor + * + * @return the cl device used + */ + ::cl::Device cl_dev(); + /** Update/inject an underlying cl context object * * @warning Context will be able to set if the object doesn't have any pending reference to other objects @@ -65,12 +73,21 @@ public: */ bool set_cl_ctx(::cl::Context ctx); + // Inherrited methods overridden + ITensorV2 *create_tensor(const AclTensorDescriptor &desc, bool allocate) override; + IQueue *create_queue(const AclQueueOptions *options) override; + std::tuple<IOperator *, StatusCode> create_activation(const AclTensorDescriptor &src, + const AclTensorDescriptor &dst, + const AclActivationDescriptor &act, + bool is_validate) override; + private: mlgo::MLGOHeuristics _mlgo_heuristics; - ::cl::Context _cl_context; + ::cl::Context _cl_ctx; + ::cl::Device _cl_dev; }; } // namespace opencl } // namespace gpu } // namespace arm_compute -#endif /* SRC_GPU_CL_CPUCONTEXT_H */
\ No newline at end of file +#endif /* SRC_GPU_CLCONTEXT_H */ |