Skip to content

Commit

Permalink
update pytorch version (deepjavalibrary#1030)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanking authored Jun 18, 2021
1 parent 40f038c commit 6d951c9
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 31 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/native_jni_s3_pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.8.1/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.8.1/jnilib*"
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.9.0/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.9.0/jnilib*"
build-pytorch-jni-linux-gpu:
if: github.repository == 'deepjavalibrary/djl'
Expand Down Expand Up @@ -78,8 +78,8 @@ jobs:
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.8.1/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.8.1/jnilib*"
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.9.0/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.9.0/jnilib*"
build-pytorch-jni-precxx11:
if: github.repository == 'deepjavalibrary/djl'
Expand Down Expand Up @@ -116,8 +116,8 @@ jobs:
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.8.1/jnilib/precxx11
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.8.1/jnilib/precxx11*"
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.9.0/jnilib/precxx11
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.9.0/jnilib/precxx11*"
build-pytorch-jni-windows-gpu:
if: github.repository == 'deepjavalibrary/djl'
Expand Down Expand Up @@ -170,5 +170,5 @@ jobs:
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.8.1/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.8.1/jnilib*"
aws s3 sync pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch-1.9.0/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.9.0/jnilib*"
4 changes: 2 additions & 2 deletions .github/workflows/native_jni_s3_pytorch_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ jobs:
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
aws s3 sync jnilib s3://djl-ai/publish/pytorch-1.8.1/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.8.1/jnilib*"
aws s3 sync jnilib s3://djl-ai/publish/pytorch-1.9.0/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch-1.9.0/jnilib*"
4 changes: 2 additions & 2 deletions .github/workflows/native_s3_pytorch_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
matrix:
format: ["armeabi-v7a", "arm64-v8a", "x86" ,"x86_64"]
env:
PYTORCH_TAG_VERSION: "v1.8.1"
PYTORCH_VERSION: "1.8.1"
PYTORCH_TAG_VERSION: "v1.9.0"
PYTORCH_VERSION: "1.9.0"
NDK_VERSION: "20.0.5594570"
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion dlr/dlr-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
testImplementation "org.slf4j:slf4j-simple:${slf4j_version}"
testRuntimeOnly project(":pytorch:pytorch-engine")
testRuntimeOnly "ai.djl.dlr:dlr-native-auto:${dlr_version}"
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
}

processResources {
Expand Down
2 changes: 1 addition & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {

if (System.getProperty("ai.djl.default_engine") == "PyTorch") {
runtimeOnly project(":pytorch:pytorch-model-zoo")
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
} else if (System.getProperty("ai.djl.default_engine") == "TensorFlow") {
// javacpp bug fix https://github.com/bytedeco/javacpp/commit/7f27899578dfa18e22738a3dd49701e1806b464a
runtimeOnly "org.bytedeco:javacpp:1.5.6-SNAPSHOT"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true

djl_version=0.12.0
mxnet_version=1.8.0
pytorch_version=1.8.1
pytorch_version=1.9.0
tensorflow_version=2.4.1
tflite_version=2.4.1
dlr_version=1.6.0
Expand Down
2 changes: 1 addition & 1 deletion integration/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
runtimeOnly project(":mxnet:mxnet-model-zoo")
runtimeOnly "ai.djl.mxnet:mxnet-native-auto:${mxnet_version}"
runtimeOnly project(":pytorch:pytorch-model-zoo")
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
runtimeOnly project(":tensorflow:tensorflow-model-zoo")
runtimeOnly "ai.djl.tensorflow:tensorflow-native-auto:${tensorflow_version}"

Expand Down
2 changes: 0 additions & 2 deletions ml/xgboost/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ dependencies {
exclude group: "junit", module: "junit"
}

// testRuntimeOnly project(":pytorch:pytorch-engine")
// testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4j_version}"
}

Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/onnxruntime-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ dependencies {
exclude group: "junit", module: "junit"
}

// testRuntimeOnly project(":pytorch:pytorch-engine")
// testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4j_version}"
}

Expand Down
2 changes: 1 addition & 1 deletion paddlepaddle/paddlepaddle-model-zoo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {
testImplementation "org.slf4j:slf4j-simple:${slf4j_version}"
testRuntimeOnly "ai.djl.paddlepaddle:paddlepaddle-native-auto:${paddlepaddle_version}"
testRuntimeOnly project(":pytorch:pytorch-engine")
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
}

task syncS3(type: Exec) {
Expand Down
2 changes: 1 addition & 1 deletion pytorch/pytorch-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
}
testImplementation "org.slf4j:slf4j-simple:${slf4j_version}"
testRuntimeOnly project(":pytorch:pytorch-model-zoo")
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
testRuntimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public int getRank() {
/** {@inheritDoc} */
@Override
public String getVersion() {
return "1.8.1";
return "1.9.0";
}

/** {@inheritDoc} */
Expand Down
2 changes: 1 addition & 1 deletion pytorch/pytorch-native/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@rem choco install jdk8 -y

set FILEPATH="libtorch"
set VERSION="1.8.1"
set VERSION="1.9.0"
if "%1" == "cpu" (
set DOWNLOAD_URL="https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-%VERSION%%%2Bcpu.zip"
) else if "%1" == "cu102" (
Expand Down
2 changes: 1 addition & 1 deletion pytorch/pytorch-native/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
group = "ai.djl.pytorch"
apply from: file("${rootProject.projectDir}/tools/gradle/cpp-formatter.gradle")

def VERSION = "1.8.1"
def VERSION = "1.9.0"
boolean isRelease = project.hasProperty("release") || project.hasProperty("staging")
boolean isPrecxx11 = project.hasProperty("precxx11")
boolean isGPU = project.hasProperty("gpu")
Expand Down
6 changes: 2 additions & 4 deletions pytorch/pytorch-native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ elif [[ -n $(command -v sysctl) ]]; then
fi

PLATFORM=$(uname | tr '[:upper:]' '[:lower:]')
VERSION=1.8.1
VERSION=1.9.0
CXX11ABI="-cxx11-abi"
if [[ $2 == "precxx11" ]]; then
CXX11ABI=""
fi

if [[ ! -d "libtorch" ]]; then
if [[ $PLATFORM == 'linux' ]]; then
if [[ $1 == "cpu" ]] || [[ $1 == "cu111" ]]; then
curl -s https://download.pytorch.org/libtorch/${1}/libtorch${CXX11ABI}-shared-with-deps-${VERSION}%2B${1}.zip | jar xv
elif [[ $1 == "cu102" ]]; then
if [[ $1 == "cpu" ]] || [[ $1 == "cu111" ]] || [[ $1 == "cu102" ]]; then
curl -s https://download.pytorch.org/libtorch/${1}/libtorch${CXX11ABI}-shared-with-deps-${VERSION}%2B${1}.zip | jar xv
else
echo "$1 is not supported."
Expand Down
2 changes: 1 addition & 1 deletion pytorch/pytorch-native/build_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ elif [[ -n $(command -v sysctl) ]]; then
NUM_PROC=$(sysctl -n hw.ncpu)
fi

VERSION=1.8.1
VERSION=1.9.0
if [[ ! -d libtorch_android/"$1" ]]; then
if [[ $1 != "armeabi-v7a" ]] && [[ $1 != "arm64-v8a" ]] && [[ $1 != "x86" ]] && [[ $1 != "x86_64" ]]; then
echo "$1 is not supported."
Expand Down
2 changes: 1 addition & 1 deletion serving/serving/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
runtimeOnly project(':pytorch:pytorch-model-zoo')

runtimeOnly "ai.djl.mxnet:mxnet-native-auto:${mxnet_version}"
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}"
runtimeOnly "ai.djl.pytorch:pytorch-native-auto:${pytorch_version}-SNAPSHOT"
runtimeOnly "ai.djl.tensorflow:tensorflow-native-auto:${tensorflow_version}"

testImplementation("org.testng:testng:${testng_version}") {
Expand Down

0 comments on commit 6d951c9

Please sign in to comment.