Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux-arm64 builds to presets for TensorRT #1044

Merged
merged 17 commits into from
May 9, 2021
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
7 changes: 7 additions & 0 deletions .github/actions/deploy-ubuntu/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ runs:
ln -sf /usr/local/Video_Codec_SDK_* /usr/local/videocodecsdk
fi

if [[ "$CI_DEPLOY_MODULE" == "tensorrt" ]]; then
echo Installing TensorRT
python3 -m gdown.cli https://drive.google.com/uc?id=1uwb4nISZT0-FcpTQ4dnWaD47fLQu69IP
tar -hxvf TensorRT-7.2.1.6.Ubuntu-18.04.aarch64-gnu.cuda-11.1.cudnn8.0.tar.gz -C /usr/local/
ln -sf /usr/local/TensorRT* /usr/local/tensorrt
fi

if [[ "$CI_DEPLOY_PLATFORM" == "linux-armhf" ]] && [[ "$CI_DEPLOY_MODULE" == "flycapture" ]]; then
echo Installing FlyCapture amdhf
python3 -m gdown.cli https://drive.google.com/uc?id=16NuUBs2MXQpVYqzDCEr9KdMng-6rHuDI
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tensorrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ env:
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
STAGING_REPOSITORY: ${{ secrets.STAGING_REPOSITORY }}
jobs:
linux-arm64:
runs-on: ubuntu-16.04
container: ubuntu:xenial
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-x86_64:
runs-on: ubuntu-16.04
container: centos:6
Expand All @@ -26,7 +31,7 @@ jobs:
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions
redeploy:
needs: [linux-x86_64, windows-x86_64]
needs: [linux-arm64, linux-x86_64, windows-x86_64]
runs-on: ubuntu-16.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/redeploy@actions
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

* Add Windows build for ONNX ([issue #983](https://github.com/bytedeco/javacpp-presets/issues/983))
* Add `linux-arm64` builds to presets for DNNL, OpenCL, and ONNX Runtime
* Add `linux-arm64` builds to presets for DNNL, OpenCL, TensorRT ([pull #1044](https://github.com/bytedeco/javacpp-presets/pull/1044)), and ONNX Runtime
* Build FFmpeg with libxml2, enabling support for DASH demuxing ([pull #1033](https://github.com/bytedeco/javacpp-presets/pull/1033)), and libsrt for SRT protocol support ([pull #1036](https://github.com/bytedeco/javacpp-presets/pull/1036))
* Add `@MemberGetter` for `av_log_default_callback()` in presets for FFmpeg ([issue #812](https://github.com/bytedeco/javacpp-presets/issues/812))
* Include `cudaGL.h` and `cuda_gl_interop.h` header files in presets for CUDA ([pull #1027](https://github.com/bytedeco/javacpp-presets/pull/1027))
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@
<module>cuda</module>
<module>nvcodec</module>
<module>opencl</module>
<module>tensorrt</module>
<module>onnxruntime</module>
<module>cpu_features</module>
<module>systems</module>
Expand Down
6 changes: 6 additions & 0 deletions tensorrt/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ if [[ -z "$PLATFORM" ]]; then
fi

case $PLATFORM in
linux-arm64)
if [[ ! -f "/usr/include/aarch64-linux-gnu/NvInfer.h" ]] && [[ ! -d "/usr/local/tensorrt/" ]]; then
echo "Please install TensorRT under the default installation directory or in /usr/local/tensorrt/"
exit 1
fi
;;
linux-x86_64)
if [[ ! -f "/usr/include/x86_64-linux-gnu/NvInfer.h" ]] && [[ ! -d "/usr/local/tensorrt/" ]]; then
echo "Please install TensorRT under the default installation directory or in /usr/local/tensorrt/"
Expand Down
9 changes: 8 additions & 1 deletion tensorrt/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
</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 All @@ -54,7 +60,7 @@
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-arm64.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Expand Down Expand Up @@ -99,6 +105,7 @@
<file>${project.build.directory}/${project.artifactId}.jar</file>
<moduleInfoSource>
module org.bytedeco.${javacpp.moduleId}.platform {
requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64;
}
Expand Down
9 changes: 8 additions & 1 deletion tensorrt/platform/redist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<artifactId>${javacpp.moduleId}-platform</artifactId>
<version>${project.version}</version>
</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 All @@ -50,7 +56,7 @@
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64-redist.jar ${javacpp.moduleId}-windows-x86_64-redist.jar</Class-Path>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-arm64-redist.jar ${javacpp.moduleId}-linux-x86_64-redist.jar ${javacpp.moduleId}-windows-x86_64-redist.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Expand Down Expand Up @@ -95,6 +101,7 @@
<file>${project.build.directory}/${project.artifactId}.jar</file>
<moduleInfoSource>
module org.bytedeco.${javacpp.moduleId}.platform.redist {
requires static org.bytedeco.${javacpp.moduleId}.linux.arm64.redist;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64.redist;
requires static org.bytedeco.${javacpp.moduleId}.windows.x86_64.redist;
}
Expand Down
16 changes: 8 additions & 8 deletions tensorrt/src/gen/java/org/bytedeco/tensorrt/global/nvinfer.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.global;

Expand Down Expand Up @@ -377,7 +377,7 @@ public class nvinfer extends org.bytedeco.tensorrt.presets.nvinfer {
kLINEAR(0),
/** Deprecated name of kLINEAR, provided for backwards compatibility and will
* be removed in TensorRT 8.0. */
kNCHW(kLINEAR),
kNCHW(kLINEAR.value),

/** Two wide channel vectorized row major format. This format is bound to
* FP16. It is only available for dimensions >= 3.
Expand All @@ -388,7 +388,7 @@ public class nvinfer extends org.bytedeco.tensorrt.presets.nvinfer {
kCHW2(1),
/** Deprecated name of kCHW2, provided for backwards compatibility and will
* be removed in TensorRT 8.0. */
kNC2HW2(kCHW2),
kNC2HW2(kCHW2.value),

/** Eight channel format where C is padded to a multiple of 8. This format
* is bound to FP16. It is only available for dimensions >= 3.
Expand All @@ -402,7 +402,7 @@ public class nvinfer extends org.bytedeco.tensorrt.presets.nvinfer {

//!
//!
kNHWC8(kHWC8),
kNHWC8(kHWC8.value),

/** Four wide channel vectorized row major format. This format is bound to
* INT8 or FP16. It is only available for dimensions >= 3.
Expand Down Expand Up @@ -521,10 +521,10 @@ public class nvinfer extends org.bytedeco.tensorrt.presets.nvinfer {
* Tag for plug-in versions. Used in upper byte of getTensorRTVersion().
* */
@Namespace("nvinfer1") public enum PluginVersion {
kV2((byte)0), /** IPluginV2 */
kV2_EXT((byte)1), /** IPluginV2Ext */
kV2_IOEXT((byte)2), /** IPluginV2IOExt */
kV2_DYNAMICEXT((byte)3);/** IPluginV2DynamicExt */
kV2((byte)(0)), /** IPluginV2 */
kV2_EXT((byte)(1)), /** IPluginV2Ext */
kV2_IOEXT((byte)(2)), /** IPluginV2IOExt */
kV2_DYNAMICEXT((byte)(3));/** IPluginV2DynamicExt */

public final byte value;
private PluginVersion(byte v) { this.value = v; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.global;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.global;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.global;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
4 changes: 2 additions & 2 deletions tensorrt/src/gen/java/org/bytedeco/tensorrt/nvinfer/Dims.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -48,7 +48,7 @@ public class Dims extends Pointer {
return (Dims)super.position(position);
}
@Override public Dims getPointer(long i) {
return new Dims((Pointer)this).position(position + i);
return new Dims((Pointer)this).offsetAddress(i);
}

/** The maximum number of dimensions supported for a tensor. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -35,7 +35,7 @@ public class Dims2 extends Dims {
return (Dims2)super.position(position);
}
@Override public Dims2 getPointer(long i) {
return new Dims2((Pointer)this).position(position + i);
return new Dims2((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -35,7 +35,7 @@ public class Dims3 extends Dims {
return (Dims3)super.position(position);
}
@Override public Dims3 getPointer(long i) {
return new Dims3((Pointer)this).position(position + i);
return new Dims3((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -35,7 +35,7 @@ public class Dims4 extends Dims {
return (Dims4)super.position(position);
}
@Override public Dims4 getPointer(long i) {
return new Dims4((Pointer)this).position(position + i);
return new Dims4((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -37,7 +37,7 @@ public class DimsCHW extends Dims3 {
return (DimsCHW)super.position(position);
}
@Override public DimsCHW getPointer(long i) {
return new DimsCHW((Pointer)this).position(position + i);
return new DimsCHW((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -39,7 +39,7 @@ public class DimsExprs extends Pointer {
return (DimsExprs)super.position(position);
}
@Override public DimsExprs getPointer(long i) {
return new DimsExprs((Pointer)this).position(position + i);
return new DimsExprs((Pointer)this).offsetAddress(i);
}

/** The number of dimensions. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -35,7 +35,7 @@ public class DimsHW extends Dims2 {
return (DimsHW)super.position(position);
}
@Override public DimsHW getPointer(long i) {
return new DimsHW((Pointer)this).position(position + i);
return new DimsHW((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -37,7 +37,7 @@ public class DimsNCHW extends Dims4 {
return (DimsNCHW)super.position(position);
}
@Override public DimsNCHW getPointer(long i) {
return new DimsNCHW((Pointer)this).position(position + i);
return new DimsNCHW((Pointer)this).offsetAddress(i);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down Expand Up @@ -39,7 +39,7 @@ public class DynamicPluginTensorDesc extends Pointer {
return (DynamicPluginTensorDesc)super.position(position);
}
@Override public DynamicPluginTensorDesc getPointer(long i) {
return new DynamicPluginTensorDesc((Pointer)this).position(position + i);
return new DynamicPluginTensorDesc((Pointer)this).offsetAddress(i);
}

/** Information required to interpret a pointer to tensor data, except that desc.dims has -1 in place of any runtime dimension. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.5.5: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.5.6-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.tensorrt.nvinfer;

Expand Down
Loading