diff --git a/docs/source/executorch_custom_versions.py b/docs/source/executorch_custom_versions.py index 29c48a337ea..bb03e989a18 100644 --- a/docs/source/executorch_custom_versions.py +++ b/docs/source/executorch_custom_versions.py @@ -11,6 +11,8 @@ .ci/docker/ci_commit_pins directory, and uses them to expand specific strings in markdown files. +Users can also specify their custom version strings in the global variable `variables` + For example, `${executorch_version:pytorch}` will be replaced with the appropriate pytorch version string used by CI. """ @@ -24,7 +26,10 @@ "pytorch.txt", ] -variables: dict[str, str] = {} + +variables: dict[str, str] = { + "aar_version": "0.7.0", +} def read_version_files(): diff --git a/docs/source/getting-started.md b/docs/source/getting-started.md index be15e7d6ea2..cbec5557785 100644 --- a/docs/source/getting-started.md +++ b/docs/source/getting-started.md @@ -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:aar_version }}") } # See latest available versions in https://mvnrepository.com/artifact/org.pytorch/executorch-android diff --git a/docs/source/using-executorch-android.md b/docs/source/using-executorch-android.md index 8ac179d325d..16f53572c24 100644 --- a/docs/source/using-executorch-android.md +++ b/docs/source/using-executorch-android.md @@ -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:aar_version }}`](https://repo.maven.apache.org/maven2/org/pytorch/executorch-android/{{ executorch_version:aar_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:aar_version }}") } ``` @@ -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:aar_version }}](https://github.com/pytorch/executorch/releases/tag/{{ executorch_version:aar_version }}) | [executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/{{ executorch_version:aar_version }}/executorch.aar) | [executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/{{ executorch_version:aar_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 @@ -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:aar_version }}/executorch.aar -o app/libs/executorch.aar ``` And include it in gradle: