Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions docs/source/executorch_custom_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"""
Sphinx extension to replace ${executorch_version:TAG} with version numbers.

It also defines a special variable ${executorch_version} that is set to the value
of `EXECUTORCH_VERSION` defined in this file.

This custom extension pulls third-party version strings from files in the
.ci/docker/ci_commit_pins directory, and uses them to expand specific strings in
markdown files.
Expand All @@ -24,10 +27,13 @@
"pytorch.txt",
]

EXECUTORCH_VERSION = "0.7.0"

variables: dict[str, str] = {}


def read_version_files():
def populate_version_variable():
variables["${executorch_version}"] = EXECUTORCH_VERSION
cwd = os.getcwd()
version_file_path = os.path.join(cwd, "..", ".ci", "docker", "ci_commit_pins")

Expand All @@ -38,7 +44,7 @@ def read_version_files():
variables[var_name] = f.read().strip()


read_version_files()
populate_version_variable()


def replace_variables(app, doctree, docname):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ To add the library to your app, add the following dependency to gradle build rul
```
# app/build.gradle.kts
dependencies {
implementation("org.pytorch:executorch-android:0.6.0")
implementation("org.pytorch:executorch-android:${executorch_version}")
}

# See latest available versions in https://mvnrepository.com/artifact/org.pytorch/executorch-android
Expand Down
9 changes: 5 additions & 4 deletions docs/source/using-executorch-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ The AAR library can be used for generic Android device with arm64-v8a or x86_64

ExecuTorch is available on [Maven Central](https://mvnrepository.com/artifact/org.pytorch/executorch-android).

Simply add the target [`org.pytorch:executorch-android:0.6.0-rc1`](https://repo.maven.apache.org/maven2/org/pytorch/executorch-android/0.6.0-rc1/) to your Android app dependency (build.gradle), and build your app.
Simply add the target [`org.pytorch:executorch-android:${executorch_version}`](https://repo.maven.apache.org/maven2/org/pytorch/executorch-android/${executorch_version}/) to your Android app dependency (build.gradle), and build your app.

For example:
```
# app/build.gradle.kts
dependencies {
implementation("org.pytorch:executorch-android:0.6.0-rc1")
implementation("org.pytorch:executorch-android:${executorch_version}")
}
```

Expand All @@ -53,7 +53,8 @@ You can also directly specify an AAR file in the app. We upload pre-built AAR to

| Version | AAR | SHASUMS |
| ------- | --- | ------- |
| [v0.6.0-rc1](https://github.com/pytorch/executorch/releases/tag/v0.6.0-rc1) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0-rc1/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0-rc1/executorch.aar.sha256sums) |
| [${executorch_version}](https://github.com/pytorch/executorch/releases/tag/${executorch_version}) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/${executorch_version}/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/${executorch_version}/executorch.aar.sha256sums) |
| [v0.6.0](https://github.com/pytorch/executorch/releases/tag/v0.6.0) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0/executorch.aar.sha256sums) |
| [v0.5.0](https://github.com/pytorch/executorch/releases/tag/v0.5.0) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/v0.5.0-rc3/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/v0.5.0-rc3/executorch.aar.sha256sums) |

### Snapshots from main branch
Expand Down Expand Up @@ -90,7 +91,7 @@ implementation("com.facebook.fbjni:fbjni:0.5.1")
In your app working directory, such as executorch/examples/demo-apps/android/LlamaDemo,
```
mkdir -p app/libs
curl https://ossci-android.s3.amazonaws.com/executorch/release/v0.6.0-rc1/executorch.aar -o app/libs/executorch.aar
curl https://ossci-android.s3.amazonaws.com/executorch/release/${executorch_version}/executorch.aar -o app/libs/executorch.aar
```

And include it in gradle:
Expand Down
Loading