mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
ng ep update1 (#895)
This commit is contained in:
parent
95ac7a2f35
commit
ba3b82648e
5 changed files with 39 additions and 24 deletions
|
|
@ -4,17 +4,20 @@
|
|||
#--------------------------------------------------------------------------
|
||||
|
||||
FROM ubuntu:16.04
|
||||
ARG PYTHON_VERSION=3.5
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y sudo \
|
||||
build-essential curl \
|
||||
libcurl4-openssl-dev \
|
||||
libssl-dev wget \
|
||||
python 3.6 python3-pip \
|
||||
python3-dev git
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install numpy onnx
|
||||
apt-get install -y sudo git bash
|
||||
|
||||
RUN pip3 install onnxruntime-ngraph
|
||||
WORKDIR /code
|
||||
ENV PATH="/opt/cmake/bin:${PATH}"
|
||||
RUN git clone --recursive https://github.com/Microsoft/onnxruntime onnxruntime
|
||||
RUN /onnxruntime/tools/ci_build/github/linux/docker/scripts/install_ubuntu.sh -p ${PYTHON_VERSION} && \
|
||||
/onnxruntime/tools/ci_build/github/linux/docker/scripts/install_deps.sh
|
||||
|
||||
WORKDIR /
|
||||
RUN mkdir -p /onnxruntime/build && \
|
||||
python3 /onnxruntime/tools/ci_build/build.py --build_dir /onnxruntime/build --config Release --build_shared_lib --skip_submodule_sync --build_wheel --parallel --use_ngraph && \
|
||||
pip3 install /onnxruntime/build/Release/dist/onnxruntime_ngraph-*.whl && \
|
||||
rm -rf /onnxruntime
|
||||
|
|
@ -107,9 +107,13 @@ static bool IsUnsupportedOpMode(const Node* node, const onnxruntime::GraphViewer
|
|||
|
||||
// ceil_mode and dilations attrs are not supported in nGraph
|
||||
const auto& attributes = node->GetAttributes();
|
||||
if (attributes.find("ceil_mode") != attributes.end()) {
|
||||
const auto ceil_attr = attributes.find("ceil_mode");
|
||||
// default value of ceil_mode (0) is supported.
|
||||
if (ceil_attr != attributes.end() && ceil_attr->second.i() != 0) {
|
||||
return true;
|
||||
} else if (attributes.find("dilations") != attributes.end()) {
|
||||
}
|
||||
|
||||
if (attributes.find("dilations") != attributes.end()) {
|
||||
return true;
|
||||
}
|
||||
} else if (optype == "OneHot") {
|
||||
|
|
@ -169,7 +173,9 @@ static bool IsUnsupportedOpMode(const Node* node, const onnxruntime::GraphViewer
|
|||
} else if (optype == "AveragePool") {
|
||||
// ceil_mode attribute is not supported in nGraph
|
||||
const auto& attributes = node->GetAttributes();
|
||||
if (attributes.find("ceil_mode") != attributes.end()) {
|
||||
const auto ceil_attr = attributes.find("ceil_mode");
|
||||
// default value of ceil_mode (0) is supported.
|
||||
if (ceil_attr != attributes.end() && ceil_attr->second.i() != 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -472,17 +472,14 @@ void OpTester::Run(ExpectResult expect_result,
|
|||
continue;
|
||||
|
||||
//if node is not registered for the provider, skip
|
||||
node.SetExecutionProviderType(provider_type);
|
||||
if (provider_type == onnxruntime::kTensorrtExecutionProvider)
|
||||
node.SetExecutionProviderType(provider_type);
|
||||
if (provider_type == onnxruntime::kNGraphExecutionProvider || provider_type == onnxruntime::kTensorrtExecutionProvider)
|
||||
continue;
|
||||
auto reg = execution_provider->GetKernelRegistry();
|
||||
// nGraph EP doesn't have kernels registered
|
||||
if (!reg->IsEmpty()) {
|
||||
const KernelCreateInfo* kci = reg->TryFindKernel(node, execution_provider->Type());
|
||||
if (!kci) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
const KernelCreateInfo* kci = reg->TryFindKernel(node, execution_provider->Type());
|
||||
if (!kci) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -507,8 +507,7 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs, enab
|
|||
|
||||
if enable_python_tests:
|
||||
# Disable python tests for TensorRT because many tests are not supported yet
|
||||
if enable_tensorrt or enable_ngraph:
|
||||
print("NOT RUNNING")
|
||||
if enable_tensorrt :
|
||||
return
|
||||
if is_windows():
|
||||
cwd = os.path.join(cwd, config)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,16 @@ jobs:
|
|||
steps:
|
||||
- template: templates/set-test-data-variables-step.yml
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Clean untagged docker images'
|
||||
inputs:
|
||||
script: |
|
||||
docker rm $(docker ps -a | grep Exited | awk '{print $1;}') || true
|
||||
docker images -q --filter "dangling=true" | xargs -n1 -r docker rmi
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Download azcopy'
|
||||
inputs:
|
||||
|
|
|
|||
Loading…
Reference in a new issue