This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into rblaczkowski/change…
…-code-base-to-OpenVino
- Loading branch information
Showing
26 changed files
with
1,319 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,19 +24,18 @@ catch (Exception e) { | |
[ sku : "skx", backends : ["cpu", "interpreter"] ], | ||
[ sku : "clx", backends : ["cpu", "interpreter"] ], | ||
[ sku : "bdw", backends : ["cpu", "interpreter"] ] | ||
// [ sku: "iris", backend : "igpu" ] | ||
] | ||
} | ||
echo "BACKEND_SKU_CONFIGURATIONS=${BACKEND_SKU_CONFIGURATIONS}" | ||
|
||
// --- CI constants --- | ||
NGRAPH_ONNX_REPO_ADDRESS="[email protected]:NervanaSystems/ngraph-onnx.git" | ||
NGRAPH_REPO_ADDRESS="[email protected]:NervanaSystems/ngraph.git" | ||
DLDT_REPO_ADDRESS = "git@gitlab-icv.inn.intel.com:inference-engine/dldt.git" | ||
OPENVINO_REPO_ADDRESS = "git@github.com:openvinotoolkit/openvino.git" | ||
|
||
CI_LABELS = "ngraph_onnx && ci" | ||
CI_DIR = "ngraph-onnx/.ci/jenkins" | ||
DOCKER_CONTAINER_NAME = "jenkins_ngraph-onnx_ci" | ||
DOCKER_CONTAINER_PREFIX = "jenkins_ngraph-onnx_ci" | ||
|
||
JENKINS_GITHUB_CREDENTIAL_ID = "7157091e-bc04-42f0-99fd-dc4da2922a55" | ||
JENKINS_GITLAB_CREDENTIAL_ID = "1caab8d7-1d0c-4b8a-9438-b65336862ead" | ||
|
@@ -51,6 +50,7 @@ CONFIGURATION_WORKFLOW = { configuration -> | |
timeout(activity: true, time: 60) { | ||
WORKDIR = "${WORKSPACE}/${BUILD_NUMBER}" | ||
DOCKER_HOME = "/home/${USER}" | ||
DOCKER_CONTAINER_NAME="${DOCKER_CONTAINER_PREFIX}_${EXECUTOR_NUMBER}" | ||
try { | ||
stage("Clone repositories") { | ||
dir (WORKDIR) { | ||
|
@@ -60,11 +60,11 @@ CONFIGURATION_WORKFLOW = { configuration -> | |
gitClone("Clone ngraph", NGRAPH_REPO_ADDRESS, configuration.ngraphBranch) | ||
} | ||
dir (WORKDIR) { | ||
gitClone("Clone dldt", DLDT_REPO_ADDRESS, configuration.dldtBranch) | ||
gitClone("Clone openvino", OPENVINO_REPO_ADDRESS, configuration.openvinoBranch) | ||
} | ||
gitSubmoduleUpdate("dldt") | ||
gitSubmoduleUpdate("openvino") | ||
} | ||
String imageName = "${DOCKER_REGISTRY}/aibt/aibt/ngraph_cpp/${configuration.os}/ubuntu_18_04" | ||
String imageName = "${DOCKER_REGISTRY}/aibt/aibt/ngraph_cpp/${configuration.os}/ubuntu_18_04_test" | ||
stage("Prepare Docker image") { | ||
pullDockerImage(imageName) | ||
appendUserToDockerImage(imageName) | ||
|
@@ -73,22 +73,7 @@ CONFIGURATION_WORKFLOW = { configuration -> | |
runDockerContainer(imageName) | ||
} | ||
stage("Prepare environment") { | ||
prepareEnvironment(configuration.backends, configuration.ngraphBranch) | ||
} | ||
for (backend in configuration.backends) { | ||
try { | ||
stage("Run ${backend} tests") { | ||
runToxTests(backend) | ||
} | ||
} | ||
catch(e) { | ||
// If cause of exception was job abortion - throw exception | ||
if ("$e".contains("143")) { | ||
throw e | ||
} else { | ||
currentBuild.result = "FAILURE" | ||
} | ||
} | ||
prepareEnvironment() | ||
} | ||
} | ||
catch(e) { | ||
|
@@ -172,7 +157,7 @@ def runDockerContainer(String imageName) { | |
mkdir -p ${HOME}/ONNX_CI | ||
docker run -id --privileged \ | ||
--user ${USER} \ | ||
--name ${DOCKER_CONTAINER_NAME} \ | ||
--name ${DOCKER_CONTAINER_NAME} \ | ||
--volume ${WORKDIR}:/logs \ | ||
--volume ${HOME}/ONNX_CI/onnx_models/.onnx:${dockerOnnxModels} \ | ||
--volume ${HOME}/ONNX_CI/cache:${dockerCache} \ | ||
|
@@ -181,20 +166,17 @@ def runDockerContainer(String imageName) { | |
""" | ||
} | ||
|
||
def prepareEnvironment(List<String> backends, String ngraph_branch) { | ||
String backendsString = backends.join(",") | ||
def prepareEnvironment() { | ||
sh """ | ||
docker exec ${DOCKER_CONTAINER_NAME} bash -c "${DOCKER_HOME}/${CI_DIR}/prepare_environment.sh \ | ||
--build-dir=${DOCKER_HOME} \ | ||
--backends=${backendsString} \ | ||
--ngraph-branch=${ngraph_branch}" | ||
--build-dir=${DOCKER_HOME} | ||
""" | ||
} | ||
|
||
def runToxTests(String backend) { | ||
String toxEnvVar = "TOX_INSTALL_NGRAPH_FROM=\${NGRAPH_WHL}" | ||
String backendEnvVar = "NGRAPH_BACKEND=${backend.toUpperCase()}" | ||
String libraryVar = (backend == "ie") ? "LD_LIBRARY_PATH=${DOCKER_HOME}/dldt_dist/deployment_tools/inference_engine/external/tbb/lib:${DOCKER_HOME}/dldt_dist/deployment_tools/inference_engine/lib/intel64:${DOCKER_HOME}/dldt_dist/deployment_tools/inference_engine/external/mkltiny_lnx/lib:${DOCKER_HOME}/dldt_dist/deployment_tools/ngraph/lib" : "LD_LIBRARY_PATH=" | ||
String libraryVar = (backend == "ie") ? "LD_LIBRARY_PATH=${DOCKER_HOME}/openvino_dist/deployment_tools/inference_engine/external/tbb/lib:${DOCKER_HOME}/openvino_dist/deployment_tools/inference_engine/lib/intel64:${DOCKER_HOME}/openvino_dist/deployment_tools/inference_engine/external/mkltiny_lnx/lib:${DOCKER_HOME}/openvino_dist/deployment_tools/ngraph/lib" : "LD_LIBRARY_PATH=" | ||
|
||
|
||
if (backend == "ie") { | ||
|
@@ -219,7 +201,7 @@ def cleanup() { | |
deleteDir() | ||
} | ||
|
||
def getConfigurationsMap(String dockerfilesPath, String ngraphOnnxBranch, String ngraphBranch, String dldtBranch) { | ||
def getConfigurationsMap(String dockerfilesPath, String ngraphOnnxBranch, String ngraphBranch, String openvinoBranch) { | ||
def configurationsMap = [:] | ||
def osImages = sh (script: "find ${dockerfilesPath} -maxdepth 1 -name '*.dockerfile' -printf '%f\n'", | ||
returnStdout: true).trim().replaceAll(".dockerfile","").split("\n") as List | ||
|
@@ -230,7 +212,7 @@ def getConfigurationsMap(String dockerfilesPath, String ngraphOnnxBranch, String | |
configuration.os = os | ||
configuration.ngraphOnnxBranch = ngraphOnnxBranch | ||
configuration.ngraphBranch = ngraphBranch | ||
configuration.dldtBranch = dldtBranch | ||
configuration.openvinoBranch = openvinoBranch | ||
String backendLabels = configuration.backends.join(" && ") | ||
configuration.label = "${backendLabels} && ${configuration.sku} && ${CI_LABELS}" | ||
configuration.name = "${configuration.sku}-${configuration.os}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.