Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed May 31, 2021
2 parents 792c0be + 315c8d4 commit 54909df
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#pragma once

#include <string>
#include <ostream>

namespace slog {
/**
Expand Down Expand Up @@ -42,9 +43,7 @@ class LogStream {
* @brief A constructor. Creates an LogStream object
* @param prefix The prefix to print
*/
LogStream(const std::string& prefix, std::ostream& log_stream): _prefix(prefix), _new_line(true) {
_log_stream = &log_stream;
}
LogStream(const std::string& prefix, std::ostream& log_stream);

/**
* @brief A stream output operator to be used within the logger
Expand Down
4 changes: 4 additions & 0 deletions inference-engine/samples/common/utils/src/slog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ LogStream info("INFO", std::cout);
LogStream warn("WARNING", std::cout);
LogStream err("ERROR", std::cerr);

LogStream::LogStream(const std::string& prefix, std::ostream& log_stream): _prefix(prefix), _new_line(true) {
_log_stream = &log_stream;
}

// Specializing for LogStreamEndLine to support slog::endl
LogStream& LogStream::operator<<(const LogStreamEndLine& /*arg*/) {
_new_line = true;
Expand Down
1 change: 0 additions & 1 deletion ngraph/cmake/external_onnx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ macro(onnx_set_target_properties)

install(TARGETS onnx_proto
RUNTIME DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph
ARCHIVE DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph
LIBRARY DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph)

if (NGRAPH_EXPORT_TARGETS_ENABLE)
Expand Down
1 change: 0 additions & 1 deletion ngraph/cmake/external_protobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE "${PUSH_CMAKE_INTERPROCEDURAL_OPT

install(TARGETS ${Protobuf_LIBRARIES}
RUNTIME DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph
ARCHIVE DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph
LIBRARY DESTINATION ${NGRAPH_INSTALL_LIB} COMPONENT ngraph)
if (NGRAPH_EXPORT_TARGETS_ENABLE)
export(TARGETS ${Protobuf_LIBRARIES} NAMESPACE ngraph:: APPEND FILE "${NGRAPH_TARGETS_FILE}")
Expand Down
26 changes: 18 additions & 8 deletions scripts/install_dependencies/install_NEO_OCL_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Download and installs the Intel® Graphics Compute Runtime for OpenCL™ Driver
Available options:
-y Replace the currently installed driver with the newer version.
-a, --auto Auto-mode for detecting best driver for current OS and hardware.
-d, --install_driver Manually select driver version to one of available to install drivers.
Default value: $INSTALL_DRIVER_VERSION
Available to install drivers: ${AVAILABLE_DRIVERS[*]}
Expand Down Expand Up @@ -59,6 +60,10 @@ do
-y)
agreement=true
shift
;;
-a|--auto)
auto_mode=true
shift
;;
--no_numa)
no_numa=true
Expand Down Expand Up @@ -523,14 +528,19 @@ check_specific_generation()
if [[ ! -z "$specific_generation" && "$INSTALL_DRIVER_VERSION" != '20.35.17767' ]]; then
echo "$(basename "$0"): Detected 10th generation Intel® Core™ processor (formerly Ice Lake) or 11th generation Intel® Core™ processor (formerly Tiger Lake)."
echo "Driver version 20.35.17767 is going to be installed to fully utilize hardware features and performance."
while true; do
read -p "You are still able to use the older version 19.41.14441. Use the older driver? (y/n) [n] " yn
yn=${yn:=n}
case $yn in
[Yy]*) return 0 ;;
[Nn]*) INSTALL_DRIVER_VERSION='20.35.17767' && return 0 ;;
esac
done
if [ "$auto_mode" == true ]; then
INSTALL_DRIVER_VERSION='20.35.17767'
return 0
else
while true; do
read -p "You are still able to use the older version 19.41.14441. Use the older driver? (y/n) [n] " yn
yn=${yn:=n}
case $yn in
[Yy]*) return 0 ;;
[Nn]*) INSTALL_DRIVER_VERSION='20.35.17767' && return 0 ;;
esac
done
fi
fi
}

Expand Down

0 comments on commit 54909df

Please sign in to comment.