Skip to content

Commit 2b17d68

Browse files
authored
[BE] Add CI for check_binary.sh changes (#1637)
Make sure latest nightly passes the testing for: - Linux Wheel CPU - Linux Wheel CUDA Tweak script a bit to work correctly with relative path to executable
1 parent 5d7e8e1 commit 2b17d68

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test check_binary
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
paths:
9+
- .github/workflows/test-check-binary.yml
10+
- check_binary.sh
11+
- test/smoke_test/smoke_test.py
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
check_binary_linux_cpu:
19+
name: Test check_binary.sh for Linux CPU
20+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
21+
with:
22+
repository: "pytorch/builder"
23+
docker-image: python:3.11
24+
script: |
25+
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
26+
DESIRED_PYTHON=3.11 DESIRED_CUDA=cpu PACKAGE_TYPE=manywheel ./check_binary.sh
27+
28+
check_binary_linux_cuda:
29+
name: Test check_binary.sh for Linux CUDA
30+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
31+
with:
32+
repository: "pytorch/builder"
33+
runner: linux.4xlarge.nvidia.gpu
34+
docker-image: python:3.11
35+
script: |
36+
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
37+
DESIRED_PYTHON=3.11 DESIRED_CUDA=cu121 PACKAGE_TYPE=manywheel ./check_binary.sh

check_binary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ setup_link_flags () {
261261
fi
262262
}
263263

264-
TEST_CODE_DIR="$(dirname ${BASH_SOURCE[0]})/test_example_code"
264+
TEST_CODE_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))/test_example_code"
265265
build_and_run_example_cpp () {
266266
if [[ "$DESIRED_DEVTOOLSET" == *"cxx11-abi"* ]]; then
267267
GLIBCXX_USE_CXX11_ABI=1

0 commit comments

Comments
 (0)