#ifndef XPU_ZE_ENGINE_FACTORY_HPP
#define XPU_ZE_ENGINE_FACTORY_HPP
#include "common/engine.hpp"
#include "xpu/ze/utils.hpp"
namespace dnnl {
namespace impl {
namespace xpu {
namespace ze {
class engine_factory_t : public impl::engine_factory_t {
public:
engine_factory_t(engine_kind_t engine_kind);
~engine_factory_t() override = default;
size_t count() const override;
status_t engine_create(
impl::engine_t **engine, size_t index) const override;
status_t engine_create(impl::engine_t **engine, ze_driver_handle_t adriver,
ze_device_handle_t adevice, ze_context_handle_t acontext,
size_t index) const;
private:
engine_factory_t() = delete;
DNNL_DISALLOW_COPY_AND_ASSIGN(engine_factory_t);
};
inline std::unique_ptr<engine_factory_t> get_engine_factory(
engine_kind_t engine_kind) {
return std::unique_ptr<engine_factory_t>(new engine_factory_t(engine_kind));
}
} } } }
#endif