Skip to content

Commit

Permalink
backwards compat changes
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch committed Mar 18, 2021
1 parent 17c6588 commit 225236b
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,20 @@ else()
list(APPEND COMPILER_SRCS ${STACKVM_RUNTIME_SRCS})
endif(USE_STACKVM_RUNTIME)

# NOTE(areusch): USE_GRAPH_RUNTIME will be deleted in a future release
if(USE_GRAPH_RUNTIME AND NOT DEFINED USE_GRAPH_EXECUTOR)
message(WARNING "USE_GRAPH_RUNTIME renamed to USE_GRAPH_EXECUTOR. Please update your config.cmake")
set(USE_GRAPH_EXECUTOR ${USE_GRAPH_RUNTIME})
unset(USE_GRAPH_RUNTIME CACHE)
endif(USE_GRAPH_RUNTIME AND NOT DEFINED USE_GRAPH_EXECUTOR)

# NOTE(areusch): USE_GRAPH_RUNTIME_DEBUG will be deleted in a future release
if(USE_GRAPH_RUNTIME_DEBUG AND NOT DEFINED USE_GRAPH_EXECUTOR_DEBUG)
message(WARNING "USE_GRAPH_RUNTIME_DEBUG renamed to USE_GRAPH_EXECUTOR_DEBUG. Please update your config.cmake")
set(USE_GRAPH_EXECUTOR_DEBUG ${USE_GRAPH_RUNTIME_DEBUG})
unset(USE_GRAPH_RUNTIME_DEBUG CACHE)
endif(USE_GRAPH_RUNTIME_DEBUG AND NOT DEFINED USE_GRAPH_EXECUTOR_DEBUG)

if(USE_GRAPH_EXECUTOR)
message(STATUS "Build with Graph Executor support...")
file(GLOB RUNTIME_GRAPH_EXECUTOR_SRCS src/runtime/graph_executor/*.cc)
Expand Down
8 changes: 8 additions & 0 deletions cmake/modules/contrib/ArmComputeLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ if(USE_ARM_COMPUTE_LIB)
file(GLOB ACL_RELAY_CONTRIB_SRC src/relay/backend/contrib/arm_compute_lib/*.cc)
file(GLOB ACL_RUNTIME_MODULE src/runtime/contrib/arm_compute_lib/acl_runtime.cc)
list(APPEND COMPILER_SRCS ${ACL_RELAY_CONTRIB_SRC})

if(NOT USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)
list(APPEND COMPILER_SRCS ${ACL_RUNTIME_MODULE})
endif()
message(STATUS "Build with Arm Compute Library support...")
endif()

if(USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME AND NOT DEFINED USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)
message(WARNING "USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME renamed to USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR. "
"Please update your config.cmake")
set(USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR ${USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME})
unset(USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME CACHE)
endif(USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME AND NOT DEFINED USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)

if(USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)
set(ACL_PATH ${CMAKE_CURRENT_SOURCE_DIR}/acl)
# Detect custom ACL path.
Expand Down
27 changes: 27 additions & 0 deletions python/tvm/contrib/debugger/debug_runtime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.
"""Deprecated Python API for DebugExecutor."""

import warnings

from . import graph_executor


def create(*args, **kwargs):
warnings.warn("This function has been moved to tvm.contrib.graph_executor and will be removed "
"in the next TVM release")
return graph_executor.create(*args, **kwargs)
27 changes: 27 additions & 0 deletions python/tvm/contrib/graph_runtime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.
"""Deprecated Python API for GraphExecutor."""

import warnings

from . import graph_executor


def create(*args, **kwargs):
warnings.warn("This function has been moved to tvm.contrib.graph_executor and will be removed "
"in the next TVM release")
return graph_executor.create(*args, **kwargs)

0 comments on commit 225236b

Please sign in to comment.