Skip to content

Commit

Permalink
Merged in SIM-4152 (pull request apache#22)
Browse files Browse the repository at this point in the history
[SIM-4152]: Update develop branch to create pkgs

Approved-by: Mikael Sevenier
  • Loading branch information
jeffuongsima committed Aug 28, 2020
2 parents 7c34dbe + 297a604 commit fde6da3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 183 deletions.
35 changes: 17 additions & 18 deletions ci_jobs/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#!groovy
library('sima-jenkins-lib')

DOCKER_OPTS = '-m 32g --cpus 8 -v /jenkins/workspace/ref_repos:/jenkins/workspace/ref_repos:rw,z'

def main() {
def job_name = env.JOB_NAME.split('/')[1]

properties([
parameters([
booleanParam(
name: 'SKIP_N2A_COMPILER_BUILD',
description: 'Skips building n2a_compiler',
name: 'SKIP_DOWNSTREAM_BUILDS',
description: 'Skips building upstream jobs',
defaultValue: false
),
booleanParam(name: "PACKAGE_ONLY", defaultValue: false, description: 'Only package don\'t run tests')
booleanParam(
name: "PACKAGE_ONLY",
defaultValue: false,
description: 'Only package don\'t run tests'
)
]),
])

Expand All @@ -38,22 +44,14 @@ def main() {
image['post']()
}
}, build: {
image["image"].inside("-m 32g -c 8") {
image["image"].inside(DOCKER_OPTS) {
utils.cmakeBuild("build", "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache", {}, { src_dir ->
stage("Python Bindings") {
dir("${env.WORKSPACE}/python") {
utils.setPythonBuildEnv([], {
sh """#!/bin/bash -ex
rm -rf dist build
python3 setup.py bdist_wheel
"""
}, 'sima')
}
dir("${env.WORKSPACE}/topi/python") {
utils.setPythonBuildEnv([], {
sh """#!/bin/bash -ex
rm -rf dist build
python3 setup.py bdist_wheel
"""
}, 'sima')
}
Expand All @@ -63,9 +61,6 @@ python3 setup.py bdist_wheel
tvm_pkg_dir = "python/dist/*.whl"
archiveArtifacts(tvm_pkg_dir)
utils.uploadPythonPackages('jenkins_user', 'sima-pypi', tvm_pkg_dir, 3)
topi_pkg_dir = "topi/python/dist/*.whl"
archiveArtifacts(topi_pkg_dir)
utils.uploadPythonPackages('jenkins_user', 'sima-pypi', topi_pkg_dir, 3)
}
}
}
Expand All @@ -79,9 +74,13 @@ python3 setup.py bdist_wheel
}

stage("Upstream") {
utils.buildUpstream("n2a_compiler", params.SKIP_N2A_COMPILER_BUILD, [
booleanParam(name: 'PACKAGE_ONLY', value: params.PACKAGE_ONLY)
])
parallel n2a: {
utils.buildUpstream("n2a_compiler", params.SKIP_DOWNSTREAM_BUILDS, [
booleanParam(name: 'PACKAGE_ONLY', value: params.PACKAGE_ONLY)
])
}, psim_mla_flow: {
utils.buildUpstream("psim_mla_flow", params.SKIP_UPSTREAM_BUILDS, [])
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions ci_jobs/Jenkinsfile.release
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env groovy
library('sima-jenkins-lib')

DOCKER_OPTS = '-m 32g --cpus 8 -v /jenkins/workspace/ref_repos:/jenkins/workspace/ref_repos:rw,z'

def main() {
def job_name = env.JOB_NAME.split('/')[1]
def image
Expand All @@ -21,11 +23,11 @@ def main() {
}
}
timeout(120) {
image.inside("-m 32g --cpus=8") {
image.inside(DOCKER_OPTS) {
stage("Download Package") {
utils.record('download.log', {
sh "rm -rf *.whl"

tvm_pkg_name = "sima-tvm"
vinfo = readYaml file: "${env.WORKSPACE}/python/VERSION.in"
tvm_version = vinfo['major'] + "." + vinfo['minor'] + "." + vinfo['patch']
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && \
cython \
llvm-dev && \
rm -rf /var/lib/apt/lists/* && \
pip3 install twine pyyaml && \
pip3 install --upgrade keyrings.alt
pip3 install --upgrade keyrings.alt && \
pip3 install twine pyyaml numpy


5 changes: 1 addition & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,9 @@ def get_package(env, pkg_name, pkg_version):
else:
return "%s==%s" % (pkg_name, pkg_version)

tvm_version = get_version('tvm', 'sima')

setup(name='sima-tvm',
version=tvm_version,
version=get_version('tvm', 'sima'),
description="TVM: An End to End Tensor IR/DSL Stack for Deep Learning Systems",
zip_safe=False,
entry_points={"console_scripts": ["tvmc = tvm.driver.tvmc.main:main"]},
Expand All @@ -196,8 +195,6 @@ def get_package(env, pkg_name, pkg_version):
'decorator',
'attrs',
'psutil',
'sima-topi==' + tvm_version,
'sima-mlc'
],
extras_require={'test': ['pillow<7',
'matplotlib'],
Expand Down
2 changes: 1 addition & 1 deletion sima-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ set(USE_BLAS apple)
# set(USE_MKL_PATH /opt/intel/mkl) for UNIX
# set(USE_MKL_PATH ../IntelSWTools/compilers_and_libraries_2018/windows/mkl) for WIN32
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
set(USE_MKL_PATH none)
set(USE_MKL OFF)

# Whether use MKLDNN library
set(USE_MKLDNN OFF)
Expand Down
2 changes: 1 addition & 1 deletion sima-regres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ set(USE_BLAS openblas)
# set(USE_MKL_PATH /opt/intel/mkl) for UNIX
# set(USE_MKL_PATH ../IntelSWTools/compilers_and_libraries_2018/windows/mkl) for WIN32
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
set(USE_MKL_PATH none)
set(USE_MKL OFF)

# Whether use MKLDNN library
set(USE_MKLDNN OFF)
Expand Down
2 changes: 1 addition & 1 deletion sima-ubuntu-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ set(USE_BLAS openblas)
# set(USE_MKL_PATH /opt/intel/mkl) for UNIX
# set(USE_MKL_PATH ../IntelSWTools/compilers_and_libraries_2018/windows/mkl) for WIN32
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
set(USE_MKL_PATH none)
set(USE_MKL OFF)

# Whether use MKLDNN library
set(USE_MKLDNN OFF)
Expand Down
1 change: 0 additions & 1 deletion topi/python/VERSION.in

This file was deleted.

153 changes: 0 additions & 153 deletions topi/python/setup.py

This file was deleted.

0 comments on commit fde6da3

Please sign in to comment.