Skip to content

Commit

Permalink
Rename folder and files
Browse files Browse the repository at this point in the history
  • Loading branch information
pereanub committed Oct 15, 2024
1 parent 07127c0 commit 3721f61
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_npu/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_subdirectory(utils)
add_subdirectory(al)

if(ENABLE_DRIVER_COMPILER_ADAPTER AND ENABLE_ZEROAPI_BACKEND)
add_subdirectory(compiler)
add_subdirectory(compiler_adapter)
endif()

if(ENABLE_ZEROAPI_BACKEND)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

#include <ze_graph_ext.h>

#include "cid_compiler_adapter.hpp"
#include "igraph.hpp"
#include "izero_compiler_in_driver.hpp"
#include "npu.hpp"


namespace intel_npu {

class CidGraph final : public IGraph {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <ze_graph_ext.h>

#include "cid_compiler_adapter.hpp"
#include "igraph.hpp"
#include "npu.hpp"
#include "zero_backend.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "icompiler_adapter.hpp"
#include "intel_npu/utils/logger/logger.hpp"
#include "izero_compiler_in_driver.hpp"
#include "npu.hpp"
#include "zero_compiler_in_driver.hpp"

namespace intel_npu {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#pragma once

#include <ze_graph_ext.h>

#include "intel_npu/utils/logger/logger.hpp"
#include "npu.hpp"

namespace intel_npu {

class ILevelZeroCompilerInDriver {
public:
virtual ov::SupportedOpsMap query(const std::shared_ptr<const ov::Model>& model, const Config& config) const = 0;
virtual ze_graph_handle_t compile(const std::shared_ptr<const ov::Model>& model, const Config& config) const = 0;
virtual ze_graph_handle_t parse(const std::vector<uint8_t>& network, const Config& config) const = 0;

virtual NetworkMetadata getNetworkMeta(ze_graph_handle_t graphHandle) const = 0;

virtual _ze_result_t release(ze_graph_handle_t graphHandle) = 0;

virtual CompiledNetwork getCompiledNetwork(ze_graph_handle_t graphHandle) = 0;

virtual void setArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const = 0;

virtual void graphInitialie(ze_graph_handle_t graphHandle, const Config& config) const = 0;
};

} // namespace intel_npu
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

#include "intel_npu/utils/logger/logger.hpp"
#include "intel_npu/utils/zero/zero_api.hpp"
#include "izero_compiler_in_driver.hpp"
#include "zero_executor.hpp"


namespace intel_npu {

using SerializedIR = std::pair<size_t, std::shared_ptr<uint8_t>>;
Expand Down Expand Up @@ -46,23 +48,6 @@ using SerializedIR = std::pair<size_t, std::shared_ptr<uint8_t>>;
std::is_same<T, ze_graph_dditable_ext_1_4_t>::value || std::is_same<T, ze_graph_dditable_ext_1_5_t>::value || \
std::is_same<T, ze_graph_dditable_ext_1_6_t>::value)

class ILevelZeroCompilerInDriver {
public:
virtual ov::SupportedOpsMap query(const std::shared_ptr<const ov::Model>& model, const Config& config) const = 0;
virtual ze_graph_handle_t compile(const std::shared_ptr<const ov::Model>& model, const Config& config) const = 0;
virtual ze_graph_handle_t parse(const std::vector<uint8_t>& network, const Config& config) const = 0;

virtual NetworkMetadata getNetworkMeta(ze_graph_handle_t graphHandle) const = 0;

virtual _ze_result_t release(ze_graph_handle_t graphHandle) = 0;

virtual CompiledNetwork getCompiledNetwork(ze_graph_handle_t graphHandle) = 0;

virtual void setArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const = 0;

virtual void graphInitialie(ze_graph_handle_t graphHandle, const Config& config) const = 0;
};

/**
* Adapter to use CiD through ZeroAPI
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

#include "cip_graph.hpp"

#include "intel_npu/utils/zero/zero_result.hpp"
#include "zero_backend.hpp"
#include "zero_device.hpp"
#include "zero_init.hpp"
#include "zero_wrappers.hpp"

namespace intel_npu {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//

#include "cid_compiler_adapter.hpp"
#include "driver_compiler_adapter.hpp"

#include <ze_graph_ext.h>

Expand All @@ -12,6 +12,7 @@
#include "intel_npu/utils/zero/zero_result.hpp"
#include "ze_intel_npu_uuid.h"
#include "zero_backend.hpp"
#include "zero_compiler_in_driver.hpp"
#include "zero_device.hpp"
#include "zero_init.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
//

#include "cip_compiler_adapter.hpp"
#include "plugin_compiler_adapter.hpp"

#include <ze_graph_ext.h>

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_npu/src/plugin/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

#include <fstream>

#include "cid_compiler_adapter.hpp"
#include "cip_compiler_adapter.hpp"
#include "compiled_model.hpp"
#include "device_helpers.hpp"
#include "driver_compiler_adapter.hpp"
#include "igraph.hpp"
#include "intel_npu/al/config/common.hpp"
#include "intel_npu/al/config/compiler.hpp"
Expand All @@ -21,6 +20,7 @@
#include "openvino/op/parameter.hpp"
#include "openvino/runtime/intel_npu/properties.hpp"
#include "openvino/runtime/properties.hpp"
#include "plugin_compiler_adapter.hpp"
#include "remote_context.hpp"

using namespace intel_npu;
Expand Down

0 comments on commit 3721f61

Please sign in to comment.