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

[REVIEW] Remove unused native deps from java library [skip-ci] #5298

Merged
merged 6 commits into from
May 27, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
- PR #5251 Fix more mispellings in cpp comments and strings
- PR #5254 Deprecate nvstrings, nvcategory and nvtext
- PR #5270 Add support to check for "NaT" and "None" strings while typecasting to `datetime64`
- PR #5298 Remove unused native deps from java library
- PR #5216 Make documentation uniform for params

## Bug Fixes
Expand Down
16 changes: 9 additions & 7 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ CUDA 10.0:
Build the native code first, and make sure the a JDK is installed and available.
If you use the default cmake options libcudart will be dynamically linked to libcudf and librmm
which are included. If you do this the resulting jar will have a classifier associated with it
because that jar can only be used with a single version of the CUDA runtime. If you want
to remove that requirement you can build RMM and cuDF with `-DCUDA_STATIC_RUNTIME=ON` when
running cmake, and similarly -DCUDA_STATIC_RUNTIME=ON when running maven. This will statically
link in the CUDA runtime and result in a jar with no
classifier that should run on any host that has a version of the driver new enough to support
the runtime that this was built with. Official releases will indicate in the release notes
the minimum driver version required.
because that jar can only be used with a single version of the CUDA runtime.


There is experimental work to try and remove that requirement but it is not fully functional
you can build RMM and cuDF with `-DCUDA_STATIC_RUNTIME=ON` when running cmake, and similarly
`-DCUDA_STATIC_RUNTIME=ON` when running maven. This will statically link in the CUDA runtime
and result in a jar with no classifier that should run on any host that has a version of the
driver new enough to support the runtime that this was built with. Unfortunately `libnvrtc` is still
required for runtime code generation which also is tied to a specific version of cuda.

To build with maven for dynamic linking you would run.

Expand Down
22 changes: 4 additions & 18 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@
} else {
pom.properties['cuda.classifier'] = ''
}

if (pom.properties['CUDA_STATIC_RUNTIME'] == 'ON') {
println 'WARNING RUNNING WITH STATIC LINKING DOES NOT FULLY WORK. USE WITH CAUTION.'
}
</source>
</configuration>
</execution>
Expand All @@ -426,22 +430,6 @@
<classifier>${cuda.classifier}</classifier>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>1.0-alpha-8</version>
<extensions>true</extensions>

<configuration>
<javahClassNames>
<javahClassName>ai.rapids.cudf.Cuda</javahClassName>
<javahClassName>ai.rapids.cudf.ColumnVector</javahClassName>
<javahClassName>ai.rapids.cudf.Table</javahClassName>
<javahClassName>ai.rapids.cudf.Rmm</javahClassName>
</javahClassNames>
<javahOutputDirectory>${basedir}/src/main/native/include/</javahOutputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -479,8 +467,6 @@
<directory>${native.cudf.path}</directory>
<includes>
<include>libcudf.so</include>
<include>libNVCategory.so</include>
<include>libNVStrings.so</include>
</includes>
</resource>
<resource>
Expand Down
2 changes: 0 additions & 2 deletions java/src/main/java/ai/rapids/cudf/NativeDepsLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public class NativeDepsLoader {
private static final String[] loadOrder = new String[] {
"boost_filesystem",
"rmm",
"NVStrings",
"NVCategory",
"cudf",
"cudfjni"
};
Expand Down