result.ocl_sources_dumps_dir = conf.sources_dumps_dir;
result.priority_mode = static_cast<cldnn_priority_mode_type>(conf.priority_mode);
result.throttle_mode = static_cast<cldnn_throttle_mode_type>(conf.throttle_mode);
+ result.user_context = static_cast<cl::Context*>(conf.context);
+ result.tuning_cache_path = conf.tuning_cache_path;
return result;
}
, _memory_pool(*this)
{ }
+engine_impl::~engine_impl()
+{
+ /*
+ Engine, which is main owner of context deallocate events pool manually, because
+ of the event_impl <-> gpu_toolkit dependencies.
+ */
+ _context->release_events_pool();
+}
+
memory_impl::ptr engine_impl::allocate_memory(layout layout)
{
return _memory_pool.get_memory(layout);
event_impl::ptr engine_impl::create_user_event(bool set)
{
try {
- return{ new gpu::user_event(get_context(), set), false };
+ return _context->create_user_event(set);
}
catch (cl::Error const& err) {
throw gpu::ocl_error(err);
get_context()->release_pending_memory();
}
-program_impl::ptr engine_impl::build_program(const topology_impl& topology, const build_options& options, bool is_internal)
+program_impl::ptr engine_impl::build_program(const topology_impl& topology, const build_options& options, bool is_internal, bool no_optimizations)
+{
+ return{ new program_impl(*this, topology, options, is_internal, no_optimizations), false };
+}
+
+program_impl::ptr engine_impl::build_program(const std::set<std::shared_ptr<program_node>>& nodes, const build_options& options, bool is_internal)
+{
+ return{ new program_impl(*this, nodes, options, is_internal), false };
+}
+
+network_impl::ptr engine_impl::build_network(const topology_impl& topology, const build_options& options, bool is_internal)
{
- return{ new program_impl(*this, topology, options, is_internal), false };
+ return{ new network_impl(*this, topology, options, is_internal), false };
}
-network_impl::ptr engine_impl::build_network(const topology_impl& topology, const build_options& options, bool internal_network)
+network_impl::ptr engine_impl::build_network(const std::set<std::shared_ptr<program_node>>& nodes, const build_options& options, bool is_internal)
{
- return{ new network_impl(*this, topology, options, internal_network), false };
+ return{ new network_impl(*this, nodes, options, is_internal), false };
}
-network_impl::ptr engine_impl::allocate_network(const program_impl& program)
+network_impl::ptr engine_impl::allocate_network(const program_impl& program, bool is_internal)
{
- return{ new network_impl(program), false };
+ return{ new network_impl(program, is_internal), false };
}
void engine_impl::wait_for_events(std::vector<event_impl::ptr> const & events)