diff --git a/python/tvm/relay/op/contrib/clml.py b/python/tvm/relay/op/contrib/clml.py index 22a7aae2b165..dace7aaab913 100644 --- a/python/tvm/relay/op/contrib/clml.py +++ b/python/tvm/relay/op/contrib/clml.py @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# pylint: disable=invalid-name, unused-argument, pointless-exception-statement +# pylint: disable=invalid-name, unused-argument, pointless-exception-statement. """CLML Library supported operators.""" import json from string import Template @@ -166,7 +166,7 @@ def partition_for_clml(mod, params=None, **opts): transform.FoldConstant(), OptimizeBatchnormPass(), transform.MergeComposite(clml_pattern_table()), - transform.AnnotateTarget("clml", False), + transform.AnnotateTarget("clml"), transform.MergeCompilerRegions(), transform.PartitionGraph(), ] @@ -518,7 +518,7 @@ def check_dense1d_op(extract): return False if not (call.op.name in ["nn.bias_add", "add"] and call.args[0].op.name == "nn.dense"): return False - return check_default_op(call) + return True def check_dense2d_op(extract): call = extract @@ -564,7 +564,7 @@ def check_depth_to_space(extract): ("clml.dense2d", dense2d_pattern(), check_dense2d_op), ("clml.pad", pad_pattern(), check_pad_op), ("clml.concat", concat_pattern(), check_concat_op), - ("clml.batch_norm", batch_norm_pattern(), check_default_op), + ("clml.batch_norm", batch_norm_pattern()), ("clml.add", is_op("add")(wildcard(), wildcard()), check_binary_op), ("clml.subtract", is_op("subtract")(wildcard(), wildcard()), check_binary_op), ("clml.multiply", is_op("multiply")(wildcard(), wildcard()), check_binary_op), diff --git a/tests/scripts/setup-adreno-env.sh b/tests/scripts/setup-adreno-env.sh index d2c776412e5f..cfe174214c72 100755 --- a/tests/scripts/setup-adreno-env.sh +++ b/tests/scripts/setup-adreno-env.sh @@ -80,6 +80,7 @@ function def_environment() { export RPC_DEVICE_KEY="android" export RPC_TARGET="adreno" export TVM_NDK_CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang" + # Compiler definition for c-runtime while empty mod (llvm -mtriple ineffective here). export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang" } diff --git a/tests/scripts/task_python_adreno.sh b/tests/scripts/task_python_adreno.sh index 18e0feb815d1..b889fd64632d 100755 --- a/tests/scripts/task_python_adreno.sh +++ b/tests/scripts/task_python_adreno.sh @@ -31,7 +31,6 @@ export TVM_TRACKER_PORT=$(((RANDOM % 100) + 9100)) export RPC_DEVICE_KEY="android" export RPC_TARGET="adreno" export TVM_NDK_CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang" -export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang" env PYTHONPATH=python python3 -m tvm.exec.rpc_tracker --host "${TVM_TRACKER_HOST}" --port "${TVM_TRACKER_PORT}" & TRACKER_PID=$! @@ -79,7 +78,7 @@ CLML_TESTS=$(./ci/scripts/jenkins/pytest_ids.py --folder tests/python/contrib/te i=0 for node_id in $CLML_TESTS; do echo "$node_id" - run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-openclml-$i" "$node_id" --reruns=0 + CXX=${TVM_NDK_CC} run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-openclml-$i" "$node_id" --reruns=0 i=$((i+1)) done