Skip to content

Commit

Permalink
fixing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriiPerets committed Oct 2, 2024
1 parent c2de4e9 commit 3c2c75b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
47 changes: 28 additions & 19 deletions src/bashi/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,44 +836,53 @@ def _remove_all_rocm_images_older_than_ubuntu2004_based(


def _remove_unsupported_cuda_versions_for_ubuntu(
parameter_value_pairs_ranges: List[ParameterValuePair],
parameter_value_pairs: List[ParameterValuePair],
removed_parameter_value_pairs: List[ParameterValuePair],
):
removed_parameter_value_pairs(
parameter_value_pairs_ranges,
remove_parameter_value_pairs_ranges(
parameter_value_pairs,
removed_parameter_value_pairs,
parameter1=UBUNTU,
value_name1=UBUNTU,
value_min_version1=0,
value_max_version1=20.04,
value_min_version1=20.04,
value_min_version1_inclusive=True,
value_max_version1=9999,
parameter2=ALPAKA_ACC_GPU_CUDA_ENABLE,
value_name2=ALPAKA_ACC_GPU_CUDA_ENABLE,
value_min_version2=12,
value_max_version2=999,
value_min_version2=OFF,
value_min_version2_inclusive=False,
value_max_version2=11,
value_max_version2_inclusive=True,
)

removed_parameter_value_pairs(
parameter_value_pairs_ranges,
remove_parameter_value_pairs_ranges(
parameter_value_pairs,
removed_parameter_value_pairs,
parameter1=UBUNTU,
value_name1=UBUNTU,
value_min_version1=0,
value_max_version1=20.04,
value_min_version1=20.04,
value_min_version1_inclusive=True,
value_max_version1=9999,
parameter2=DEVICE_COMPILER,
value_name2=NVCC,
value_min_version2=11,
value_max_version2=999,
value_min_version2=OFF,
value_min_version2_inclusive=True,
value_max_version2=11,
value_max_version2_inclusive=False,
)
for compiler_type in (HOST_COMPILER, DEVICE_COMPILER):
removed_parameter_value_pairs(
parameter_value_pairs_ranges,
remove_parameter_value_pairs_ranges(
parameter_value_pairs,
removed_parameter_value_pairs,
parameter1=UBUNTU,
value_name1=UBUNTU,
value_min_version1=0,
value_max_version1=20.04,
value_min_version1=20.04,
value_min_version1_inclusive=True,
value_max_version1=9999,
parameter2=compiler_type,
value_name2=CLANG_CUDA,
value_min_version2=11.0,
value_max_version2=9999,
value_min_version2=OFF,
value_min_version2_inclusive=True,
value_max_version2=12,
value_max_version2_inclusive=False,
)
24 changes: 12 additions & 12 deletions tests/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -2583,12 +2583,6 @@ def test_remove_unsupported_cuda_versions_for_ubuntu(self):
DEVICE_COMPILER: (NVCC, "10"),
}
),
OD(
{
UBUNTU: (UBUNTU, "22.04"),
DEVICE_COMPILER: (NVCC, "10"),
}
),
OD(
{
UBUNTU: (UBUNTU, "20.04"),
Expand Down Expand Up @@ -2619,6 +2613,12 @@ def test_remove_unsupported_cuda_versions_for_ubuntu(self):
DEVICE_COMPILER: (CLANG_CUDA, "13"),
}
),
OD(
{
UBUNTU: (UBUNTU, "18.04"),
DEVICE_COMPILER: (NVCC, "10.2"),
}
),
]
)
expected_results = parse_expected_val_pairs(
Expand All @@ -2641,6 +2641,12 @@ def test_remove_unsupported_cuda_versions_for_ubuntu(self):
DEVICE_COMPILER: (CLANG_CUDA, "13"),
}
),
OD(
{
UBUNTU: (UBUNTU, "18.04"),
DEVICE_COMPILER: (NVCC, "10.2"),
}
),
OD(
{
UBUNTU: (UBUNTU, "18.04"),
Expand Down Expand Up @@ -2671,12 +2677,6 @@ def test_remove_unsupported_cuda_versions_for_ubuntu(self):
ALPAKA_ACC_GPU_CUDA_ENABLE: (ALPAKA_ACC_GPU_CUDA_ENABLE, OFF),
}
),
OD(
{
UBUNTU: (UBUNTU, "20.04"),
ALPAKA_ACC_GPU_CUDA_ENABLE: (ALPAKA_ACC_GPU_CUDA_ENABLE, "10.2"),
}
),
OD(
{
UBUNTU: (UBUNTU, "18.04"),
Expand Down

0 comments on commit 3c2c75b

Please sign in to comment.