From 0ee0842a100abfc33f5327f36b40b27f2f063811 Mon Sep 17 00:00:00 2001 From: Matthew Barrett Date: Tue, 14 Apr 2020 12:31:25 +0100 Subject: [PATCH] Removed pattern table standalone test --- tests/python/relay/test_pattern_table.py | 45 ------------------------ 1 file changed, 45 deletions(-) delete mode 100644 tests/python/relay/test_pattern_table.py diff --git a/tests/python/relay/test_pattern_table.py b/tests/python/relay/test_pattern_table.py deleted file mode 100644 index f5a5e4bd2d4fe..0000000000000 --- a/tests/python/relay/test_pattern_table.py +++ /dev/null @@ -1,45 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# 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 -# specific language governing permissions and limitations -# under the License. -"""Unit test for pattern table registry (BYOC).""" -from tvm.relay.op.contrib import get_pattern_table, register_pattern_table -from tvm import relay - - -@register_pattern_table("test_pattern_table") -def pattern_table(): - def _make_add_relu_pattern(): - x = relay.var('x') - y = relay.var('y') - add_node = relay.add(x, y) - r = relay.nn.relu(add_node) - return r - - def _check_add_relu_pattern(): - return True - - return [ - ("test_pattern_table.add_relu", _make_add_relu_pattern(), _check_add_relu_pattern) - ] - - -def test_retrieve_pattern_table(): - table = get_pattern_table("test_pattern_table") - assert table[0][0] == "test_pattern_table.add_relu" - - -if __name__ == "__main__": - test_retrieve_pattern_table()