From 3ad496b48d6e3fad9fdbbe031444c346c7e04819 Mon Sep 17 00:00:00 2001 From: krishnaraj36 Date: Thu, 20 Jun 2024 11:09:36 +0530 Subject: [PATCH 1/6] Few regresion fixes --- python/tvm/relay/op/contrib/clml.py | 6 +++--- tests/scripts/setup-adreno-env.sh | 1 + tests/scripts/task_python_adreno.sh | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/tvm/relay/op/contrib/clml.py b/python/tvm/relay/op/contrib/clml.py index 22a7aae2b165..6328fa88bf4d 100644 --- a/python/tvm/relay/op/contrib/clml.py +++ b/python/tvm/relay/op/contrib/clml.py @@ -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 From 90dfd1bba9684e5cb4d203ef15f83356bea21e7c Mon Sep 17 00:00:00 2001 From: Krishna Raju Vegiraju Date: Mon, 1 Jul 2024 09:23:10 +0530 Subject: [PATCH 2/6] dummy commit --- python/tvm/relay/op/contrib/clml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/relay/op/contrib/clml.py b/python/tvm/relay/op/contrib/clml.py index 6328fa88bf4d..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 From 1a5ad87f4dc95f35e8313988850fc52d17d58cb7 Mon Sep 17 00:00:00 2001 From: krishnaraj36 Date: Mon, 22 Jul 2024 15:32:06 +0530 Subject: [PATCH 3/6] Update clml.py --- python/tvm/relay/op/contrib/clml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/relay/op/contrib/clml.py b/python/tvm/relay/op/contrib/clml.py index dace7aaab913..9096dfff86c1 100644 --- a/python/tvm/relay/op/contrib/clml.py +++ b/python/tvm/relay/op/contrib/clml.py @@ -11,7 +11,7 @@ # 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 +# 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. From 7b907a3abf29645de002e6be48abccffa19419dd Mon Sep 17 00:00:00 2001 From: krishnaraj36 Date: Mon, 22 Jul 2024 15:59:19 +0530 Subject: [PATCH 4/6] Update task_python_adreno.sh --- tests/scripts/task_python_adreno.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/task_python_adreno.sh b/tests/scripts/task_python_adreno.sh index b889fd64632d..6a75cc457af7 100755 --- a/tests/scripts/task_python_adreno.sh +++ b/tests/scripts/task_python_adreno.sh @@ -69,7 +69,7 @@ i=0 IFS=$'\n' for node_id in $TEXTURE_TESTS; do echo "$node_id" - run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-opencl-texture-$i" "$node_id" --reruns=0 + CXX=${TVM_NDK_CC} run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-opencl-texture-$i" "$node_id" --reruns=0 i=$((i+1)) done From 9c44339c5348cbd1394375173f22a91e407fe403 Mon Sep 17 00:00:00 2001 From: krishnaraj36 Date: Mon, 22 Jul 2024 16:16:31 +0530 Subject: [PATCH 5/6] Update task_python_adreno.sh --- tests/scripts/task_python_adreno.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/task_python_adreno.sh b/tests/scripts/task_python_adreno.sh index 6a75cc457af7..b889fd64632d 100755 --- a/tests/scripts/task_python_adreno.sh +++ b/tests/scripts/task_python_adreno.sh @@ -69,7 +69,7 @@ i=0 IFS=$'\n' for node_id in $TEXTURE_TESTS; do echo "$node_id" - CXX=${TVM_NDK_CC} run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-opencl-texture-$i" "$node_id" --reruns=0 + run_pytest ctypes "$TVM_INTEGRATION_TESTSUITE_NAME-opencl-texture-$i" "$node_id" --reruns=0 i=$((i+1)) done From e968db28b478b0032de71c0efdc7ed462350556f Mon Sep 17 00:00:00 2001 From: krishnaraj36 Date: Mon, 22 Jul 2024 20:49:57 +0530 Subject: [PATCH 6/6] dummy commit --- python/tvm/relay/op/contrib/clml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/relay/op/contrib/clml.py b/python/tvm/relay/op/contrib/clml.py index 9096dfff86c1..dace7aaab913 100644 --- a/python/tvm/relay/op/contrib/clml.py +++ b/python/tvm/relay/op/contrib/clml.py @@ -11,7 +11,7 @@ # 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 +# 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.