Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relay] C++ GraphRuntimeCodegen, Deprecate Python2 #2986

Merged
merged 6 commits into from
Apr 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Python3] Update test
antinucleon authored and Bing Xu committed Apr 12, 2019
commit 0eeee8c408f616350c79432a56e942613a0823d6
1 change: 0 additions & 1 deletion src/relay/backend/graph_runtime_codegen.cc
Original file line number Diff line number Diff line change
@@ -392,7 +392,6 @@ class GraphRuntimeCodegen
<< "the fuse_ops transformation to the expression.";
} else if (op->op.as<GlobalVarNode>()) {
LOG(FATAL) << "Not implemented";
// func = self.mod[call.op]
} else if (op->op.as<FunctionNode>()) {
func = GetRef<Function>(op->op.as<FunctionNode>());
} else {
2 changes: 1 addition & 1 deletion src/relay/backend/utils.h
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ inline const PackedFunc* GetPackedFunc(const std::string& func_name) {
* \param typ
* \return std::string string format of type
*/
std::string DType2String(const tvm::Type typ) {
inline std::string DType2String(const tvm::Type typ) {
std::ostringstream os;
auto tvm_type = Type2TVMType(typ);
if (tvm_type.code == kDLFloat) {
1 change: 0 additions & 1 deletion src/relay/pass/pattern_util.h
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@
#include <tvm/relay/expr.h>
#include <tvm/relay/attrs/nn.h>
#include <tvm/relay/attrs/transform.h>
#include <tvm/relay/attrs/nn.h>
#include <string>


2 changes: 1 addition & 1 deletion tests/python/unittest/test_module_load.py
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ def save_object(names):
fo.write(runtime_py)

subprocess.check_call(
"python %s %s %s" % (path_runtime_py, path_dso, dtype),
"python3 %s %s %s" % (path_runtime_py, path_dso, dtype),
shell=True)


8 changes: 4 additions & 4 deletions tests/scripts/task_java_unittest.sh
Original file line number Diff line number Diff line change
@@ -26,13 +26,13 @@ CURR_DIR=$(cd `dirname $0`; pwd)
SCRIPT_DIR=$CURR_DIR/../../jvm/core/src/test/scripts
TEMP_DIR=$(mktemp -d)

python $SCRIPT_DIR/test_add_cpu.py $TEMP_DIR
python $SCRIPT_DIR/test_add_gpu.py $TEMP_DIR
python $SCRIPT_DIR/test_graph_runtime.py $TEMP_DIR
python3 $SCRIPT_DIR/test_add_cpu.py $TEMP_DIR
python3 $SCRIPT_DIR/test_add_gpu.py $TEMP_DIR
python3 $SCRIPT_DIR/test_graph_runtime.py $TEMP_DIR

# start rpc proxy server
PORT=$(( ( RANDOM % 1000 ) + 9000 ))
python $SCRIPT_DIR/test_rpc_proxy_server.py $PORT 30 &
python3 $SCRIPT_DIR/test_rpc_proxy_server.py $PORT 30 &

make jvmpkg
make jvmpkg JVM_TEST_ARGS="-DskipTests=false \
2 changes: 1 addition & 1 deletion tests/scripts/task_python_docs.sh
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ mv jvm/core/target/site/apidocs docs/_build/html/javadoc
rm -rf python/tvm/*.pyc python/tvm/*/*.pyc python/tvm/*/*/*.pyc

cd docs
PYTHONPATH=`pwd`/../python3 make html
PYTHONPATH=`pwd`/../python make html
cd _build/html
tar czf docs.tgz *
mv docs.tgz ../../../
2 changes: 2 additions & 0 deletions tests/scripts/task_python_integration.sh
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ rm -rf lib
make
cd ../..

python3 -m nose -v apps/extension/tests

TVM_FFI=ctypes python3 -m nose -v tests/python/integration
TVM_FFI=ctypes python3 -m nose -v tests/python/contrib

2 changes: 1 addition & 1 deletion tests/scripts/task_web_test.sh
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
set -e
set -u

export PYTHONPATH=python3
export PYTHONPATH=python

cp /emsdk-portable/.emscripten ~/.emscripten
source /emsdk-portable/emsdk_env.sh