Skip to content

Commit

Permalink
Fix gna tests (#20)
Browse files Browse the repository at this point in the history
* Fix gna tests

* Squashed commit of the following:

commit 565b504
Author: Alexander Zhogov <[email protected]>
Date:   Tue Oct 13 13:27:34 2020 +0300

    GitHub CI: Add files_size.yml (openvinotoolkit#2570)

    * GitHub CI: Add files_size.yml

    * Update job name

commit ab0fb29
Author: Vladislav Vinogradov <[email protected]>
Date:   Tue Oct 13 11:37:30 2020 +0300

    [IE][BUILD] Fix C5208 warning under Windows (openvinotoolkit#2628)

    * C++ feature in C `typedef struct` code.
    * The warning can be promoted to error in dependent projects.

    C5208: unnamed class used in typedef name cannot declare members other than
    non-static data members, member enumerations, or member classes

commit 15a338e
Author: helmutg <[email protected]>
Date:   Mon Oct 12 22:24:24 2020 +0200

    add build option USE_SYSTEM_PUGIXML (openvinotoolkit#2502)

    It allows skipping inference-engine/thirdparty/pugixml and using the
    system copy instead.

    Thanks to @Osse for helping understand cmake scoping rules.

    Co-authored-by: Helmut Grohne <[email protected]>

commit 7ac8cd8
Author: Alexander Zhogov <[email protected]>
Date:   Mon Oct 12 19:23:00 2020 +0300

    Azure CI: Fix nGraph ONNX

commit 3a2e339
Author: Alexander Zhogov <[email protected]>
Date:   Mon Oct 12 19:20:28 2020 +0300

    Azure CI: Disable steps in nGraph ONNX

commit 5835974
Author: azhogov <[email protected]>
Date:   Mon Oct 12 18:46:14 2020 +0300

    Azure CI: Add linux_ngraph_onnx.yml
  • Loading branch information
iefode authored Oct 13, 2020
1 parent 55ff773 commit 92c2c96
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 24 deletions.
95 changes: 95 additions & 0 deletions .ci/azure/linux_ngraph_onnx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
jobs:
- job: nGraph_ONNX_Lin

# About 150% of total time
timeoutInMinutes: 60

pool:
name: LIN_VMSS_VENV_F8S_WU2

variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
INSTALL_DIR: $(WORK_DIR)/install

steps:
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino

- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
which python3
python3 --version
gcc --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
vmstat -s
df
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
displayName: 'Make dir'
- script: |
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ./inference-engine/ie_bridges/python/src/requirements-dev.txt
displayName: 'Install dependencies'
enabled: false
- script: |
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
workingDirectory: $(WORK_DIR)
displayName: 'Install Ninja'
enabled: false
- task: CMake@1
inputs:
# CMake must get Python 3.x version by default
cmakeArgs: -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_VPU=OFF -DENABLE_GNA=OFF -DENABLE_OPENCV=OFF -DENABLE_CPPLINT=OFF -DENABLE_TESTS=OFF -DENABLE_BEH_TESTS=OFF -DENABLE_FUNCTIONAL_TESTS=OFF -DENABLE_MKL_DNN=ON -DENABLE_CLDNN=OFF -DENABLE_PROFILING_ITT=OFF -DENABLE_SAMPLES=OFF -DENABLE_SPEECH_DEMO=OFF -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DNGRAPH_INTERPRETER_ENABLE=ON -DNGRAPH_DEBUG_ENABLE=OFF -DNGRAPH_DYNAMIC_COMPONENTS_ENABLE=ON -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
enabled: false

- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build'
enabled: false

- script: make install
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
enabled: false

- script: |
ls -alR $(REPO_DIR)/bin/
ls -alR $(INSTALL_DIR)
displayName: 'List files'
enabled: false
- script: docker build --tag=openvino-onnx-ci-image --file=$(REPO_DIR)/.ci/openvino-onnx/Dockerfile .
workingDirectory: $(BUILD_DIR)
displayName: 'Docker build'
enabled: false

- script: docker run --name openvino-onnx-ci-container openvino-onnx-ci-image
workingDirectory: $(BUILD_DIR)
displayName: 'Docker run tests'
enabled: false
17 changes: 17 additions & 0 deletions .github/workflows/files_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Files Size
on: [push, pull_request]

jobs:
Check-Files-Size:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: git ls-tree
run: |
git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4
- name: git lfs ls-files
run: |
git lfs ls-files --size
2 changes: 2 additions & 0 deletions inference-engine/cmake/features_ie.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ ie_option(ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON)
set(IE_EXTRA_PLUGINS "" CACHE STRING "Extra paths for plugins to include into DLDT build tree")

ie_dependent_option(ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the Inference Engine binaries" ON "THREADING MATCHES TBB;LINUX" OFF)

ie_option (USE_SYSTEM_PUGIXML "use the system copy of pugixml" OFF)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace ngraph {
namespace op {

typedef struct {
struct InterpolateIEAttrs {
int height = -1;
int width = -1;
float zoom_factor = 0;
Expand All @@ -26,7 +26,7 @@ typedef struct {
std::string mode = "";
int pad_beg = 0;
int pad_end = 0;
} InterpolateIEAttrs;
};

class TRANSFORMATIONS_API Interp : public Op {
public:
Expand All @@ -45,11 +45,11 @@ class TRANSFORMATIONS_API Interp : public Op {
InterpolateIEAttrs m_attrs;
};

typedef struct {
struct ResampleIEAttrs {
bool antialias = true;
int64_t factor = 0;
std::string mode = "";
} ResampleIEAttrs;
};

class TRANSFORMATIONS_API ResampleV2 : public Op {
public:
Expand Down
25 changes: 17 additions & 8 deletions inference-engine/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,31 @@ function(build_with_lto)
set(BUILD_TESTS ${BUILD_TESTS_current} CACHE BOOL "Build tests" FORCE)
endfunction()

ie_build_pugixml()
if (USE_SYSTEM_PUGIXML)
find_package(PugiXML REQUIRED)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
else()
ie_build_pugixml()
target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")
endif()
add_subdirectory(stb_lib)
add_subdirectory(ade)
add_subdirectory(fluid/modules/gapi)

target_include_directories(pugixml INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/pugixml/src>")

set_target_properties(pugixml ade fluid stb_image
set_target_properties(ade fluid stb_image
PROPERTIES FOLDER thirdparty)

# developer package

ie_developer_export_targets(ade fluid pugixml)
if(TARGET pugixml_mt)
ie_developer_export_targets(pugixml_mt)
set_target_properties(pugixml_mt PROPERTIES FOLDER thirdparty)
ie_developer_export_targets(ade fluid)

if (NOT USE_SYSTEM_PUGIXML)
set_target_properties(pugixml PROPERTIES FOLDER thirdparty)
ie_developer_export_targets(pugixml)
if(TARGET pugixml_mt)
ie_developer_export_targets(pugixml_mt)
set_target_properties(pugixml_mt PROPERTIES FOLDER thirdparty)
endif()
endif()

if(ENABLE_MKL_DNN)
Expand Down
47 changes: 38 additions & 9 deletions ngraph/test/runtime/interpreter/evaluates_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,24 @@

#include "evaluates_map.hpp"
#include <interpreter/reference/mod.hpp>
#include <ngraph/runtime/reference/any.hpp>
#include <ngraph/runtime/reference/abs.hpp>
#include <ngraph/runtime/reference/batch_norm.hpp>
#include <ngraph/runtime/reference/ceiling.hpp>
#include <ngraph/runtime/reference/convert.hpp>
#include <ngraph/runtime/reference/dequantize.hpp>
#include <ngraph/runtime/reference/dot.hpp>
#include <ngraph/runtime/reference/extract_image_patches.hpp>
#include <ngraph/runtime/reference/gather_nd.hpp>
#include <ngraph/runtime/reference/gru_cell.hpp>
#include <ngraph/runtime/reference/lstm_cell.hpp>
#include <ngraph/runtime/reference/one_hot.hpp>
#include <ngraph/runtime/reference/pad.hpp>
#include <ngraph/runtime/reference/prior_box.hpp>
#include <ngraph/runtime/reference/quantize.hpp>
#include <ngraph/runtime/reference/replace_slice.hpp>
#include <ngraph/runtime/reference/reverse_sequence.hpp>
#include <ngraph/runtime/reference/rnn_cell.hpp>
#include <ngraph/runtime/reference/select.hpp>
#include <ngraph/runtime/reference/sequences.hpp>
#include <ngraph/runtime/reference/sign.hpp>
#include "ngraph/ops.hpp"
#include "ngraph/runtime/reference/avg_pool.hpp"
#include "ngraph/runtime/reference/batch_norm.hpp"
#include "ngraph/runtime/reference/batch_norm.hpp"
#include "ngraph/runtime/reference/convolution.hpp"
#include "ngraph/runtime/reference/ctc_greedy_decoder.hpp"
#include "ngraph/runtime/reference/ctc_loss.hpp"
Expand All @@ -52,9 +47,7 @@
#include "ngraph/runtime/reference/lrn.hpp"
#include "ngraph/runtime/reference/mvn.hpp"
#include "ngraph/runtime/reference/normalize_l2.hpp"
#include "ngraph/runtime/reference/reverse_sequence.hpp"
#include "ngraph/runtime/reference/scatter_nd_update.hpp"
#include "ngraph/runtime/reference/sqrt.hpp"
#include "ngraph/runtime/reference/squared_difference.hpp"
#include "reference/elu.hpp"
#include "reference/gelu.hpp"
Expand Down Expand Up @@ -475,6 +468,42 @@ namespace
return true;
}

template <element::Type_t ET>
bool evaluate(const shared_ptr<op::v0::Relu>& op,
const HostTensorVector& outputs,
const HostTensorVector& input)
{
using T = typename element_type_traits<ET>::value_type;
runtime::reference::relu<T>(input[0]->get_data_ptr<T>(),
outputs[0]->get_data_ptr<T>(),
shape_size(input[0]->get_shape()));
return true;
}

template <element::Type_t ET>
bool evaluate(const shared_ptr<op::v0::Sign>& op,
const HostTensorVector& outputs,
const HostTensorVector& input)
{
using T = typename element_type_traits<ET>::value_type;
runtime::reference::sign<T>(input[0]->get_data_ptr<T>(),
outputs[0]->get_data_ptr<T>(),
shape_size(input[0]->get_shape()));
return true;
}

template <element::Type_t ET>
bool evaluate(const shared_ptr<op::v0::Abs>& op,
const HostTensorVector& outputs,
const HostTensorVector& input)
{
using T = typename element_type_traits<ET>::value_type;
runtime::reference::abs<T>(input[0]->get_data_ptr<T>(),
outputs[0]->get_data_ptr<T>(),
shape_size(input[0]->get_shape()));
return true;
}

template <element::Type_t ET>
bool evaluate(const shared_ptr<op::v4::CTCLoss>& op,
const HostTensorVector& outputs,
Expand Down
9 changes: 6 additions & 3 deletions ngraph/test/runtime/interpreter/opset_int_tbl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,28 @@
#define NGRAPH_OP(x, y)
#endif

NGRAPH_OP(Abs, op::v0)
NGRAPH_OP(BatchNormInference, op::v0)
NGRAPH_OP(Ceiling, op::v0)
NGRAPH_OP(Convert, op::v0)
NGRAPH_OP(CTCGreedyDecoder, op::v0)
NGRAPH_OP(CumSum, ngraph::op::v0)
NGRAPH_OP(DetectionOutput, op::v0)
NGRAPH_OP(Elu, op::v0)
NGRAPH_OP(FakeQuantize, op::v0)
NGRAPH_OP(GatherND, op::v0)
NGRAPH_OP(Gelu, op::v0)
NGRAPH_OP(HardSigmoid, op::v0)
NGRAPH_OP(LRN, ngraph::op::v0)
NGRAPH_OP(MVN, ngraph::op::v0)
NGRAPH_OP(NormalizeL2, op::v0)
NGRAPH_OP(OneHot, op::v0)
NGRAPH_OP(PriorBox, ngraph::op::v0)
NGRAPH_OP(Relu, op::v0)
NGRAPH_OP(ReverseSequence, op::v0)
NGRAPH_OP(RNNCell, op::v0)
NGRAPH_OP(Selu, op::v0)
NGRAPH_OP(FakeQuantize, op::v0)
NGRAPH_OP(NormalizeL2, op::v0)
NGRAPH_OP(CTCGreedyDecoder, op::v0)
NGRAPH_OP(Sign, op::v0)
NGRAPH_OP(SquaredDifference, op::v0)

NGRAPH_OP(AvgPool, op::v1)
Expand Down

0 comments on commit 92c2c96

Please sign in to comment.