Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6542e7e
Squashed 'external/llvm-project/' changes from 3332d18c2507..e8215edf…
umangyadav Jun 24, 2025
ea8c92c
Merge commit '6542e7e6b4744737fae5e3abbfe720bb1fc4786b' into upstream…
umangyadav Jun 24, 2025
3cfa54d
Fixes for external
umangyadav Jun 24, 2025
8de7cfc
[External] Remove files that no longer exists in external
umangyadav Jun 24, 2025
97602db
[External] Remove files that no longer exists in external
umangyadav Jun 24, 2025
d7237d5
[External] Some more fixes
umangyadav Jun 24, 2025
1ae19b9
Apply rocMLIR patches for external
umangyadav Jun 24, 2025
7d04ae0
Remove disabled verification tests
umangyadav Jun 24, 2025
ddd649a
Fixes for https://github.com/llvm/llvm-project/pull/144636
umangyadav Jun 24, 2025
15e6427
Fixes for rocMLIR
umangyadav Jun 24, 2025
289459b
Fixes required due to https://github.com/llvm/llvm-project/pull/144636
umangyadav Jun 24, 2025
f905655
Changes in rocMLIR due to https://github.com/llvm/llvm-project/pull/1…
umangyadav Jun 24, 2025
23cbcfb
Fix runner-pipelines.mlir test
umangyadav Jun 24, 2025
31e77d3
Update librockcompiler_deps
umangyadav Jun 24, 2025
2ccc1bb
Formating
umangyadav Jun 24, 2025
3138a41
Enable Navi4x in CI
umangyadav Jun 24, 2025
7f30da1
Fix parameterSweeps
umangyadav Jun 24, 2025
d7f9b54
Fix parameterSweeps scripts
umangyadav Jun 25, 2025
e1b3a47
Address review comments, Revert changes for Navi4x in Jenkinsfile and…
umangyadav Jun 25, 2025
4a8c3ab
Merge branch 'develop' into upstream_merge_55
umangyadav Jun 25, 2025
966a9b3
Merge branch 'develop' into upstream_merge_55
umangyadav Jun 26, 2025
74eb560
Merge branch 'develop' into upstream_merge_55
dorde-antic Jul 2, 2025
7a50d7f
Merge branch 'develop' into upstream_merge_55
dorde-antic Jul 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
140 changes: 90 additions & 50 deletions external/llvm-project/.ci/compute_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,22 @@
},
"lld": {"bolt", "cross-project-tests"},
# TODO(issues/132795): LLDB should be enabled on clang changes.
"clang": {"clang-tools-extra", "compiler-rt", "cross-project-tests"},
"clang-tools-extra": {"libc"},
"clang": {"clang-tools-extra", "cross-project-tests"},
"mlir": {"flang"},
# Test everything if ci scripts are changed.
# FIXME: Figure out what is missing and add here.
".ci": {"llvm", "clang", "lld", "lldb"},
".ci": {
"llvm",
"clang",
"lld",
"lldb",
"bolt",
"clang-tools-extra",
"mlir",
"polly",
"flang",
"libclc",
"openmp",
},
}

# This mapping describes runtimes that should be enabled for a specific project,
Expand All @@ -64,7 +74,16 @@

# This mapping describes runtimes that should be tested when the key project is
# touched.
DEPENDENT_RUNTIMES_TO_TEST = {"clang": {"libcxx", "libcxxabi", "libunwind"}}
DEPENDENT_RUNTIMES_TO_TEST = {
"clang": {"compiler-rt"},
"clang-tools-extra": {"libc"},
".ci": {"compiler-rt", "libc"},
}
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {
"llvm": {"libcxx", "libcxxabi", "libunwind"},
"clang": {"libcxx", "libcxxabi", "libunwind"},
".ci": {"libcxx", "libcxxabi", "libunwind"},
}

EXCLUDE_LINUX = {
"cross-project-tests", # TODO(issues/132796): Tests are failing.
Expand Down Expand Up @@ -93,9 +112,6 @@
"cross-project-tests",
"flang",
"libc",
"libcxx",
"libcxxabi",
"libunwind",
"lldb",
"openmp",
"polly",
Expand All @@ -122,21 +138,35 @@
"polly": "check-polly",
}

RUNTIMES = {"libcxx", "libcxxabi", "libunwind"}
RUNTIMES = {"libcxx", "libcxxabi", "libunwind", "compiler-rt", "libc"}


def _add_dependencies(projects: Set[str]) -> Set[str]:
def _add_dependencies(projects: Set[str], runtimes: Set[str]) -> Set[str]:
projects_with_dependents = set(projects)
current_projects_count = 0
while current_projects_count != len(projects_with_dependents):
current_projects_count = len(projects_with_dependents)
for project in list(projects_with_dependents):
if project not in PROJECT_DEPENDENCIES:
continue
projects_with_dependents.update(PROJECT_DEPENDENCIES[project])
if project in PROJECT_DEPENDENCIES:
projects_with_dependents.update(PROJECT_DEPENDENCIES[project])
for runtime in runtimes:
if runtime in PROJECT_DEPENDENCIES:
projects_with_dependents.update(PROJECT_DEPENDENCIES[runtime])
return projects_with_dependents


def _exclude_projects(current_projects: Set[str], platform: str) -> Set[str]:
if platform == "Linux":
to_exclude = EXCLUDE_LINUX
elif platform == "Windows":
to_exclude = EXCLUDE_WINDOWS
elif platform == "Darwin":
to_exclude = EXCLUDE_MAC
else:
raise ValueError(f"Unexpected platform: {platform}")
return current_projects.difference(to_exclude)


def _compute_projects_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
projects_to_test = set()
for modified_project in modified_projects:
Expand All @@ -154,54 +184,52 @@ def _compute_projects_to_test(modified_projects: Set[str], platform: str) -> Set
):
continue
projects_to_test.add(dependent_project)
if platform == "Linux":
for to_exclude in EXCLUDE_LINUX:
if to_exclude in projects_to_test:
projects_to_test.remove(to_exclude)
elif platform == "Windows":
for to_exclude in EXCLUDE_WINDOWS:
if to_exclude in projects_to_test:
projects_to_test.remove(to_exclude)
elif platform == "Darwin":
for to_exclude in EXCLUDE_MAC:
if to_exclude in projects_to_test:
projects_to_test.remove(to_exclude)
else:
raise ValueError("Unexpected platform.")
projects_to_test = _exclude_projects(projects_to_test, platform)
return projects_to_test


def _compute_projects_to_build(projects_to_test: Set[str]) -> Set[str]:
return _add_dependencies(projects_to_test)
def _compute_projects_to_build(
projects_to_test: Set[str], runtimes: Set[str]
) -> Set[str]:
return _add_dependencies(projects_to_test, runtimes)


def _compute_project_check_targets(projects_to_test: Set[str]) -> Set[str]:
check_targets = set()
for project_to_test in projects_to_test:
if project_to_test not in PROJECT_CHECK_TARGETS:
continue
check_targets.add(PROJECT_CHECK_TARGETS[project_to_test])
if project_to_test in PROJECT_CHECK_TARGETS:
check_targets.add(PROJECT_CHECK_TARGETS[project_to_test])
return check_targets


def _compute_runtimes_to_test(projects_to_test: Set[str]) -> Set[str]:
def _compute_runtimes_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
runtimes_to_test = set()
for project_to_test in projects_to_test:
if project_to_test in DEPENDENT_RUNTIMES_TO_TEST:
runtimes_to_test.update(DEPENDENT_RUNTIMES_TO_TEST[project_to_test])
if project_to_test in DEPENDENT_RUNTIMES_TO_BUILD:
runtimes_to_test.update(DEPENDENT_RUNTIMES_TO_BUILD[project_to_test])
return runtimes_to_test
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_TEST:
runtimes_to_test.update(DEPENDENT_RUNTIMES_TO_TEST[modified_project])
return _exclude_projects(runtimes_to_test, platform)


def _compute_runtime_check_targets(projects_to_test: Set[str]) -> Set[str]:
check_targets = set()
for project_to_test in projects_to_test:
if project_to_test not in DEPENDENT_RUNTIMES_TO_TEST:
continue
for runtime_to_test in DEPENDENT_RUNTIMES_TO_TEST[project_to_test]:
check_targets.add(PROJECT_CHECK_TARGETS[runtime_to_test])
return check_targets
def _compute_runtimes_to_test_needs_reconfig(
modified_projects: Set[str], platform: str
) -> Set[str]:
runtimes_to_test = set()
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG:
runtimes_to_test.update(
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG[modified_project]
)
return _exclude_projects(runtimes_to_test, platform)


def _compute_runtimes_to_build(
runtimes_to_test: Set[str], modified_projects: Set[str], platform: str
) -> Set[str]:
runtimes_to_build = set(runtimes_to_test)
for modified_project in modified_projects:
if modified_project in DEPENDENT_RUNTIMES_TO_BUILD:
runtimes_to_build.update(DEPENDENT_RUNTIMES_TO_BUILD[modified_project])
return _exclude_projects(runtimes_to_build, platform)


def _get_modified_projects(modified_files: list[str]) -> Set[str]:
Expand All @@ -225,10 +253,19 @@ def _get_modified_projects(modified_files: list[str]) -> Set[str]:
def get_env_variables(modified_files: list[str], platform: str) -> Set[str]:
modified_projects = _get_modified_projects(modified_files)
projects_to_test = _compute_projects_to_test(modified_projects, platform)
projects_to_build = _compute_projects_to_build(projects_to_test)
runtimes_to_test = _compute_runtimes_to_test(modified_projects, platform)
runtimes_to_test_needs_reconfig = _compute_runtimes_to_test_needs_reconfig(
modified_projects, platform
)
runtimes_to_build = _compute_runtimes_to_build(
runtimes_to_test | runtimes_to_test_needs_reconfig, modified_projects, platform
)
projects_to_build = _compute_projects_to_build(projects_to_test, runtimes_to_build)
projects_check_targets = _compute_project_check_targets(projects_to_test)
runtimes_to_build = _compute_runtimes_to_test(projects_to_test)
runtimes_check_targets = _compute_runtime_check_targets(projects_to_test)
runtimes_check_targets = _compute_project_check_targets(runtimes_to_test)
runtimes_check_targets_needs_reconfig = _compute_project_check_targets(
runtimes_to_test_needs_reconfig
)
# We use a semicolon to separate the projects/runtimes as they get passed
# to the CMake invocation and thus we need to use the CMake list separator
# (;). We use spaces to separate the check targets as they end up getting
Expand All @@ -238,6 +275,9 @@ def get_env_variables(modified_files: list[str], platform: str) -> Set[str]:
"project_check_targets": " ".join(sorted(projects_check_targets)),
"runtimes_to_build": ";".join(sorted(runtimes_to_build)),
"runtimes_check_targets": " ".join(sorted(runtimes_check_targets)),
"runtimes_check_targets_needs_reconfig": " ".join(
sorted(runtimes_check_targets_needs_reconfig)
),
}


Expand Down
Loading