Skip to content

Commit

Permalink
* Upgrade presets for NumPy 2.0.0, SciPy 1.14.0, Tesseract 5.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jun 23, 2024
1 parent 6bea78f commit 7fffcc1
Show file tree
Hide file tree
Showing 128 changed files with 2,143 additions and 969 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
# runs-on: ubuntu-20.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-arm64:
runs-on: ubuntu-20.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
# linux-arm64:
# runs-on: ubuntu-20.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
# linux-ppc64le:
# runs-on: ubuntu-20.04
# steps:
Expand All @@ -51,7 +51,7 @@ jobs:
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions
redeploy:
needs: [linux-arm64, linux-x86_64, macosx-x86_64, windows-x86_64]
needs: [linux-x86_64, macosx-x86_64, windows-x86_64]
# needs: [linux-armhf, linux-arm64, linux-ppc64le, linux-x86, linux-x86_64, macosx-x86_64, windows-x86, windows-x86_64]
runs-on: ubuntu-20.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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 OpenCV 4.10.0, FFmpeg 7.0, DNNL 3.4.1, OpenBLAS 0.3.27, CMINPACK 1.3.9, GSL 2.8, CPython 3.12.4, NumPy 1.26.4, SciPy 1.13.1, LLVM 18.1.4, libffi 3.4.6, PyTorch 2.3.0 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466)), SentencePiece 0.2.0, TensorFlow Lite 2.16.1, TensorRT 10.0.1.6, Triton Inference Server 2.44.0, ONNX 1.16.1, ONNX Runtime 1.18.0, TVM 0.16.0, and their dependencies
* Upgrade presets for OpenCV 4.10.0, FFmpeg 7.0, DNNL 3.4.1, OpenBLAS 0.3.27, CMINPACK 1.3.9, GSL 2.8, CPython 3.12.4, NumPy 2.0.0, SciPy 1.14.0, LLVM 18.1.4, Tesseract 5.4.1, libffi 3.4.6, PyTorch 2.3.0 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466)), SentencePiece 0.2.0, TensorFlow Lite 2.16.1, TensorRT 10.0.1.6, Triton Inference Server 2.44.0, ONNX 1.16.1, ONNX Runtime 1.18.0, TVM 0.16.0, and their dependencies

### 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ Each child module in turn relies by default on the included [`cppbuild.sh` scrip
* FFTW 3.3.10 http://www.fftw.org/download.html
* GSL 2.8 http://www.gnu.org/software/gsl/#downloading
* CPython 3.12.x https://www.python.org/downloads/
* NumPy 1.26.x https://github.com/numpy/numpy
* SciPy 1.13.x https://github.com/scipy/scipy
* NumPy 2.0.x https://github.com/numpy/numpy
* SciPy 1.14.x https://github.com/scipy/scipy
* Gym 0.26.x https://github.com/openai/gym
* LLVM 18.1.x http://llvm.org/releases/download.html
* libffi 3.4.x https://github.com/libffi/libffi
* libpostal 1.1 https://github.com/openvenues/libpostal
* LibRaw 0.21.x https://www.libraw.org/download
* Leptonica 1.84.x http://www.leptonica.org/download.html
* Tesseract 5.3.x https://github.com/tesseract-ocr/tesseract
* Tesseract 5.4.x https://github.com/tesseract-ocr/tesseract
* Caffe 1.0 https://github.com/BVLC/caffe
* OpenPose 1.7.0 https://github.com/CMU-Perceptual-Computing-Lab/openpose
* CUDA 12.3.x https://developer.nvidia.com/cuda-downloads
Expand Down
4 changes: 2 additions & 2 deletions numpy/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:

* NumPy 1.26.4 http://www.numpy.org/
* NumPy 2.0.0 http://www.numpy.org/

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

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

<!-- Additional dependencies to use bundled full version of MKL -->
Expand Down
14 changes: 1 addition & 13 deletions numpy/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then
exit
fi

NUMPY_VERSION=1.26.4
NUMPY_VERSION=2.0.0
download https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz numpy-$NUMPY_VERSION.tar.gz

mkdir -p $PLATFORM
Expand Down Expand Up @@ -57,18 +57,6 @@ sedinplace "/lapack_dep = dependency(.*)/c\\
lapack_dep = blas\\
" numpy/meson.build

sedinplace '/_distributor_init_local/d' numpy/meson.build

# https://github.com/scipy/scipy/issues/13072
sedinplace 's/for lib in libraries:/for lib in libraries[:]:/g' ./numpy/distutils/command/build_ext.py

# https://github.com/numpy/numpy/pull/20354
sedinplace 's/auto x/double x/g' numpy/core/setup.py

sedinplace '/import numpy.distutils.command.sdist/i\
import setuptools\
' setup.py

echo "[openblas]" > site.cfg
echo "libraries = openblas" >> site.cfg
echo "library_dirs = $OPENBLAS_PATH/lib/" >> site.cfg
Expand Down
16 changes: 8 additions & 8 deletions numpy/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>numpy-platform</artifactId>
<version>1.26.4-${project.parent.version}</version>
<version>2.0.0-${project.parent.version}</version>
<name>JavaCPP Presets Platform for NumPy</name>

<properties>
Expand Down Expand Up @@ -41,12 +41,12 @@
<!-- <version>${project.version}</version>-->
<!-- <classifier>${javacpp.platform.linux-armhf}</classifier>-->
<!-- </dependency>-->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.linux-arm64}</classifier>
</dependency>
<!-- <dependency>-->
<!-- <groupId>${project.groupId}</groupId>-->
<!-- <artifactId>${javacpp.moduleId}</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- <classifier>${javacpp.platform.linux-arm64}</classifier>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>${project.groupId}</groupId>-->
<!-- <artifactId>${javacpp.moduleId}</artifactId>-->
Expand Down Expand Up @@ -141,7 +141,7 @@
<moduleInfoSource>
module org.bytedeco.${javacpp.moduleId}.platform {
// requires static org.bytedeco.${javacpp.moduleId}.linux.armhf;
requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
// requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
// requires static org.bytedeco.${javacpp.moduleId}.linux.ppc64le;
// requires static org.bytedeco.${javacpp.moduleId}.linux.x86;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
Expand Down
8 changes: 4 additions & 4 deletions numpy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.bytedeco</groupId>
<artifactId>numpy</artifactId>
<version>1.26.4-${project.parent.version}</version>
<version>2.0.0-${project.parent.version}</version>
<name>JavaCPP Presets for NumPy</name>

<dependencies>
Expand Down Expand Up @@ -81,14 +81,14 @@
<includePath>${basedir}/../cpython/target/classes/org/bytedeco/cpython/include/</includePath>
<includePath>${basedir}/../cpython/cppbuild/${javacpp.platform}/include/</includePath>
<includePath>${basedir}/../cpython/cppbuild/${javacpp.platform}/include/python3.12/</includePath>
<includePath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/include/</includePath>
<includePath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/include/numpy/</includePath>
<includePath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/include/</includePath>
<includePath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/include/numpy/</includePath>
</includePaths>
<linkPaths>
<linkPath>${basedir}/../openblas/cppbuild/${javacpp.platform}/lib/</linkPath>
<linkPath>${basedir}/../cpython/cppbuild/${javacpp.platform}/lib/</linkPath>
<linkPath>${basedir}/../cpython/cppbuild/${javacpp.platform}/libs/</linkPath>
<linkPath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/lib/</linkPath>
<linkPath>${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/lib/</linkPath>
</linkPaths>
<preloadPaths>
<preloadPath>${basedir}/../openblas/cppbuild/${javacpp.platform}/bin/</preloadPath>
Expand Down
2 changes: 1 addition & 1 deletion numpy/samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>numpy-platform</artifactId>
<version>1.26.4-1.5.11-SNAPSHOT</version>
<version>2.0.0-1.5.11-SNAPSHOT</version>
</dependency>

<!-- Additional dependencies to use bundled full version of MKL -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
import static org.bytedeco.numpy.global.numpy.*;

@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArray_FastPutmaskFunc extends FunctionPointer {
public class PyArrayDTypeMeta_CommonDType extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArray_FastPutmaskFunc(Pointer p) { super(p); }
protected PyArray_FastPutmaskFunc() { allocate(); }
public PyArrayDTypeMeta_CommonDType(Pointer p) { super(p); }
protected PyArrayDTypeMeta_CommonDType() { allocate(); }
private native void allocate();
public native void call(Pointer in, Pointer mask, @Cast("npy_intp") long n_in,
Pointer values, @Cast("npy_intp") long nv);
public native PyArray_DTypeMeta call(
PyArray_DTypeMeta dtype1, PyArray_DTypeMeta dtype2);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
import static org.bytedeco.numpy.global.numpy.*;



@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArray_FastClipFunc extends FunctionPointer {
public class PyArrayDTypeMeta_CommonInstance extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArray_FastClipFunc(Pointer p) { super(p); }
protected PyArray_FastClipFunc() { allocate(); }
public PyArrayDTypeMeta_CommonInstance(Pointer p) { super(p); }
protected PyArrayDTypeMeta_CommonInstance() { allocate(); }
private native void allocate();
public native void call(Pointer in, @Cast("npy_intp") long n_in, Pointer min,
Pointer max, Pointer out);
public native PyArray_Descr call(
PyArray_Descr dtype1, PyArray_Descr dtype2);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@

import static org.bytedeco.numpy.global.numpy.*;


@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArray_PartitionFunc extends FunctionPointer {
public class PyArrayDTypeMeta_DefaultDescriptor extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArray_PartitionFunc(Pointer p) { super(p); }
protected PyArray_PartitionFunc() { allocate(); }
public PyArrayDTypeMeta_DefaultDescriptor(Pointer p) { super(p); }
protected PyArrayDTypeMeta_DefaultDescriptor() { allocate(); }
private native void allocate();
public native int call(Pointer arg0, @Cast("npy_intp") long arg1, @Cast("npy_intp") long arg2,
@Cast("npy_intp*") SizeTPointer arg3, @Cast("npy_intp*") SizeTPointer arg4,
Pointer arg5);
public native PyArray_Descr call(PyArray_DTypeMeta cls);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
import static org.bytedeco.numpy.global.numpy.*;


/*
* This is a function for hooking into the PyDataMem_NEW/FREE/RENEW functions.
* See the documentation for PyDataMem_SetEventHook.
*/

@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyDataMem_EventHookFunc extends FunctionPointer {
public class PyArrayDTypeMeta_DiscoverDescrFromPyobject extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyDataMem_EventHookFunc(Pointer p) { super(p); }
protected PyDataMem_EventHookFunc() { allocate(); }
public PyArrayDTypeMeta_DiscoverDescrFromPyobject(Pointer p) { super(p); }
protected PyArrayDTypeMeta_DiscoverDescrFromPyobject() { allocate(); }
private native void allocate();
public native void call(Pointer inp, Pointer outp, @Cast("size_t") long size,
Pointer user_data);
public native PyArray_Descr call(
PyArray_DTypeMeta cls, PyObject obj);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.numpy;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.cpython.*;
import static org.bytedeco.cpython.global.python.*;

import static org.bytedeco.numpy.global.numpy.*;

@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArrayDTypeMeta_EnsureCanonical extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArrayDTypeMeta_EnsureCanonical(Pointer p) { super(p); }
protected PyArrayDTypeMeta_EnsureCanonical() { allocate(); }
private native void allocate();
public native PyArray_Descr call(PyArray_Descr dtype);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.numpy;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.cpython.*;
import static org.bytedeco.cpython.global.python.*;

import static org.bytedeco.numpy.global.numpy.*;

/*
* Returns either a new reference to *dtype* or a new descriptor instance
* initialized with the same parameters as *dtype*. The caller cannot know
* which choice a dtype will make. This function is called just before the
* array buffer is created for a newly created array, it is not called for
* views and the descriptor returned by this function is attached to the array.
*/
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArrayDTypeMeta_FinalizeDescriptor extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArrayDTypeMeta_FinalizeDescriptor(Pointer p) { super(p); }
protected PyArrayDTypeMeta_FinalizeDescriptor() { allocate(); }
private native void allocate();
public native PyArray_Descr call(PyArray_Descr dtype);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.numpy;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.cpython.*;
import static org.bytedeco.cpython.global.python.*;

import static org.bytedeco.numpy.global.numpy.*;

@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArrayDTypeMeta_GetItem extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArrayDTypeMeta_GetItem(Pointer p) { super(p); }
protected PyArrayDTypeMeta_GetItem() { allocate(); }
private native void allocate();
public native PyObject call(PyArray_Descr arg0, @Cast("char*") BytePointer arg1);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.numpy;

import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;

import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import org.bytedeco.cpython.*;
import static org.bytedeco.cpython.global.python.*;

import static org.bytedeco.numpy.global.numpy.*;


/*
* Before making this public, we should decide whether it should pass
* the type, or allow looking at the object. A possible use-case:
* `np.array(np.array([0]), dtype=np.ndarray)`
* Could consider arrays that are not `dtype=ndarray` "scalars".
*/
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArrayDTypeMeta_IsKnownScalarType extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public PyArrayDTypeMeta_IsKnownScalarType(Pointer p) { super(p); }
protected PyArrayDTypeMeta_IsKnownScalarType() { allocate(); }
private native void allocate();
public native int call(
PyArray_DTypeMeta cls, PyTypeObject obj);
}
Loading

0 comments on commit 7fffcc1

Please sign in to comment.