Advice needed: how to check number of/any CUDA devices available?

Open
#614 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, tensorflow

Research direction

No TensorFlow Java files, tests, or entry points are named. Start by clarifying whether the request is for an existing device-checking API or a new capability, using the Python Torch example as the expected behavior. Done would require a confirmed API or a defined implementation scope and validation approach.

Written by the indexing model from the issue text.

Description

This template is for miscellaneous issues not covered by the other issue categories.

Hi, is there a way to check via Tensorflow Java the number of / or any CUDA devices available? For example, in Python with Torch one could do

import torch
torch.cuda.is_available()

Thanks in advance!

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tensorflow/java

All issues in tensorflow/java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.