Skip to content

Simple sdpa #3165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
55ed5ab
[RELEASE-ONLY CHANGES] Branch Cut for Release 0.2 (#2735)
guangy10 Mar 28, 2024
1f1f357
[RELEASE-ONLY CHANGES] Update release/0.2 to pin and test against PyT…
guangy10 Apr 5, 2024
9383bda
Update docs (#2919) (#2923)
pytorchbot Apr 9, 2024
e193c71
Use unified path /data/local/tmp/llama (#2899) (#2924)
pytorchbot Apr 9, 2024
166a635
Refine LLM getting started guide for uniformity, fix critical errors …
GregoryComer Apr 9, 2024
002ae53
Update docs for the demo app. (#2921)
shoumikhin Apr 8, 2024
fa4d88d
Fixing minor issues in llama2 7b repro (#2926)
mergennachin Apr 8, 2024
4e7aebf
Update iphone 15 pro benchmarking numbers (#2927)
kimishpatel Apr 8, 2024
46566b5
Fix generation speed calculation. (#2932)
shoumikhin Apr 9, 2024
2fe7543
exclude mutated buffer (#2876)
cccclai Apr 8, 2024
69bae6e
Make minor updates to LLM guide setup instructions (#2940) (#2959)
pytorchbot Apr 10, 2024
cd2779a
resolve_buck.py: Add an entry for darwin-x86_64 (#2868)
dbort Apr 10, 2024
16c3afc
Refine the LLM manual (focus on the debugging and profiling part) (#2…
pytorchbot Apr 11, 2024
6a67ec2
[RELEASE-ONLY] Fix install_requirements.sh (#3002)
guangy10 Apr 12, 2024
be476a5
Add llama2 readme in examples/README (#2992) (#2993)
pytorchbot Apr 12, 2024
ca69051
Add the missing import generate_etrecord to doc Getting Started with …
pytorchbot Apr 12, 2024
31bb2ea
Fix the wrong test-infra branch on release/0.2 (#3021)
huydhn Apr 12, 2024
28f1c8c
Add required deps to pyproject.toml
dbort Apr 13, 2024
72854c8
Install build requirements in pre_build_script.sh
dbort Apr 12, 2024
4280334
Have setup.py unset HOME when running buck2
dbort Apr 12, 2024
1352d4e
Add project.ignore to .buckconfig to reduce watched files
dbort Apr 13, 2024
d5cbc09
Don't recurse submodules when building wheels
dbort Apr 12, 2024
dc1ca98
Build pybindings and link in backends when building pip wheels
dbort Apr 13, 2024
638433f
Wrap std::isnan/std::isinf in the portable operators
dbort Apr 13, 2024
60bf405
Decouple custom ops in llama_transformer.py Part 1/N (#3005) (#3052)
cccclai Apr 16, 2024
ca7eba9
add more instructions and examples on Delegation (#3042)
pytorchbot Apr 17, 2024
87d3748
Decouple custom ops in llama_transformer.py Part 2/N (#3007) (#3061)
cccclai Apr 17, 2024
e7e9e06
Cherry-pick commits for executorch_no_prim_ops (#3025)
kirklandsign Apr 17, 2024
212e91f
Fix tutorial for Qualcomm AI Engine Direct Backend (#2956) (#3026)
kirklandsign Apr 17, 2024
925f674
Android demo app tutorial fix for XNNPACK and QNN (#2962) (#3027)
kirklandsign Apr 17, 2024
e078e93
Skip annotate boolean input (#2957) (#3051)
cccclai Apr 17, 2024
59fa8e3
Update doc-build.yml (#3045) (#3098)
pytorchbot Apr 18, 2024
0ad7043
Update doc-build.yml (#3071) (#3099)
pytorchbot Apr 18, 2024
3fe0e70
move mask as sdpa input instead of attribute (#3036) (#3114)
cccclai Apr 18, 2024
c9811bc
Documentation for Vulkan Delegate (#3113) (#3124)
pytorchbot Apr 18, 2024
27e1a62
[RELEASE-ONLY] Pin Xcode projects to release/0.2 branch (#3155)
shoumikhin Apr 19, 2024
aa3f22c
Core ML Has Added `Index_Put` Support, No Need to Skip Anymore (#2975…
pytorchbot Apr 19, 2024
dc0b5bd
Add a simple sdpa (#3037)
cccclai Apr 19, 2024
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
11 changes: 11 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@

[parser]
target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default

# Limit the number of files that the buck daemon needs to monitor. If every
# submodule is cloned recursively, some system can fail to build with "OS file
# watch limit reached".
[project]
ignore = \
.git, \
**/.git, \
third-party/pytorch/third_party, \
cmake-out, \
pip-out
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/pytorch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0a038cf0cff2d071b7359ac0491fd2ba7798a438
release/2.3
4 changes: 2 additions & 2 deletions .github/workflows/_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
linux:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
pytest -n auto --cov=./ --cov-report=xml

macos:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
uses: pytorch/test-infra/.github/workflows/macos_job.yml@release/2.3
strategy:
matrix:
include:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
jobs:
test-demo-android:
name: test-demo-android
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ concurrency:
jobs:
test-demo-ios:
name: test-demo-ios
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
uses: pytorch/test-infra/.github/workflows/macos_job.yml@release/2.3
with:
runner: macos-latest-xlarge
python-version: '3.11'
Expand All @@ -52,7 +52,7 @@ jobs:

build-frameworks-ios:
name: build-frameworks-ios
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
uses: pytorch/test-infra/.github/workflows/macos_job.yml@release/2.3
with:
runner: macos-latest-xlarge
python-version: '3.11'
Expand All @@ -64,7 +64,7 @@ jobs:
WORKSPACE=$(pwd)
pushd "${WORKSPACE}/pytorch/executorch"
BUILD_TOOL=cmake
VERSION="0.1.0"
VERSION="0.2.0"
FRAMEWORKS=(
"executorch"
"coreml_backend"
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/build-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ on:

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.3
with:
package-type: wheel
os: linux
test-infra-repository: pytorch/test-infra
test-infra-ref: main
test-infra-ref: release/2.3
with-cuda: disabled
with-rocm: disabled

Expand All @@ -43,13 +43,18 @@ jobs:
smoke-test-script: build/packaging/smoke_test.py
package-name: executorch
name: ${{ matrix.repository }}
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.3
with:
repository: ${{ matrix.repository }}
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
test-infra-ref: release/2.3
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# ExecuTorch only needs the first layer of submodules; override the
# "recursive" default to do less work, and to give the buck daemon fewer
# files to look at.
submodules: true
env-var-script: build/packaging/env_var_script_linux.sh
pre-script: ${{ matrix.pre-script }}
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/build-wheels-m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ on:

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.3
with:
package-type: wheel
os: macos-arm64
test-infra-repository: pytorch/test-infra
test-infra-ref: main
test-infra-ref: release/2.3
with-cuda: disabled
with-rocm: disabled

Expand All @@ -43,13 +43,18 @@ jobs:
smoke-test-script: build/packaging/smoke_test.py
package-name: executorch
name: ${{ matrix.repository }}
uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main
uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@release/2.3
with:
repository: ${{ matrix.repository }}
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
test-infra-ref: release/2.3
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
# ExecuTorch only needs the first layer of submodules; override the
# "recursive" default to do less work, and to give the buck daemon fewer
# files to look at.
submodules: true
env-var-script: build/packaging/env_var_script_m1.sh
pre-script: ${{ matrix.pre-script }}
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
Expand Down
48 changes: 27 additions & 21 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
build:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand Down Expand Up @@ -68,26 +68,25 @@ jobs:
make html
cd ..

# If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
GITHUB_REF=${{ github.ref }}
echo "GitHub Ref: ${GITHUB_REF}"
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then
find docs/_build/html/ -name "*.html" -print0 | xargs -0 sed -i '/<head>/a \ \ <meta name="robots" content="noindex">';
fi

cp -rf docs/_build/html/* "${RUNNER_DOCS_DIR}"

mv docs/_build/html "${RUNNER_ARTIFACT_DIR}"

ls -R "${RUNNER_ARTIFACT_DIR}"/*/*.html

# Enable preview later. Previews are available publicly
#
# upload-preview:
# if: github.repository == 'pytorch/executorch' && github.event_name == 'push' &&
# (github.ref_type == 'branch' && github.ref_name == 'main')
# uses: pytorch/test-infra/.github/workflows/linux_job.yml@main

upload-gh-pages:
needs: build
if: github.repository == 'pytorch/executorch' && github.event_name == 'push' &&
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
if: github.repository == 'pytorch/executorch' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/v'))
permissions:
contents: write
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
with:
repository: pytorch/executorch
download-artifact: docs
Expand All @@ -99,6 +98,13 @@ jobs:
REF_TYPE=${{ github.ref_type }}
REF_NAME=${{ github.ref_name }}

# If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
REF_NAME=$(echo "${{ github.ref }}")
echo "Ref name: ${REF_NAME}"
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then
find docs -name "*.html" -print0 | xargs -0 sed -i '/<head>/a \ \ <meta name="robots" content="noindex">';
fi

# If building for a release tag, branch, set the branch/tag name
# as the target folder in the gh-pages branch. The artifacts created
# during the build will be copied over to the target dir in the
Expand All @@ -108,10 +114,16 @@ jobs:
elif [[ "${REF_TYPE}" == tag ]]; then
# Strip the leading "v" as well as the trailing patch version and "-rc" suffix.
# For example: 'v0.1.2' -> '0.1' and 'v0.1.2-rc1' -> 0.1.
TARGET_FOLDER=$(echo "${REF_NAME}" | sed 's/^v//i; s/-rc[0-9]*$//; s/\.[0-9]*$//')
else
echo "ERROR: Invalid REF_TYPE: ${REF_TYPE}. Expected 'branch' or 'tag'."
exit 1
case "${REF_NAME}" in
*-rc*)
echo "Aborting upload since this is an RC tag: ${REF_NAME}"
# We don't generate -rc* documentation but for actual tag only.
exit 0
;;
*)
TARGET_FOLDER=$(echo "${REF_NAME}" | sed 's/v\([0-9]\+\)\.\([0-9]\+\)\.[0-9]\+/\1.\2/')
;;
esac
fi
echo "Target Folder: ${TARGET_FOLDER}"

Expand All @@ -122,12 +134,6 @@ jobs:
mv "${RUNNER_ARTIFACT_DIR}"/html/* "${TARGET_FOLDER}"
git add "${TARGET_FOLDER}" || true

# If it's main branch, add noindex tag to all .html files to exclude from Google Search indexing.
if [[ "${REF_NAME}" == 'main' ]]; then
find "${TARGET_FOLDER}" -type f -name "*.html" -exec sed -i '/<head>/a <meta name="robots" content="noindex">' {} \;
git add "${TARGET_FOLDER}"/**/*.html || true
fi

git config user.name 'pytorchbot'
git config user.email 'soumith+bot@pytorch.org'
git commit -m "Auto-generating sphinx docs" || true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,25 @@ jobs:
mkdir "${GITHUB_WORKSPACE}"

- name: Setup SSH (Click me for login details)
uses: pytorch/test-infra/.github/actions/setup-ssh@main
uses: pytorch/test-infra/.github/actions/setup-ssh@release/2.3
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout Executorch
uses: actions/checkout@v3

- name: Setup Linux
uses: pytorch/test-infra/.github/actions/setup-linux@main
uses: pytorch/test-infra/.github/actions/setup-linux@release/2.3

- name: Build docker image
id: build-docker-image
uses: pytorch/test-infra/.github/actions/calculate-docker-image@main
uses: pytorch/test-infra/.github/actions/calculate-docker-image@release/2.3
with:
docker-image-name: ${{ matrix.docker-image-name }}
always-rebuild: true
push: true
force-push: true

- name: Teardown Linux
uses: pytorch/test-infra/.github/actions/teardown-linux@main
uses: pytorch/test-infra/.github/actions/teardown-linux@release/2.3
if: always()
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:

jobs:
lintrunner:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
with:
runner: linux.2xlarge
docker-image: executorch-ubuntu-22.04-linter
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
environment: ${{ (github.event_name == 'schedule') && 'update-commit-hash' || '' }}
steps:
- name: update-pytorch-commit-hash
uses: pytorch/test-infra/.github/actions/update-commit-hash@main
uses: pytorch/test-infra/.github/actions/update-commit-hash@release/2.3
if: ${{ github.event_name == 'schedule' }}
with:
repo-name: pytorch
branch: main
pin-folder: .ci/docker/ci_commit_pins
test-infra-ref: main
test-infra-ref: release/2.3
updatebot-token: ${{ secrets.UPDATEBOT_TOKEN }}
pytorchbot-token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

test-setup-linux-gcc:
name: test-setup-linux-gcc
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand All @@ -58,7 +58,7 @@ jobs:

test-models-linux:
name: test-models-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
needs: gather-models
strategy:
matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
Expand All @@ -85,7 +85,7 @@ jobs:

test-llama-runner-linux:
name: test-llama-runner-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
dtype: [fp32]
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:

test-custom-ops-linux:
name: test-custom-ops-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand All @@ -164,7 +164,7 @@ jobs:

test-selective-build-linux:
name: test-selective-build-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand All @@ -189,7 +189,7 @@ jobs:

test-quantized-aot-lib-linux:
name: test-quantized-aot-lib-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand All @@ -212,7 +212,7 @@ jobs:

test-pybind-build-linux:
name: test-pybind-build-linux
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
strategy:
matrix:
include:
Expand Down
Loading