MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / CLRuntimeContext

Method CLRuntimeContext

src/runtime/CL/CLRuntimeContext.cpp:32–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace arm_compute
31{
32CLRuntimeContext::CLRuntimeContext()
33 : _gpu_owned_scheduler(std::make_unique<CLScheduler>()),
34 _gpu_scheduler(_gpu_owned_scheduler.get()),
35 _symbols(),
36 _backend_type()
37{
38 _symbols.load_default();
39 auto ctx_dev_err = create_opencl_context_and_device(_backend_type);
40 ARM_COMPUTE_ERROR_ON_MSG(std::get<2>(ctx_dev_err) != CL_SUCCESS, "Failed to create OpenCL context");
41 auto ctx = std::get<0>(ctx_dev_err);
42 auto dev = std::get<1>(ctx_dev_err);
43 cl::CommandQueue queue = cl::CommandQueue(ctx, dev);
44 _gpu_owned_scheduler->init(ctx, queue, dev, &_tuner);
45 const std::string cl_kernels_folder("./cl_kernels");
46 CLKernelLibrary::get().init(cl_kernels_folder, ctx, dev);
47}
48
49CLKernelLibrary &CLRuntimeContext::kernel_library()
50{

Callers

nothing calls this directly

Calls 5

load_defaultMethod · 0.80
CommandQueueClass · 0.50
getMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected