Skip to content

Commit 02a8c8a

Browse files
author
Siva Rama Krishna Reddy B
committed
* Test case
1 parent 19a7aaa commit 02a8c8a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
"""CLML compiler tests."""
18+
19+
import tvm
20+
import numpy as np
21+
from tvm import relay
22+
from tvm.relay import testing
23+
from tvm.relay.op.contrib import clml
24+
import pytest
25+
26+
27+
@tvm.testing.requires_openclml
28+
def test_device_annotation():
29+
mod, params = relay.testing.mobilenet.get_workload(batch_size=1)
30+
mod = clml.partition_for_clml(mod, params)
31+
with tvm.transform.PassContext(opt_level=3):
32+
relay.backend.te_compiler.get().clear()
33+
lib = relay.build(
34+
mod,
35+
target="opencl -device=adreno",
36+
target_host="llvm -mtriple=aarch64-linux-gnu",
37+
params=params
38+
)
39+
40+
if __name__ == "__main__":
41+
tvm.testing.main()

0 commit comments

Comments
 (0)