Skip to content

Commit cc2f079

Browse files
authored
[RELAX][BYOC] OpenCLML offload support for Relax (#17654)
This brings in OpenCLML offloading via BYOC path with available operators in Relax. Adds codegen tests for Mainline CI.
1 parent f4cdb3f commit cc2f079

File tree

27 files changed

+3227
-72
lines changed

27 files changed

+3227
-72
lines changed

cmake/modules/contrib/CLML.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
# under the License.
1717

1818
if(USE_CLML)
19-
file(GLOB CLML_RELAY_CONTRIB_SRC src/relay/backend/contrib/clml/*.cc)
19+
file(GLOB CLML_RELAX_CONTRIB_SRC src/relax/backend/contrib/clml/*.cc)
2020
file(GLOB CLML_RUNTIME_MODULE src/runtime/contrib/clml/clml_runtime.cc)
2121
include_directories(SYSTEM "3rdparty/OpenCL-Headers")
22-
list(APPEND COMPILER_SRCS ${CLML_RELAY_CONTRIB_SRC})
22+
list(APPEND COMPILER_SRCS ${CLML_RELAX_CONTRIB_SRC})
2323
if(NOT USE_CLML_GRAPH_EXECUTOR)
2424
list(APPEND COMPILER_SRCS ${CLML_RUNTIME_MODULE})
2525
endif()

python/tvm/relax/backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717
"""Relax backends"""
1818

19-
from . import contrib, cpu_generic, cuda, gpu_generic, metal, rocm
19+
from . import contrib, cpu_generic, cuda, gpu_generic, metal, rocm, adreno
2020
from .dispatch_sampling import DispatchSampling
2121
from .dispatch_sort_scan import DispatchSortScan
2222
from .pattern_registry import get_pattern, get_patterns_with_prefix
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
"""The Relax Adreno backend compilation pipeline and other passes."""
18+
from .pipeline import (
19+
finalize_passes,
20+
get_default_pipeline,
21+
dataflow_lower_passes,
22+
legalize_passes,
23+
library_dispatch_passes,
24+
)

0 commit comments

Comments
 (0)