Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions kt-kernel/test/per_commit/test_moe_amx_bench_int4.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@
worker_config_dict = {
"subpool_count": 2,
"subpool_numa_map": [0, 1],
<<<<<<< HEAD
"subpool_thread_count": [30, 30],
}
CPUINFER_PARAM = 60
=======
"subpool_thread_count": [45, 45],
}
CPUINFER_PARAM = 90
>>>>>>> main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>). These markers will cause a syntax error and must be removed. Please resolve the conflict and commit the correct version of the code.

    "subpool_thread_count": [30, 30],
}
CPUINFER_PARAM = 60



def get_git_commit():
Expand Down
6 changes: 6 additions & 0 deletions kt-kernel/test/per_commit/test_moe_amx_bench_int8.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@
worker_config_dict = {
"subpool_count": 2,
"subpool_numa_map": [0, 1],
<<<<<<< HEAD
"subpool_thread_count": [30, 30],
}
CPUINFER_PARAM = 60
=======
"subpool_thread_count": [45, 45],
}
CPUINFER_PARAM = 90
>>>>>>> main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This file contains unresolved merge conflict markers (<<<<<<<, =======, >>>>>>>). These markers will cause a syntax error and must be removed. Please resolve the conflict and commit the correct version of the code.

    "subpool_thread_count": [30, 30],
}
CPUINFER_PARAM = 60



def get_git_commit():
Expand Down
8 changes: 6 additions & 2 deletions kt-kernel/test/run_suite.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import glob
import sys
from typing import List

from ci.ci_register import HWBackend, CIRegistry, collect_tests
Expand Down Expand Up @@ -37,7 +38,7 @@ def run_per_commit(hw: HWBackend, suite: str):
ci_tests = _filter_tests(collect_tests(files), hw, suite)
test_files = [TestFile(t.filename, t.est_time) for t in ci_tests]

run_unittest_files(
return run_unittest_files(
test_files,
timeout_per_file=1200,
continue_on_error=False,
Expand All @@ -61,7 +62,10 @@ def main():
)
args = parser.parse_args()
hw = HW_MAPPING[args.hw]
run_per_commit(hw, args.suite)
exit_code = run_per_commit(hw, args.suite)
# run_unittest_files returns 0 for success, -1 for failure
# Convert to standard exit codes: 0 for success, 1 for failure
sys.exit(0 if exit_code == 0 else 1)
Comment on lines +65 to +68
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic to convert the internal exit code to a standard shell exit code is correct. However, it can be simplified to be more robust and concise. The expression exit_code != 0 evaluates to False (which sys.exit treats as 0) for success and True (treated as 1) for any failure, which is more robust if the failure code ever changes from -1.

Suggested change
exit_code = run_per_commit(hw, args.suite)
# run_unittest_files returns 0 for success, -1 for failure
# Convert to standard exit codes: 0 for success, 1 for failure
sys.exit(0 if exit_code == 0 else 1)
exit_code = run_per_commit(hw, args.suite)
# run_unittest_files returns 0 for success, non-zero for failure.
# Convert to standard exit codes: 0 for success, 1 for failure.
sys.exit(exit_code != 0)



if __name__ == "__main__":
Expand Down
Loading