From dca1d0cfebfe7bb495b438cafba308208caaec4f Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:01:12 -0800 Subject: [PATCH 1/2] Update run-docs to include `run native` run docs/native-execution.md commands during execution --- .ci/scripts/run-docs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/run-docs b/.ci/scripts/run-docs index cc88bedac..871814593 100755 --- a/.ci/scripts/run-docs +++ b/.ci/scripts/run-docs @@ -95,7 +95,7 @@ fi if [ "$1" == "multimodal" ]; then # Expecting that this might fail this test as-is, because - # it's the first on-pr test depending on githib secrets for access with HF token access + # it's the first on-pr test depending on github secrets for access with HF token access echo "::group::Create script to run multimodal" python3 torchchat/utils/scripts/updown.py --file docs/multimodal.md > ./run-multimodal.sh @@ -111,3 +111,20 @@ if [ "$1" == "multimodal" ]; then bash -x ./run-multimodal.sh echo "::endgroup::" fi + +if [ "$1" == "native" ]; then + + echo "::group::Create script to run native-execution" + python3 torchchat/utils/scripts/updown.py --file docs/native-execution.md > ./run-native.sh + # for good measure, if something happened to updown processor, + # and it did not error out, fail with an exit 1 + echo "exit 1" >> ./run-native.sh + echo "::endgroup::" + + echo "::group::Run native-execution" + echo "*******************************************" + cat ./run-native.sh + echo "*******************************************" + bash -x ./run-native.sh + echo "::endgroup::" +fi From d570093ac7d3034dec0f967605fcbeb9a3b0d3a8 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Sat, 7 Dec 2024 12:04:58 -0800 Subject: [PATCH 2/2] Update run-readme-pr.yml Include `run-docs native` in workflow --- .github/workflows/run-readme-pr.yml | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/run-readme-pr.yml b/.github/workflows/run-readme-pr.yml index 4e5e6d014..1dc2942ef 100644 --- a/.github/workflows/run-readme-pr.yml +++ b/.github/workflows/run-readme-pr.yml @@ -287,3 +287,46 @@ jobs: echo "::endgroup::" TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs multimodal + + test-native-any: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + runner: linux.g5.4xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "12.1" + timeout: 60 + script: | + echo "::group::Print machine info" + uname -a + echo "::endgroup::" + + echo "::group::Install newer objcopy that supports --set-section-alignment" + yum install -y devtoolset-10-binutils + export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH + echo "::endgroup::" + + .ci/scripts/run-docs native + + echo "::group::Completion" + echo "tests complete" + echo "*******************************************" + echo "::endgroup::" + + test-native-cpu: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + runner: linux.g5.4xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "12.1" + timeout: 60 + script: | + echo "::group::Print machine info" + uname -a + echo "::endgroup::" + + echo "::group::Install newer objcopy that supports --set-section-alignment" + yum install -y devtoolset-10-binutils + export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH + echo "::endgroup::" + + TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs native