Skip to content

Commit 16e9491

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents c095f07 + 0c210fc commit 16e9491

File tree

490 files changed

+22093
-4981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

490 files changed

+22093
-4981
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: "\U00002744 Flaky Test"
3+
about: Report a flaky test, make sure to include links to CI runs, a sample failure log, and the name of the test(s)
4+
title: "[Flaky Test] "
5+
labels: "test: flaky"
6+
---
7+
8+
Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first :smile_cat:
9+
10+
These tests were found to be flaky (intermittently failing on `main` or failed in a PR with unrelated changes). As per [the docs](https://github.com/apache/tvm/blob/main/docs/contribute/ci.rst#handling-flaky-failures, these failures will be disabled in a PR that references this issue until the test owners can fix the source of the flakiness.
11+
12+
### Test(s)
13+
14+
- `tests/python/some_file.py::the_test_name`
15+
16+
### Jenkins Links
17+
18+
- Please provide link(s) to failed CI runs. If runs are for a PR, explain why your PR did not break the test (e.g. did not touch that part of the codebase)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
18+
# GH actions.
19+
# We use it to cover windows and mac builds
20+
# Jenkins is still the primary CI
21+
22+
name: Update last-successful branch
23+
24+
on:
25+
schedule:
26+
- cron: "0/15 * * * *"
27+
workflow_dispatch:
28+
29+
concurrency:
30+
group: update-last-successful-branch
31+
cancel-in-progress: true
32+
33+
jobs:
34+
update-last-successful-branch:
35+
runs-on: ubuntu-20.04
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Update last-successful branch
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: |
42+
set -eux
43+
python tests/scripts/update_branch.py || echo step failed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ DerivedData/
108108
*.class
109109
jvm/*/target/
110110
jvm/*/*/target/
111+
jvm/native/*/generated
112+
jvm/native/src/main/native/org_apache_tvm_native_c_api.h
111113
*.worksheet
112114
*.idea
113115
*.iml

CMakeLists.txt

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ add_library(tvm_runtime_objs OBJECT ${RUNTIME_SRCS})
482482
add_library(tvm_libinfo_objs OBJECT ${LIBINFO_FILE})
483483

484484
add_library(tvm SHARED $<TARGET_OBJECTS:tvm_objs> $<TARGET_OBJECTS:tvm_runtime_objs> $<TARGET_OBJECTS:tvm_libinfo_objs>)
485+
target_include_directories(tvm PUBLIC "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
485486
set_property(TARGET tvm APPEND PROPERTY LINK_OPTIONS "${TVM_NO_UNDEFINED_SYMBOLS}")
486487
set_property(TARGET tvm APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAG}")
487488
if(BUILD_STATIC_RUNTIME)
@@ -496,6 +497,7 @@ else()
496497
add_library(tvm_runtime SHARED $<TARGET_OBJECTS:tvm_runtime_objs> $<TARGET_OBJECTS:tvm_libinfo_objs>)
497498
set_property(TARGET tvm_runtime APPEND PROPERTY LINK_OPTIONS "${TVM_NO_UNDEFINED_SYMBOLS}")
498499
endif()
500+
target_include_directories(tvm_runtime PUBLIC "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
499501
set_property(TARGET tvm_runtime APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAG}")
500502

501503
target_compile_definitions(tvm_objs PUBLIC DMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>)
@@ -566,17 +568,6 @@ target_link_libraries(tvm_runtime PRIVATE ${TVM_RUNTIME_LINKER_LIBS})
566568

567569
# Set flags for clang
568570
include(cmake/modules/ClangFlags.cmake)
569-
570-
# Related headers
571-
target_include_directories(
572-
tvm
573-
PUBLIC "topi/include")
574-
target_include_directories(
575-
tvm_objs
576-
PUBLIC "topi/include")
577-
target_include_directories(
578-
tvm_libinfo_objs
579-
PUBLIC "topi/include")
580571
set(CRC16_INCLUDE_PATH "3rdparty/libcrc/include")
581572
target_include_directorieS(
582573
tvm_objs
@@ -621,33 +612,56 @@ endif()
621612
add_custom_target(runtime DEPENDS tvm_runtime)
622613

623614
# Installation rules
624-
install(TARGETS tvm DESTINATION lib${LIB_SUFFIX})
625-
install(TARGETS tvm_runtime DESTINATION lib${LIB_SUFFIX})
615+
install(TARGETS tvm EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_SUFFIX})
616+
install(TARGETS tvm_runtime EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_SUFFIX})
626617

627618
if (INSTALL_DEV)
628619
install(
629-
DIRECTORY "include/." DESTINATION "include"
620+
DIRECTORY "include/" DESTINATION "include"
630621
FILES_MATCHING
631622
PATTERN "*.h"
632623
)
633624
install(
634-
DIRECTORY "3rdparty/dlpack/include/." DESTINATION "include"
625+
DIRECTORY "3rdparty/dlpack/include/" DESTINATION "include"
635626
FILES_MATCHING
636627
PATTERN "*.h"
637628
)
638629
install(
639-
DIRECTORY "3rdparty/dmlc-core/include/." DESTINATION "include"
630+
DIRECTORY "3rdparty/dmlc-core/include/" DESTINATION "include"
640631
FILES_MATCHING
641632
PATTERN "*.h"
642633
)
643634
else(INSTALL_DEV)
644635
install(
645-
DIRECTORY "include/tvm/runtime/." DESTINATION "include/tvm/runtime"
636+
DIRECTORY "include/tvm/runtime/" DESTINATION "include/tvm/runtime"
646637
FILES_MATCHING
647638
PATTERN "*.h"
648639
)
649640
endif(INSTALL_DEV)
650641

642+
include(GNUInstallDirs)
643+
include(CMakePackageConfigHelpers)
644+
set(PROJECT_CONFIG_CONTENT "@PACKAGE_INIT@\n")
645+
string(APPEND PROJECT_CONFIG_CONTENT "include(CMakeFindDependencyMacro)\n")
646+
string(APPEND PROJECT_CONFIG_CONTENT "find_dependency(Threads REQUIRED)\n")
647+
string(APPEND PROJECT_CONFIG_CONTENT
648+
"include(\"\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake\")")
649+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/temp_config_file.cmake" ${PROJECT_CONFIG_CONTENT})
650+
651+
install(EXPORT ${PROJECT_NAME}Targets
652+
NAMESPACE ${PROJECT_NAME}::
653+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
654+
655+
# Create config for find_package()
656+
configure_package_config_file(
657+
"${CMAKE_CURRENT_BINARY_DIR}/temp_config_file.cmake" ${PROJECT_NAME}Config.cmake
658+
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
659+
660+
install(
661+
FILES
662+
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
663+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
664+
651665
# More target definitions
652666
if(MSVC)
653667
target_compile_definitions(tvm_objs PRIVATE -DTVM_EXPORTS)

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ We do encourage everyone to work anything they are interested in.
6464
- [Christopher Sidebottom](https://github.com/Mousius): @Mousius - arm, ethos-u, relay
6565
- [Junru Shao](https://github.com/junrushao1994) (PMC): @junrushao1994 - relay, compiler
6666
- [Haichen Shen](https://github.com/icemelon) (PMC): @icemelon - relay, topi
67+
- [Chris Sullivan](https://github.com/csullivan): @csullivan - amd backend
6768
- [Siva Rama Krishna Reddy](https://github.com/srkreddy1238): @srkreddy1238 - frontends, golang
6869
- [Zhixun Tan](https://github.com/phisiart): @phisiart - opengl, web
6970
- [Andrew Tulloch](https://github.com/ajtulloch): @ajtulloch - topi, compiler, runtime

0 commit comments

Comments
 (0)