Skip to content

Commit

Permalink
[Relay] C++ GraphRuntimeCodegen, Deprecate Python2 (apache#2986)
Browse files Browse the repository at this point in the history
* [Relay] C++ GraphRuntimeCodegen

* [Test] Deprecate Python2

* [Python3] Add Py2 check

* Update _pyversion.py

* [Python3] Update test
  • Loading branch information
antinucleon authored and wweic committed May 13, 2019
1 parent 59b72a7 commit 0c8b3e3
Show file tree
Hide file tree
Showing 16 changed files with 924 additions and 428 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ else(MSVC)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" SUPPORT_CXX11)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
message("Build in Debug mode")
set(CMAKE_C_FLAGS "-O0 -g -Wall -fPIC ${CMAKE_C_FLAGS} -rdynamic")
set(CMAKE_CXX_FLAGS "-O0 -g -Wall -fPIC -std=c++11 ${CMAKE_CXX_FLAGS} -rdynamic")
else()
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ stage('Build') {
}

stage('Unit Test') {
parallel 'python2/3: GPU': {
parallel 'python3: GPU': {
node('GPU') {
ws('workspace/tvm/ut-python-gpu') {
init_git()
Expand All @@ -226,7 +226,7 @@ stage('Unit Test') {
}
}
},
'python2/3: i386': {
'python3: i386': {
node('CPU') {
ws('workspace/tvm/ut-python-i386') {
init_git()
Expand Down
2 changes: 2 additions & 0 deletions python/tvm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"""TVM: Low level DSL/IR stack for tensor computation."""
from __future__ import absolute_import as _abs

from . import _pyversion

from . import tensor
from . import arith
from . import expr
Expand Down
25 changes: 25 additions & 0 deletions python/tvm/_pyversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Python2 version check
"""
import sys

if not (sys.version_info[0] >= 3 and sys.version_info[1] >= 5):
PY3STATEMENT = """TVM project proudly dropped support of Python2.
The minimal Python requirement is Python 3.5
"""
raise Exception(PY3STATEMENT)
Loading

0 comments on commit 0c8b3e3

Please sign in to comment.