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 instructions on how to support GPU with TFJava 1.0.0 #565

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

karllessard
Copy link
Collaborator

No description provided.

Craigacp
Craigacp previously approved these changes Nov 1, 2024
@crutcher
Copy link

crutcher commented Nov 1, 2024

This section in CONTRIBUTING.md still describes how to build tensorflow-core-platform-gpu; which seems to also somehow be defined in the poms?

To build for GPU, pass -Djavacpp.platform.extension=-gpu to maven. If you want to use TensorFlow Java with unsupported GPUs, set the environment variable TF_CUDA_COMPUTE_CAPABILITIES, or configure it in a bazel rc file (i.e. build --action_env TF_CUDA_COMPUTE_CAPABILITIES="6.1").

@Craigacp
Copy link
Collaborator

Craigacp commented Nov 1, 2024

javacpp.platform.extension is not related to tensorflow-core-platform-gpu, the use of platform in both names doesn't imply anything. Setting the extension triggers the GPU build, but it makes a tensorflow-core-native:linux-x86_64-gpu artifact.

@karllessard
Copy link
Collaborator Author

To do a custom native build that supports GPU (with the GPU of your choice) you need to pass -Djavacpp.platform.extension=-gpu in addition to -Pnative-build

(I just noticed that the doc actually says -Dnative-build but -Pnative-build would also work and sounds better, I'll update that as well)

@karllessard karllessard merged commit fb3f393 into tensorflow:master Nov 1, 2024
10 checks passed
@karllessard karllessard deleted the update-gpu-doc branch November 1, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants