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:20 UTC

(opennlp) branch OPENNLP-1516 created (now c6ded979)

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

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


      at c6ded979 OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl

This branch includes the following new commits:

     new f5990722 OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl
     new c6ded979 OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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

Posted by rz...@apache.org.
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>


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

Posted by rz...@apache.org.
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 c6ded979771f7b22eb9c833114de360c85107f63
Author: Richard Zowalla <ri...@hs-heilbronn.de>
AuthorDate: Tue Nov 28 08:29:47 2023 +0100

    OPENNLP-1516 - Provide a ONNX runtime GPU BOM for opennlp-dl
    
    Execute JUnit + Eval Tests on the new GPU-accelerated packages as well.
---
 opennlp-dl-gpu/README.md |  1 -
 opennlp-dl-gpu/pom.xml   | 62 ++++++++++++++++++++++++++++++++++++++++++++++--
 opennlp-dl/pom.xml       | 17 +++++++++++++
 3 files changed, 77 insertions(+), 3 deletions(-)

diff --git a/opennlp-dl-gpu/README.md b/opennlp-dl-gpu/README.md
index 460237f9..e44cdd3b 100644
--- a/opennlp-dl-gpu/README.md
+++ b/opennlp-dl-gpu/README.md
@@ -9,6 +9,5 @@ You can use it in your code by adding the following as a 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
index 69dbff4c..6310049f 100644
--- a/opennlp-dl-gpu/pom.xml
+++ b/opennlp-dl-gpu/pom.xml
@@ -30,7 +30,6 @@
   <groupId>org.apache.opennlp</groupId>
   <artifactId>opennlp-dl-gpu</artifactId>
   <name>Apache OpenNLP DL (GPU)</name>
-  <packaging>pom</packaging>
 
   <dependencies>
     <dependency>
@@ -49,9 +48,68 @@
       <artifactId>onnxruntime_gpu</artifactId>
       <version>${onnxruntime.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.opennlp</groupId>
+      <artifactId>opennlp-dl</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <dependenciesToScan>
+            <dependency>org.apache.opennlp:opennlp-dl</dependency>
+          </dependenciesToScan>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>eval-tests</id>
+      <properties>
+        <opennlp.forkCount>0.5C</opennlp.forkCount>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <argLine>-Xmx4g</argLine>
+              <includes>
+                <include>**/*Test.java</include>
+                <include>**/*Eval.java</include>
+              </includes>
+              <dependenciesToScan>
+                <dependency>org.apache.opennlp:opennlp-dl</dependency>
+              </dependenciesToScan>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
 </project>
diff --git a/opennlp-dl/pom.xml b/opennlp-dl/pom.xml
index 4f6f37c8..ac044dab 100644
--- a/opennlp-dl/pom.xml
+++ b/opennlp-dl/pom.xml
@@ -66,4 +66,21 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>