Skip to content

Commit

Permalink
* Upgrade presets for PyTorch 2.2.2 (pull #1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
HGuillemet committed Apr 7, 2024
1 parent 811d173 commit d45473a
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Build FFmpeg with zimg to enable zscale filter ([pull #1481](https://github.com/bytedeco/javacpp-presets/pull/1481))
* Enable PulseAudio support for FFmpeg on Linux ([pull #1472](https://github.com/bytedeco/javacpp-presets/pull/1472))
* Virtualize `btCollisionWorld`, `btOverlapFilterCallback`, `btOverlapCallback` from Bullet Physics SDK ([pull #1475](https://github.com/bytedeco/javacpp-presets/pull/1475))
* Upgrade presets for PyTorch 2.2.1 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466))
* Upgrade presets for PyTorch 2.2.2 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466))

### January 29, 2024 version 1.5.10
* Introduce `macosx-arm64` builds for PyTorch ([pull #1463](https://github.com/bytedeco/javacpp-presets/pull/1463))
Expand Down
2 changes: 1 addition & 1 deletion platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform</artifactId>
<version>2.2.1-${project.version}</version>
<version>2.2.2-${project.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
Expand Down
6 changes: 3 additions & 3 deletions pytorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:

* PyTorch 2.2.1 https://pytorch.org/
* PyTorch 2.2.2 https://pytorch.org/

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Expand Down Expand Up @@ -48,14 +48,14 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform</artifactId>
<version>2.2.1-1.5.11-SNAPSHOT</version>
<version>2.2.2-1.5.11-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies required to use CUDA, cuDNN, and NCCL -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform-gpu</artifactId>
<version>2.2.1-1.5.11-SNAPSHOT</version>
<version>2.2.2-1.5.11-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies to use bundled CUDA, cuDNN, and NCCL -->
Expand Down
4 changes: 2 additions & 2 deletions pytorch/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [[ $PLATFORM == windows* ]]; then
export PYTHON_BIN_PATH=$(which python.exe)
fi

PYTORCH_VERSION=2.2.1
PYTORCH_VERSION=2.2.2

export PYTORCH_BUILD_VERSION="$PYTORCH_VERSION"
export PYTORCH_BUILD_NUMBER=1
Expand All @@ -54,7 +54,7 @@ git submodule update --init --recursive
git submodule foreach --recursive 'git reset --hard'

# Fix version of this submodule to allow compilation on windows.
# Probably could be removed when we upgrade to next version of PyTorch.
# Probably could be removed when we upgrade to 2.3
(cd third_party/pocketfft; git checkout 9d3ab05a7fffbc71a492bc6a17be034e83e8f0fe)

CPYTHON_HOST_PATH="$INSTALL_PATH/../../../cpython/cppbuild/$PLATFORM/host/"
Expand Down
2 changes: 1 addition & 1 deletion pytorch/platform/gpu/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform-gpu</artifactId>
<version>2.2.1-${project.parent.version}</version>
<version>2.2.2-${project.parent.version}</version>
<name>JavaCPP Presets Platform GPU for PyTorch</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion pytorch/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform</artifactId>
<version>2.2.1-${project.parent.version}</version>
<version>2.2.2-${project.parent.version}</version>
<name>JavaCPP Presets Platform for PyTorch</name>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion pytorch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>pytorch</artifactId>
<version>2.2.1-${project.parent.version}</version>
<version>2.2.2-${project.parent.version}</version>
<name>JavaCPP Presets for PyTorch</name>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions pytorch/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform</artifactId>
<version>2.2.1-1.5.11-SNAPSHOT</version>
<version>2.2.2-1.5.11-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies required to use CUDA, cuDNN, and NCCL -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform-gpu</artifactId>
<version>2.2.1-1.5.11-SNAPSHOT</version>
<version>2.2.2-1.5.11-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies to use bundled CUDA, cuDNN, and NCCL -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class StrideVaryingShape extends Pointer {

public native @Cast("const c10::optional<c10::VaryingShape<c10::Stride>::ListOfOptionalElements>*") @ByRef Pointer sizes();

public native @ByVal StrideVaryingShape merge(@Const @ByRef StrideVaryingShape other);


public native @ByVal StrideVectorOptional concrete_sizes();

Expand Down
4 changes: 2 additions & 2 deletions pytorch/src/gen/java/org/bytedeco/pytorch/global/torch.java
Original file line number Diff line number Diff line change
Expand Up @@ -77902,11 +77902,11 @@ scalar_t sf(scalar_t x, scalar_t y)
public static final int TORCH_VERSION_MINOR = 2;

/** Indicates the patch version of LibTorch. */
public static final int TORCH_VERSION_PATCH = 1;
public static final int TORCH_VERSION_PATCH = 2;

/** Indicates the version of LibTorch. */
public static final String TORCH_VERSION =
"2.2.1";
"2.2.2";


// Parsed from torch/csrc/autograd/InferenceMode.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
include = {
"torch/torch.h",
"torch/script.h",
// Doesn't compile on Windows. Waiting for 2.2.1.
// Doesn't compile on Windows. Waiting for 2.3.
//"torch/csrc/inductor/aoti_model_container_runner.h",

// For inclusion in JNI only, not parsed (compiler needs some complete definitions)
Expand Down Expand Up @@ -2510,6 +2510,8 @@ We need either to put an annotation info on each member, or javaName("@NoOffset

infoMap.put(new Info("caffe2::TypeMeta::deleteFn").javaText("public native @NoException(true) PointerConsumer deleteFn();")); // Parser picks up the wrong Delete

infoMap.put(new Info("c10::VaryingShape<c10::Stride>::merge").skip()); // https://github.com/pytorch/pytorch/issues/123248

}

private static String template(String t, String... args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ATen/cudnn/Descriptors.h",
"ATen/cudnn/Types.h",
"c10/cuda/CUDAGuard.h",
// Doesn't compile on Windows. Waiting for 2.2.1
// Doesn't compile on Windows. Waiting for 2.3
// "torch/csrc/inductor/aoti_model_container_runner_cuda.h",

// For inclusion in JNI only, not parsed
Expand Down

0 comments on commit d45473a

Please sign in to comment.