Skip to content

Commit

Permalink
[CLML][CI] Fix for few clml regression issues (#17117)
Browse files Browse the repository at this point in the history
* Few regresion fixes

* dummy commit

* Update clml.py

* Update task_python_adreno.sh

* Update task_python_adreno.sh

* dummy commit

---------

Co-authored-by: Krishna Raju Vegiraju <[email protected]>
  • Loading branch information
krishnaraj36 and Krishna Raju Vegiraju authored Jul 24, 2024
1 parent 89b91e2 commit 9a07870
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python/tvm/relay/op/contrib/clml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions tests/scripts/setup-adreno-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
3 changes: 1 addition & 2 deletions tests/scripts/task_python_adreno.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$!
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9a07870

Please sign in to comment.