Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dryon execution ba681ed72d #18

Closed
wants to merge 5 commits into from
Closed

Conversation

DanLiu2Intel
Copy link
Owner

Details:

  • item1
  • ...

Tickets:

  • ticket-id

@@ -413,6 +421,10 @@ static bool parseCommandLine(int* argc, char*** argv) {
throw std::invalid_argument("Target device name is required");
}

if (!FLAGS_dryon.empty()) {
intel_npu::update_dryon_flag(true);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need test the flag status.
Does there need a function to check flag status?

# find_package(openvino::npu_al) #感觉这部分不需要使用
file(GLOB_RECURSE DRYONEXECUTION_HEADERS ${PROJECT_SOURCE_DIR}/src/plugins/intel_npu/src/*.hpp)
message("==========2============")
message("@@@@${DRYONEXECUTION_HEADERS}@@@@")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this part

@@ -15,16 +20,21 @@ endif()
#
# Define the target
#

message("${CMAKE_CURRENT_SOURCE_DIR} is what???")
message("${PROJECT_SOURCE_DIR} is what???")
Copy link
Owner Author

@DanLiu2Intel DanLiu2Intel Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this part

ov_add_target(ADD_CPPLINT
TYPE EXECUTABLE
NAME ${TARGET_NAME}
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
INCLUDES
/home/dl5w0502/vpux/openvino/src/plugins/intel_npu/src/al/include/
${PROJECT_SOURCE_DIR}/src/plugins/intel_npu/src/al/include/
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep one in here. test which one is useful.

@@ -0,0 +1,19 @@
#pragma once


Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
#include "update_dryon_flag.hpp"

{false,
ov::PropertyMutability::RO,
[&](const Config&) {
return _metrics->GetInternalSupportedProperties();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part can be replaced by static std::vector<ov::PropertyName> Metrics_internalSupportedProperties = {ov::internal::caching_properties.name()};

is not it?


#include <iostream>
#include "update_dryon_flag.hpp"
#include "/home/dl5w0502/vpux/openvino/src/plugins/intel_npu/src/plugin/include/plugin.hpp"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part need to be fix with relative path.



#include <iostream>
#include "/home/dl5w0502/vpux/openvino/src/plugins/intel_npu/src/plugin/include/plugin.hpp"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part need to be fix with relative path.

@@ -14,6 +14,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME npu_al)
target_include_directories(${TARGET_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# ${CMAKE_CURRENT_SOURCE_DIR}/../plugin/include
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can add relative path of plugin/include?

@DanLiu2Intel
Copy link
Owner Author

DanLiu2Intel commented Aug 7, 2024

To be implemented: 1)new compile_tool for dry on execution (Low reuse)
2)pass extra param to OV_DEFINE_PLUGIN_CREATE_FUNCTION(Plugin, version) (compile_tool how to pass extra param to here? the method is similar to this method. so this method not make sense.)
plugin() use extra param to initilize inside class plugin_imp. and inherit issue.
3)the update function is this position suitable?

extern bool flag_Dryon;
bool get_dryon_flag();
void update_dryon_flag(bool flag);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
}
} // namespace intel_npu



#include <iostream>
#include "update_dryon_flag.hpp"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
#include "update_dryon_flag.hpp"

Comment on lines +9 to +11
bool get_dryon_flag(){
if(flag_Dryon)
std::cout << " (get)!!!! true"<< std::endl;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
bool get_dryon_flag(){
if(flag_Dryon)
std::cout << " (get)!!!! true"<< std::endl;
bool get_dryon_flag() {
if (flag_Dryon)
std::cout << " (get)!!!! true" << std::endl;

if(flag_Dryon)
std::cout << " (get)!!!! true"<< std::endl;
else
std::cout << " (get)!!!! flase"<< std::endl;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
std::cout << " (get)!!!! flase"<< std::endl;
std::cout << " (get)!!!! flase" << std::endl;

Comment on lines +19 to +20
if(flag_Dryon)
std::cout << " !!!! true"<< std::endl;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
if(flag_Dryon)
std::cout << " !!!! true"<< std::endl;
if (flag_Dryon)
std::cout << " !!!! true" << std::endl;

Comment on lines +22 to +23
std::cout << " !!!! flase"<< std::endl;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
std::cout << " !!!! flase"<< std::endl;
std::cout << " !!!! flase" << std::endl;

Comment on lines +26 to +27
if(flag_Dryon)
std::cout << " !!!! true"<< std::endl;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
if(flag_Dryon)
std::cout << " !!!! true"<< std::endl;
if (flag_Dryon)
std::cout << " !!!! true" << std::endl;

Comment on lines +29 to +30
std::cout << " !!!! flase"<< std::endl;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
std::cout << " !!!! flase"<< std::endl;
std::cout << " !!!! flase" << std::endl;

std::printf(" --------after update, %d\n", get_dryon_flag());
}

}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
}
} // namespace intel_npu

@@ -54,6 +53,10 @@ class Plugin : public ov::IPlugin {
const ov::AnyMap& properties) const override;

private:
void init();
void initPluginWithoutBackend();
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>> Generate_supportedPropert();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[reviewdog-suggester] reported by reviewdog 🐶

Suggested change
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>> Generate_supportedPropert();
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>>
Generate_supportedPropert();

@DanLiu2Intel
Copy link
Owner Author

Why is the flag not passed correctly
dl5w0502@dl-desk:~/vpux/openvino/bin/intel64/Release$ ./compile_tool -m /home/dl5w0502/vpux/myCID/data/add_abc.xml -d NPU -c /home/dl5w0502/vpux/openvino/testConfigandData/MLIR.conf -dryon true
OpenVINO Runtime version ......... 2024.4.0
Build ........... 2024.4.0-16207-7c414c5e88b-DryonExecution_ba681ed72d
Parsing command-line arguments
(get)!!!! flase
,(1), compile_tool fl=0
(get)!!!! flase
--------before update, 0
!!!! flase
!!!! true
(get)!!!! true
--------after update, 1
(get)!!!! true
,(2), compile_tool fl=1
Checking FLAGS_LOG_LEVEL
Reading model
Performing reshape
Configuring model pre & post processing
Printing Input and Output Info from model
Network inputs:
A : f32 / [...] / [1]
B : f32 / [...] / [1]
C : f32 / [...] / [1]
Network outputs:
Y/sink_port_0 : f32 / [...] / [1]
Parsing configuration file
Compiling model
(get)!!!! flase
flag_Dryon is flase
(get)!!!! flase
=========>init plugin normally
(get)!!!! flase
<compile_tool222>flag_Dryon is flase
(get)!!!! flase
=========>compile_model normally

Writing into file - add_abc.blob
Done. LoadNetwork time elapsed: 160 ms

Copy link

This PR will be closed in a week because of 2 weeks of no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant