You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by rz...@apache.org on 2023/11/28 07:30:21 UTC

(opennlp) 01/02: OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl

This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch OPENNLP-1516
in repository https://gitbox.apache.org/repos/asf/opennlp.git

commit f5990722a1e599edee26af81434268d76b98d3e0
Author: Richard Zowalla <ri...@hs-heilbronn.de>
AuthorDate: Tue Nov 28 08:18:46 2023 +0100

    OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl
---
 opennlp-dl-gpu/README.md | 14 ++++++++++++
 opennlp-dl-gpu/pom.xml   | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 pom.xml                  |  1 +
 3 files changed, 72 insertions(+)

diff --git a/opennlp-dl-gpu/README.md b/opennlp-dl-gpu/README.md
new file mode 100644
index 00000000..460237f9
--- /dev/null
+++ b/opennlp-dl-gpu/README.md
@@ -0,0 +1,14 @@
+# OpenNLP DL (GPU)
+
+This module brings in `onnxruntime_gpu` bindings to the existing `opennlp-dl` module. If you are planning to run with GPU acceleration, please use this BOM.
+
+You can use it in your code by adding the following as a dependency:
+
+```xml
+<dependency>
+    <groupId>org.apache.opennlp</groupId>
+    <artifactId>opennlp-dl-gpu</artifactId>
+    <version>${opennlp.version}</version>
+    <type>pom</type>
+ </dependency>
+```
\ No newline at end of file
diff --git a/opennlp-dl-gpu/pom.xml b/opennlp-dl-gpu/pom.xml
new file mode 100644
index 00000000..69dbff4c
--- /dev/null
+++ b/opennlp-dl-gpu/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.opennlp</groupId>
+    <artifactId>opennlp</artifactId>
+    <version>2.3.2-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.opennlp</groupId>
+  <artifactId>opennlp-dl-gpu</artifactId>
+  <name>Apache OpenNLP DL (GPU)</name>
+  <packaging>pom</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.opennlp</groupId>
+      <artifactId>opennlp-dl</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.microsoft.onnxruntime</groupId>
+          <artifactId>onnxruntime</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>com.microsoft.onnxruntime</groupId>
+      <artifactId>onnxruntime_gpu</artifactId>
+      <version>${onnxruntime.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/pom.xml b/pom.xml
index fded2256..706d437e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -561,6 +561,7 @@
 		<module>opennlp-docs</module>
 		<module>opennlp-distr</module>
 		<module>opennlp-dl</module>
+		<module>opennlp-dl-gpu</module>
   </modules>
 
 </project>