Skip to content

Commit 0296d06

Browse files
authored
Revert "hotfix: change MAX_JOBS in aot ci (#1621)" (#1629)
This reverts commit 463cd22. <!-- .github/pull_request_template.md --> ## 📌 Description <!-- What does this PR do? Briefly describe the changes and why they’re needed. --> ## 🔍 Related Issues <!-- Link any related issues here --> ## 🚀 Pull Request Checklist Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete. ### ✅ Pre-commit Checks - [ ] I have installed `pre-commit` by running `pip install pre-commit` (or used your preferred method). - [ ] I have installed the hooks with `pre-commit install`. - [ ] I have run the hooks manually with `pre-commit run --all-files` and fixed any reported issues. > If you are unsure about how to set up `pre-commit`, see [the pre-commit documentation](https://pre-commit.com/). ## 🧪 Tests - [ ] Tests have been added or updated as needed. - [ ] All tests are passing (`unittest`, etc.). ## Reviewer Notes <!-- Optional: anything you'd like reviewers to focus on, concerns, etc. -->
1 parent 0c1fd7a commit 0296d06

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

scripts/task_test_aot_build_import.sh

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,14 @@
33
set -eo pipefail
44
set -x
55

6-
# Set MAX_JOBS based on architecture and available memory
7-
ARCH=$(uname -m)
6+
# MAX_JOBS = min(nproc, max(1, MemAvailable_GB/4))
87
MEM_AVAILABLE_GB=$(free -g | awk '/^Mem:/ {print $7}')
98
NPROC=$(nproc)
10-
11-
# Calculate base MAX_JOBS based on memory (4GB per job)
12-
BASE_MAX_JOBS=$(( MEM_AVAILABLE_GB / 4 ))
13-
if (( BASE_MAX_JOBS < 1 )); then
14-
BASE_MAX_JOBS=1
15-
elif (( NPROC < BASE_MAX_JOBS )); then
16-
BASE_MAX_JOBS=$NPROC
17-
fi
18-
19-
# Apply architecture-specific scaling
20-
if [[ "$ARCH" == "aarch64" ]]; then
21-
# Use half the jobs on aarch64 compared to x86_64
22-
MAX_JOBS=$(( BASE_MAX_JOBS / 2 ))
23-
if (( MAX_JOBS < 1 )); then
24-
MAX_JOBS=1
25-
fi
26-
else
27-
# x86_64, amd64, and other architectures use full capacity
28-
MAX_JOBS=$BASE_MAX_JOBS
9+
MAX_JOBS=$(( MEM_AVAILABLE_GB / 4 ))
10+
if (( MAX_JOBS < 1 )); then
11+
MAX_JOBS=1
12+
elif (( NPROC < MAX_JOBS )); then
13+
MAX_JOBS=$NPROC
2914
fi
3015

3116
# Export MAX_JOBS for PyTorch's cpp_extension to use

0 commit comments

Comments
 (0)