CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
137 lines
3.7 KiB
Python
137 lines
3.7 KiB
Python
# Copyright Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
import logging
|
|
import os
|
|
import shlex
|
|
import subprocess
|
|
from pathlib import Path
|
|
import platform
|
|
|
|
THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR")
|
|
SCRIPT_DIR = Path(__file__).resolve().parent
|
|
THEROCK_DIR = Path(
|
|
os.environ.get("THEROCK_DIR") or SCRIPT_DIR.parent.parent.parent
|
|
).resolve()
|
|
|
|
AMDGPU_FAMILIES = os.getenv("AMDGPU_FAMILIES")
|
|
os_type = platform.system().lower()
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
TEST_TO_IGNORE = {
|
|
# TODO(#2836): Re-enable gfx110X tests once issues are resolved
|
|
"gfx110X-all": {
|
|
"windows": [
|
|
"rocprim.block_discontinuity",
|
|
"rocprim.device_merge_sort",
|
|
"rocprim.device_reduce",
|
|
]
|
|
},
|
|
"gfx1151": {
|
|
"windows": [
|
|
# TODO(#2836): Re-enable test once issues are resolved
|
|
"rocprim.device_merge_sort",
|
|
# TODO(#2836): Re-enable test once issues are resolved
|
|
"rocprim.device_radix_sort",
|
|
]
|
|
},
|
|
}
|
|
|
|
QUICK_TESTS = [
|
|
"*ArgIndexIterator",
|
|
"*BasicTests.GetVersion",
|
|
"*BatchMemcpyTests/*",
|
|
"*BlockScan",
|
|
"*ConfigDispatchTests.*",
|
|
"*ConstantIteratorTests/*",
|
|
"*CountingIteratorTests/*",
|
|
"*DeviceScanTests/*",
|
|
"*DiscardIteratorTests.Less",
|
|
"*ExchangeTests*",
|
|
"*FirstPart",
|
|
"*HipcubBlockRunLengthDecodeTest/*",
|
|
"*Histogram*",
|
|
"*HistogramAtomic*",
|
|
"*HistogramSortInput*",
|
|
"*IntrinsicsTests*",
|
|
"*InvokeResultBinOpTests/*",
|
|
"*InvokeResultUnOpTests/*",
|
|
"*MergeTests/*",
|
|
"*PartitionLargeInputTest/*",
|
|
"*PartitionTests/*",
|
|
"*PredicateIteratorTests.*",
|
|
"*RadixKeyCodecTest.*",
|
|
"*RadixMergeCompareTest/*",
|
|
"*RadixSort/*",
|
|
"*RadixSortIntegral/*",
|
|
"*ReduceByKey*",
|
|
"*ReduceInputArrayTestsFloating",
|
|
"*ReduceInputArrayTestsIntegral/*",
|
|
"*ReducePrecisionTests/*",
|
|
"*ReduceSingleValueTestsFloating",
|
|
"*ReduceSingleValueTestsIntegral",
|
|
"*ReduceTests/*",
|
|
"*ReverseIteratorTests.*",
|
|
"*RunLengthEncode/*",
|
|
"*SecondPart/*",
|
|
"*SegmentedReduce/*",
|
|
"*SelectLargeInputFlaggedTest/*",
|
|
"*SelectTests/*",
|
|
"*ShuffleTestsFloating/*",
|
|
"*ShuffleTestsIntegral*",
|
|
"*SortBitonicTestsIntegral/*",
|
|
"*ThirdPart/*",
|
|
"*ThreadOperationTests/*",
|
|
"*ThreadTests/*",
|
|
"*TransformIteratorTests/*",
|
|
"*TransformTests/*",
|
|
"*VectorizationTests*",
|
|
"*WarpExchangeScatterTest/*",
|
|
"*WarpExchangeTest/*",
|
|
"*WarpLoadTest/*",
|
|
"*WarpReduceTestsFloating/*",
|
|
"*WarpReduceTestsIntegral/*",
|
|
"*WarpScanTests*",
|
|
"*WarpSortShuffleBasedTestsIntegral/*",
|
|
"*ceIntegral/*",
|
|
"*tyIntegral/*",
|
|
"TestHipGraphBasic",
|
|
]
|
|
|
|
# sharding
|
|
shard_index = int(os.getenv("SHARD_INDEX", "1")) - 1
|
|
total_shards = int(os.getenv("TOTAL_SHARDS", "1"))
|
|
|
|
|
|
cmd = [
|
|
"ctest",
|
|
"--test-dir",
|
|
f"{THEROCK_BIN_DIR}/rocprim",
|
|
"--output-on-failure",
|
|
"--parallel",
|
|
"8",
|
|
"--timeout",
|
|
"900",
|
|
"--repeat",
|
|
"until-pass:6",
|
|
# shards the tests by running a specific set of tests based on starting test (shard_index) and stride (total_shards)
|
|
"--tests-information",
|
|
f"{shard_index},,{total_shards}",
|
|
]
|
|
|
|
if AMDGPU_FAMILIES in TEST_TO_IGNORE and os_type in TEST_TO_IGNORE[AMDGPU_FAMILIES]:
|
|
ignored_tests = TEST_TO_IGNORE[AMDGPU_FAMILIES][os_type]
|
|
cmd.extend(["--exclude-regex", "|".join(ignored_tests)])
|
|
|
|
# If quick tests are enabled, we run quick tests only.
|
|
# Otherwise, we run the normal test suite
|
|
environ_vars = os.environ.copy()
|
|
test_type = os.getenv("TEST_TYPE", "full")
|
|
if test_type == "quick":
|
|
environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS)
|
|
|
|
logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}")
|
|
|
|
subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars)
|