From 84bbc2cc2c991b25ed275bfa48bdc6e495d7c6c3 Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Mon, 8 May 2023 15:26:05 +0900 Subject: [PATCH] * Upgrade presets for Hyperscan 5.4.2, LLVM 16.0.3, OpenCL 3.0.14, TVM 0.12.0 --- CHANGELOG.md | 2 +- README.md | 2 +- hyperscan/README.md | 4 +- hyperscan/cppbuild.sh | 2 +- hyperscan/platform/pom.xml | 2 +- hyperscan/pom.xml | 2 +- hyperscan/samples/pom.xml | 2 +- .../bytedeco/hyperscan/global/hyperscan.java | 2 +- llvm/README.md | 4 +- llvm/cppbuild.sh | 2 +- llvm/platform/pom.xml | 2 +- llvm/pom.xml | 2 +- llvm/samples/clang/pom.xml | 2 +- llvm/samples/llvm/pom.xml | 2 +- llvm/samples/polly/pom.xml | 2 +- opencl/README.md | 2 +- opencl/cppbuild.sh | 4 +- .../org/bytedeco/opencl/global/OpenCL.java | 9 ++++ platform/pom.xml | 6 +-- tvm/README.md | 6 +-- tvm/cppbuild.sh | 4 +- tvm/platform/gpu/pom.xml | 6 +-- tvm/platform/pom.xml | 6 +-- tvm/pom.xml | 10 ++-- tvm/samples/pom.xml | 4 +- .../gen/java/org/bytedeco/tvm/ModuleNode.java | 18 +++---- .../gen/java/org/bytedeco/tvm/TVMString.java | 4 +- .../org/bytedeco/tvm/global/tvm_runtime.java | 47 +++++++++++++++---- 28 files changed, 96 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5cde8244c..321879b555d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ * Map `c10::impl::GenericDict` as returned by `c10::IValue::toGenericDict()` in presets for PyTorch * Introduce `linux-armhf` and `linux-x86` builds to presets for TensorFlow Lite ([pull #1268](https://github.com/bytedeco/javacpp-presets/pull/1268)) * Add presets for LibRaw 0.20.2 ([pull #1211](https://github.com/bytedeco/javacpp-presets/pull/1211)) - * Upgrade presets for OpenCV 4.7.0, FFmpeg 6.0 ([issue bytedeco/javacv#1693](https://github.com/bytedeco/javacv/issues/1693)), HDF5 1.14.0, Hyperscan 5.4.1 ([issue #1308](https://github.com/bytedeco/javacpp-presets/issues/1308)), Spinnaker 3.0.0.118 ([pull #1313](https://github.com/bytedeco/javacpp-presets/pull/1313)), librealsense2 2.53.1 ([pull #1305](https://github.com/bytedeco/javacpp-presets/pull/1305)), MKL 2023.1, DNNL 3.1, OpenBLAS 0.3.23, ARPACK-NG 3.9.0, CPython 3.11.3, NumPy 1.24.2, SciPy 1.10.1, LLVM 16.0.1, Leptonica 1.83.0, Tesseract 5.3.1, CUDA 12.1.1, cuDNN 8.9.0, NCCL 2.17.1, OpenCL 3.0.13, NVIDIA Video Codec SDK 12.0.16, PyTorch 2.0.0, TensorFlow Lite 2.12.0, TensorRT 8.6.0.12, Triton Inference Server 2.32.0, DepthAI 2.21.2, ONNX 1.14.0, ONNX Runtime 1.15.0, TVM 0.11.1, Bullet Physics SDK 3.25, and their dependencies + * Upgrade presets for OpenCV 4.7.0, FFmpeg 6.0 ([issue bytedeco/javacv#1693](https://github.com/bytedeco/javacv/issues/1693)), HDF5 1.14.0, Hyperscan 5.4.2 ([issue #1308](https://github.com/bytedeco/javacpp-presets/issues/1308)), Spinnaker 3.0.0.118 ([pull #1313](https://github.com/bytedeco/javacpp-presets/pull/1313)), librealsense2 2.53.1 ([pull #1305](https://github.com/bytedeco/javacpp-presets/pull/1305)), MKL 2023.1, DNNL 3.1, OpenBLAS 0.3.23, ARPACK-NG 3.9.0, CPython 3.11.3, NumPy 1.24.2, SciPy 1.10.1, LLVM 16.0.3, Leptonica 1.83.0, Tesseract 5.3.1, CUDA 12.1.1, cuDNN 8.9.0, NCCL 2.17.1, OpenCL 3.0.14, NVIDIA Video Codec SDK 12.0.16, PyTorch 2.0.0, TensorFlow Lite 2.12.0, TensorRT 8.6.0.12, Triton Inference Server 2.32.0, DepthAI 2.21.2, ONNX 1.14.0, ONNX Runtime 1.15.0, TVM 0.12.0, Bullet Physics SDK 3.25, and their dependencies ### November 2, 2022 version 1.5.8 * Fix mapping of `torch::ExpandingArrayWithOptionalElem` in presets for PyTorch ([issue #1250](https://github.com/bytedeco/javacpp-presets/issues/1250)) diff --git a/README.md b/README.md index eff09ebb2b8..d9ff9113b8d 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ Each child module in turn relies by default on the included [`cppbuild.sh` scrip * ONNX 1.14.x https://github.com/onnx/onnx * nGraph 0.26.0 https://github.com/NervanaSystems/ngraph * ONNX Runtime 1.15.x https://github.com/microsoft/onnxruntime - * TVM 0.11.x https://github.com/apache/tvm + * TVM 0.12.x https://github.com/apache/tvm * Bullet Physics SDK 3.25 https://pybullet.org * LiquidFun http://google.github.io/liquidfun/ * Qt 5.15.x https://download.qt.io/archive/qt/ diff --git a/hyperscan/README.md b/hyperscan/README.md index d4370ed82d7..7fe43d0c429 100644 --- a/hyperscan/README.md +++ b/hyperscan/README.md @@ -9,7 +9,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * Hyperscan 5.4.1 https://www.hyperscan.io + * Hyperscan 5.4.2 https://www.hyperscan.io Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -51,7 +51,7 @@ Be aware that flag `-Djavacpp.platform` can be used to specify the target platfo org.bytedeco hyperscan-platform - 5.4.1-1.5.9-SNAPSHOT + 5.4.2-1.5.9-SNAPSHOT diff --git a/hyperscan/cppbuild.sh b/hyperscan/cppbuild.sh index 5e248a61aae..89f6e1f16d1 100755 --- a/hyperscan/cppbuild.sh +++ b/hyperscan/cppbuild.sh @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then exit fi -HYPERSCAN_VERSION=5.4.1 +HYPERSCAN_VERSION=5.4.2 BOOST=1_70_0 download "https://github.com/intel/hyperscan/archive/v$HYPERSCAN_VERSION.tar.gz" hyperscan-$HYPERSCAN_VERSION.tar.gz download http://downloads.sourceforge.net/project/boost/boost/${BOOST//_/.}/boost_$BOOST.tar.gz boost_$BOOST.tar.gz diff --git a/hyperscan/platform/pom.xml b/hyperscan/platform/pom.xml index 8e8ea9bcbc1..5b0bf94f6db 100644 --- a/hyperscan/platform/pom.xml +++ b/hyperscan/platform/pom.xml @@ -11,7 +11,7 @@ hyperscan-platform - 5.4.1-${project.parent.version} + 5.4.2-${project.parent.version} JavaCPP Presets Platform for hyperscan diff --git a/hyperscan/pom.xml b/hyperscan/pom.xml index d766ea72f19..16697664828 100644 --- a/hyperscan/pom.xml +++ b/hyperscan/pom.xml @@ -10,7 +10,7 @@ 4.0.0 hyperscan - 5.4.1-${project.parent.version} + 5.4.2-${project.parent.version} JavaCPP Presets for Hyperscan diff --git a/hyperscan/samples/pom.xml b/hyperscan/samples/pom.xml index d1d5ea6c31f..93d2c609c17 100644 --- a/hyperscan/samples/pom.xml +++ b/hyperscan/samples/pom.xml @@ -12,7 +12,7 @@ org.bytedeco hyperscan-platform - 5.4.1-1.5.9-SNAPSHOT + 5.4.2-1.5.9-SNAPSHOT diff --git a/hyperscan/src/gen/java/org/bytedeco/hyperscan/global/hyperscan.java b/hyperscan/src/gen/java/org/bytedeco/hyperscan/global/hyperscan.java index 94c44d8848a..457ed8e4ea6 100644 --- a/hyperscan/src/gen/java/org/bytedeco/hyperscan/global/hyperscan.java +++ b/hyperscan/src/gen/java/org/bytedeco/hyperscan/global/hyperscan.java @@ -2382,7 +2382,7 @@ public class hyperscan extends org.bytedeco.hyperscan.presets.hyperscan { public static final int HS_MAJOR = 5; public static final int HS_MINOR = 4; -public static final int HS_PATCH = 1; +public static final int HS_PATCH = 2; // #include "hs_compile.h" // #include "hs_runtime.h" diff --git a/llvm/README.md b/llvm/README.md index 7046720c9bb..4d96b6502f1 100644 --- a/llvm/README.md +++ b/llvm/README.md @@ -9,7 +9,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * LLVM 16.0.1 http://llvm.org/ + * LLVM 16.0.3 http://llvm.org/ Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -50,7 +50,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic org.bytedeco llvm-platform - 16.0.1-1.5.9-SNAPSHOT + 16.0.3-1.5.9-SNAPSHOT diff --git a/llvm/cppbuild.sh b/llvm/cppbuild.sh index 18fc197b70d..3d7fb0497d8 100755 --- a/llvm/cppbuild.sh +++ b/llvm/cppbuild.sh @@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then exit fi -LLVM_VERSION=16.0.1 +LLVM_VERSION=16.0.3 download https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/llvm-project-$LLVM_VERSION.src.tar.xz llvm-project-$LLVM_VERSION.src.tar.xz mkdir -p $PLATFORM diff --git a/llvm/platform/pom.xml b/llvm/platform/pom.xml index d6d976a5bf0..7f67cbbabbf 100644 --- a/llvm/platform/pom.xml +++ b/llvm/platform/pom.xml @@ -12,7 +12,7 @@ org.bytedeco llvm-platform - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} JavaCPP Presets Platform for LLVM diff --git a/llvm/pom.xml b/llvm/pom.xml index 873858bd256..19ebb77d3a1 100644 --- a/llvm/pom.xml +++ b/llvm/pom.xml @@ -11,7 +11,7 @@ org.bytedeco llvm - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} JavaCPP Presets for LLVM diff --git a/llvm/samples/clang/pom.xml b/llvm/samples/clang/pom.xml index f297d37953e..32b2a7a68c2 100644 --- a/llvm/samples/clang/pom.xml +++ b/llvm/samples/clang/pom.xml @@ -12,7 +12,7 @@ org.bytedeco llvm-platform - 16.0.1-1.5.9-SNAPSHOT + 16.0.3-1.5.9-SNAPSHOT diff --git a/llvm/samples/llvm/pom.xml b/llvm/samples/llvm/pom.xml index b7d7b0a5fe7..bd336c79dc8 100644 --- a/llvm/samples/llvm/pom.xml +++ b/llvm/samples/llvm/pom.xml @@ -12,7 +12,7 @@ org.bytedeco llvm-platform - 16.0.1-1.5.9-SNAPSHOT + 16.0.3-1.5.9-SNAPSHOT org.bytedeco diff --git a/llvm/samples/polly/pom.xml b/llvm/samples/polly/pom.xml index c659f734465..a411c9a1605 100644 --- a/llvm/samples/polly/pom.xml +++ b/llvm/samples/polly/pom.xml @@ -13,7 +13,7 @@ org.bytedeco llvm-platform - 16.0.1-1.5.9-SNAPSHOT + 16.0.3-1.5.9-SNAPSHOT org.bytedeco diff --git a/opencl/README.md b/opencl/README.md index 3df8159eb86..3dc5b1c2a35 100644 --- a/opencl/README.md +++ b/opencl/README.md @@ -9,7 +9,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * OpenCL 3.0.13 https://www.khronos.org/registry/OpenCL/ + * OpenCL 3.0.14 https://www.khronos.org/registry/OpenCL/ Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. diff --git a/opencl/cppbuild.sh b/opencl/cppbuild.sh index 1a89e08401d..112f135d1ab 100755 --- a/opencl/cppbuild.sh +++ b/opencl/cppbuild.sh @@ -7,8 +7,8 @@ if [[ -z "$PLATFORM" ]]; then exit fi -OPENCL_VERSION=2023.02.06 -CLHPP_VERSION=2023.02.06 +OPENCL_VERSION=2023.04.17 +CLHPP_VERSION=2023.04.17 download https://github.com/KhronosGroup/OpenCL-Headers/archive/v$OPENCL_VERSION.tar.gz OpenCL-Headers-$OPENCL_VERSION.tar.gz download https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/v$OPENCL_VERSION.tar.gz OpenCL-ICD-Loader-$OPENCL_VERSION.tar.gz download https://github.com/KhronosGroup/OpenCL-CLHPP/archive/v$CLHPP_VERSION.tar.gz OpenCL-CLHPP-$CLHPP_VERSION.tar.gz diff --git a/opencl/src/gen/java/org/bytedeco/opencl/global/OpenCL.java b/opencl/src/gen/java/org/bytedeco/opencl/global/OpenCL.java index 27c50967e1a..080c8a86102 100644 --- a/opencl/src/gen/java/org/bytedeco/opencl/global/OpenCL.java +++ b/opencl/src/gen/java/org/bytedeco/opencl/global/OpenCL.java @@ -1541,6 +1541,13 @@ public class OpenCL extends org.bytedeco.opencl.presets.OpenCL { /********************************************************************************************************/ +/* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */ +// #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_CORE_PROTOTYPES) +// #define CL_NO_CORE_PROTOTYPES +// #endif + +// #if !defined(CL_NO_CORE_PROTOTYPES) + /* Platform API */ public static native @Cast("cl_int") int clGetPlatformIDs(@Cast("cl_uint") int num_entries, @Cast("cl_platform_id*") PointerPointer platforms, @@ -3271,6 +3278,8 @@ public static native Pointer clGetExtensionFunctionAddressForPlatform(_cl_platfo @Cast("const cl_event*") @ByPtrPtr _cl_event event_wait_list, @ByPtrPtr _cl_event event); +// #endif /* !defined(CL_NO_CORE_PROTOTYPES) */ + // #ifdef __cplusplus // #endif diff --git a/platform/pom.xml b/platform/pom.xml index 5b32caf928b..1bcf5d3e986 100644 --- a/platform/pom.xml +++ b/platform/pom.xml @@ -161,7 +161,7 @@ org.bytedeco hyperscan-platform - 5.4.1-${project.version} + 5.4.2-${project.version} org.bytedeco @@ -231,7 +231,7 @@ org.bytedeco llvm-platform - 16.0.1-${project.version} + 16.0.3-${project.version} org.bytedeco @@ -341,7 +341,7 @@ org.bytedeco tvm-platform - 0.11.1-${project.version} + 0.12.0-${project.version} org.bytedeco diff --git a/tvm/README.md b/tvm/README.md index f5d02943cc1..46ce6ef5fce 100644 --- a/tvm/README.md +++ b/tvm/README.md @@ -9,7 +9,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * TVM 0.11.1 http://tvm.apache.org/ + * TVM 0.12.0 http://tvm.apache.org/ Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -49,14 +49,14 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic org.bytedeco tvm-platform - 0.11.1-1.5.9-SNAPSHOT + 0.12.0-1.5.9-SNAPSHOT org.bytedeco tvm-platform-gpu - 0.11.1-1.5.9-SNAPSHOT + 0.12.0-1.5.9-SNAPSHOT diff --git a/tvm/cppbuild.sh b/tvm/cppbuild.sh index c6be38db54c..7b1e6882cdf 100755 --- a/tvm/cppbuild.sh +++ b/tvm/cppbuild.sh @@ -12,7 +12,7 @@ if [[ "$EXTENSION" == *gpu ]]; then GPU_FLAGS="-DUSE_CUDA=ON -DUSE_CUDNN=ON -DUSE_CUBLAS=ON" fi -TVM_VERSION=0.11.1 +TVM_VERSION=0.12.0 mkdir -p "$PLATFORM$EXTENSION" cd "$PLATFORM$EXTENSION" @@ -83,7 +83,7 @@ sedinplace '/ "tornado",/a\ sedinplace 's/uint32_t _type_child_slots_can_overflow/bool _type_child_slots_can_overflow/g' include/tvm/runtime/ndarray.h sedinplace 's/bias\[OC\]/bias\[256\]/g' src/runtime/contrib/dnnl/dnnl_json_runtime.cc sedinplace 's/llvm::None/std::nullopt/g' src/target/llvm/codegen_llvm.cc -sedinplace 's/-Werror//g' src/runtime/crt/Makefile +#sedinplace 's/-Werror//g' src/runtime/crt/Makefile sedinplace '/numpy/d' python/setup.py sedinplace '/scipy/d' python/setup.py sedinplace '/candidate_path/d' python/setup.py diff --git a/tvm/platform/gpu/pom.xml b/tvm/platform/gpu/pom.xml index da6b7293a7c..98e0a12a7e3 100644 --- a/tvm/platform/gpu/pom.xml +++ b/tvm/platform/gpu/pom.xml @@ -12,7 +12,7 @@ org.bytedeco tvm-platform-gpu - 0.11.1-${project.parent.version} + 0.12.0-${project.parent.version} JavaCPP Presets Platform GPU for TVM @@ -24,12 +24,12 @@ org.bytedeco dnnl-platform - 2.7.3-${project.parent.version} + 2.7.1-1.5.8 org.bytedeco llvm-platform - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} org.bytedeco diff --git a/tvm/platform/pom.xml b/tvm/platform/pom.xml index e2e5eea60e9..fb57f9c20dc 100644 --- a/tvm/platform/pom.xml +++ b/tvm/platform/pom.xml @@ -12,7 +12,7 @@ org.bytedeco tvm-platform - 0.11.1-${project.parent.version} + 0.12.0-${project.parent.version} JavaCPP Presets Platform for TVM @@ -23,12 +23,12 @@ org.bytedeco dnnl-platform - 2.7.3-${project.parent.version} + 2.7.1-1.5.8 org.bytedeco llvm-platform - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} org.bytedeco diff --git a/tvm/pom.xml b/tvm/pom.xml index 6e80001b7a6..b824ccab5e5 100644 --- a/tvm/pom.xml +++ b/tvm/pom.xml @@ -11,19 +11,19 @@ org.bytedeco tvm - 0.11.1-${project.parent.version} + 0.12.0-${project.parent.version} JavaCPP Presets for TVM org.bytedeco dnnl - 2.7.3-${project.parent.version} + 2.7.1-1.5.8 org.bytedeco llvm - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} org.bytedeco @@ -56,12 +56,12 @@ org.bytedeco dnnl-platform - 2.7.3-${project.parent.version} + 2.7.1-1.5.8 org.bytedeco llvm-platform - 16.0.1-${project.parent.version} + 16.0.3-${project.parent.version} org.bytedeco diff --git a/tvm/samples/pom.xml b/tvm/samples/pom.xml index 9f47e0d7bc0..3c92a607e47 100644 --- a/tvm/samples/pom.xml +++ b/tvm/samples/pom.xml @@ -12,14 +12,14 @@ org.bytedeco tvm-platform - 0.11.1-1.5.9-SNAPSHOT + 0.12.0-1.5.9-SNAPSHOT org.bytedeco tvm-platform-gpu - 0.11.1-1.5.9-SNAPSHOT + 0.12.0-1.5.9-SNAPSHOT diff --git a/tvm/src/gen/java/org/bytedeco/tvm/ModuleNode.java b/tvm/src/gen/java/org/bytedeco/tvm/ModuleNode.java index 9b857bed135..57ea1b38e39 100644 --- a/tvm/src/gen/java/org/bytedeco/tvm/ModuleNode.java +++ b/tvm/src/gen/java/org/bytedeco/tvm/ModuleNode.java @@ -136,19 +136,13 @@ public class ModuleNode extends TVMObject { public native @StdVector Module imports(); /** - * \brief Returns true if this module is 'DSO exportable'. - * - * A DSO exportable module (eg a CSourceModuleNode of type_key 'c') can be incorporated into the - * final runtime artifact (ie shared library) by compilation and/or linking using the external - * compiler (llvm, nvcc, etc). DSO exportable modules must implement SaveToFile. - * - * By contrast, non-DSO exportable modules (eg CUDAModuleNode of type_key 'cuda') typically must - * be incorporated into the final runtime artifact by being serialized as data into the - * artifact, then deserialized at runtime. Non-DSO exportable modules must implement SaveToBinary, - * and have a matching deserializer registered as 'runtime.module.loadbinary_'. - * - * The default implementation returns false. + * \brief Returns bitmap of property. + * By default, none of the property is set. Derived class can override this function and set its + * own property. */ + public native int GetPropertyMask(); + + /** \brief Returns true if this module is 'DSO exportable'. */ public native @Cast("bool") boolean IsDSOExportable(); /** diff --git a/tvm/src/gen/java/org/bytedeco/tvm/TVMString.java b/tvm/src/gen/java/org/bytedeco/tvm/TVMString.java index d14c60bcfbd..6e6f488cd09 100644 --- a/tvm/src/gen/java/org/bytedeco/tvm/TVMString.java +++ b/tvm/src/gen/java/org/bytedeco/tvm/TVMString.java @@ -196,8 +196,8 @@ public class TVMString extends ObjectRef { * @param size The size of the bytes. * @return the hash value. */ - public static native @Cast("size_t") long HashBytes(@Cast("const char*") BytePointer data, @Cast("size_t") long size); - public static native @Cast("size_t") long HashBytes(String data, @Cast("size_t") long size); + public static native @Cast("uint64_t") long StableHashBytes(@Cast("const char*") BytePointer data, @Cast("size_t") long size); + public static native @Cast("uint64_t") long StableHashBytes(String data, @Cast("size_t") long size); public TVMString(@ByVal ObjectPtr n) { super((Pointer)null); allocate(n); } private native void allocate(@ByVal ObjectPtr n); diff --git a/tvm/src/gen/java/org/bytedeco/tvm/global/tvm_runtime.java b/tvm/src/gen/java/org/bytedeco/tvm/global/tvm_runtime.java index bd8ec461215..e171047454f 100644 --- a/tvm/src/gen/java/org/bytedeco/tvm/global/tvm_runtime.java +++ b/tvm/src/gen/java/org/bytedeco/tvm/global/tvm_runtime.java @@ -887,6 +887,13 @@ public class tvm_runtime extends org.bytedeco.tvm.presets.tvm_runtime { // #define TVM_DLL EMSCRIPTEN_KEEPALIVE // #endif +// helper macro to suppress unused warning +// #if defined(__GNUC__) +// #define TVM_ATTRIBUTE_UNUSED __attribute__((unused)) +// #else +// #define TVM_ATTRIBUTE_UNUSED +// #endif + // #ifndef TVM_DLL // #ifdef _WIN32 // #ifdef TVM_EXPORTS @@ -900,7 +907,7 @@ public class tvm_runtime extends org.bytedeco.tvm.presets.tvm_runtime { // #endif // TVM version -public static final String TVM_VERSION = "0.11.1"; +public static final String TVM_VERSION = "0.12.0"; // TVM Runtime is DLPack compatible. // #include @@ -2479,6 +2486,7 @@ public static native int TVMObjectDerivedFrom(@Cast("uint32_t") int child_type_i // #ifndef TVM_RUNTIME_CONTAINER_STRING_H_ // #define TVM_RUNTIME_CONTAINER_STRING_H_ +// #include // #include // #include // #include @@ -2633,14 +2641,6 @@ public static native int TVMObjectDerivedFrom(@Cast("uint32_t") int child_type_i // #include // alias DLDevice - -// A 'null' device type, does not correspond to any DLDeviceType enum. -// TODO(mbs): This is to help us as we transition away from representing the 'homogenous' case -// as a singleton target map indexed by the invalid DLDeviceType '0'. -@Namespace("tvm") @MemberGetter public static native @Cast("const DLDeviceType") int kNullDeviceType(); - -// An 'invalid' device type, does not correspond to any DLDeviceType enum. -@Namespace("tvm") @MemberGetter public static native @Cast("const DLDeviceType") int kInvalidDeviceType(); // Targeting ../NDArray.java @@ -2797,6 +2797,35 @@ public static native int TVMObjectDerivedFrom(@Cast("uint32_t") int child_type_i // #include // #include // #include + +/** + * \brief Property of runtime module + * We classify the property of runtime module into the following categories. + */ +/** enum tvm::runtime::ModulePropertyMask */ +public static final int + /** \brief kBinarySerializable + * we can serialize the module to the stream of bytes. CUDA/OpenCL/JSON + * runtime are representative examples. A binary exportable module can be integrated into final + * runtime artifact by being serialized as data into the artifact, then deserialized at runtime. + * This class of modules must implement SaveToBinary, and have a matching deserializer registered + * as 'runtime.module.loadbinary_'. + */ + kBinarySerializable = 0b001, + /** \brief kRunnable + * we can run the module directly. LLVM/CUDA/JSON runtime, executors (e.g, + * virtual machine) runtimes are runnable. Non-runnable modules, such as CSourceModule, requires a + * few extra steps (e.g,. compilation, link) to make it runnable. + */ + kRunnable = 0b010, + /** \brief kDSOExportable + * we can export the module as DSO. A DSO exportable module (e.g., a + * CSourceModuleNode of type_key 'c') can be incorporated into the final runtime artifact (ie + * shared library) by compilation and/or linking using the external compiler (llvm, nvcc, etc). + * DSO exportable modules must implement SaveToFile. In general, DSO exportable modules are not + * runnable unless there is a special support like JIT for {@code LLVMModule}. + */ + kDSOExportable = 0b100; // Targeting ../Module.java