Skip to content
Draft
Changes from all 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
37 changes: 36 additions & 1 deletion .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,42 @@ jobs:

# Run tests
pytest


unittest-linux-aarch64:
name: unittest-linux-aarch64
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
fail-fast: false
with:
runner: linux.arm64.2xlarge
submodules: 'true'
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
timeout: 90
script: |
set -ex

# On some Linux aarch64 systems, the "atomic" library is not found during linking.
# To work around this, replace "atomic" with the literal ${ATOMIC_LIB} so the
# build system uses the full path to the atomic library.
file="third-party/sentencepiece/src/CMakeLists.txt"
sed 's/list(APPEND SPM_LIBS "atomic")/list(APPEND SPM_LIBS ${ATOMIC_LIB})/' \
"$file" > "${file}.tmp" && mv "${file}.tmp" "$file"

grep -n 'list(APPEND SPM_LIBS ${ATOMIC_LIB})' "$file" && \
echo "the file $file has been modified for atomic to use full path"


cmake -DCMAKE_BUILD_TYPE=Debug test -Bbuild/test
cmake --build build/test -j9 --config Debug
pushd build/test && ctest && popd

# Install tokenizers
pip install . -v
pip install pytest blobfile transformers>=4.53.1

# Run tests
pytest

unittest-windows:
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
with:
Expand Down