You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
about: Use this template for reporting a bug or a performance issue.
4
+
5
+
---
6
+
7
+
<em>Please make sure that this is a bug. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template</em>
8
+
9
+
**System information**
10
+
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
11
+
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86\_64):
12
+
- TensorFlow installed from (source or binary):
13
+
- TensorFlow version (use command below):
14
+
- Java version (i.e., the output of `java -version`):
15
+
- Java command line flags (e.g., GC parameters):
16
+
- Python version (if transferring a model trained in Python):
17
+
- Bazel version (if compiling from source):
18
+
- GCC/Compiler version (if compiling from source):
19
+
- CUDA/cuDNN version:
20
+
- GPU model and memory:
21
+
22
+
**Describe the current behavior**
23
+
24
+
**Describe the expected behavior**
25
+
26
+
**Code to reproduce the issue**
27
+
Provide a reproducible test case that is the bare minimum necessary to generate the problem.
28
+
29
+
**Other info / logs**
30
+
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
about: Use this template for build/installation issues
4
+
5
+
---
6
+
7
+
<em>Please make sure that this is a build/installation issue. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em>
8
+
9
+
**System information**
10
+
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86\_64):
11
+
- TensorFlow installed from (source or binary):
12
+
- TensorFlow version:
13
+
- Java version (i.e., the output of `java -version`):
14
+
- Java command line flags (e.g., GC parameters):
15
+
- Installed from Maven Central?:
16
+
- Bazel version (if compiling from source):
17
+
- GCC/Compiler version (if compiling from source):
18
+
- CUDA/cuDNN version:
19
+
- GPU model and memory:
20
+
21
+
22
+
**Describe the problem**
23
+
24
+
**Provide the exact sequence of commands / steps that you executed before running into the problem**
25
+
26
+
**Any other info / logs**
27
+
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
about: Use this template for documentation related issues
4
+
5
+
---
6
+
7
+
<em>Please make sure that this is a documentation issue. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:doc_template</em>
8
+
9
+
10
+
**System information**
11
+
- TensorFlow version:
12
+
- Doc Link:
13
+
14
+
15
+
**Describe the documentation issue**
16
+
17
+
**We welcome contributions by users. Will you be able to update submit a PR (use the [doc style guide](https://www.tensorflow.org/community/documentation)) to fix the doc Issue?**
about: Use this template for raising a feature request
4
+
5
+
---
6
+
7
+
<em>Please make sure that this is a feature request. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template</em>
8
+
9
+
10
+
**System information**
11
+
- TensorFlow version (you are using):
12
+
- Are you willing to contribute it (Yes/No):
13
+
14
+
15
+
16
+
**Describe the feature and the current behavior/state.**
about: Use this template for any other non-support related issues
4
+
5
+
---
6
+
7
+
This template is for miscellaneous issues not covered by the other issue categories.
8
+
9
+
For questions on how to work with TensorFlow, or support for problems that are not verified bugs in TensorFlow, please go to [StackOverflow](https://stackoverflow.com/questions/tagged/tensorflow).
10
+
11
+
If you are reporting a vulnerability, please use the [dedicated reporting process](https://github.com/tensorflow/tensorflow/blob/master/SECURITY.md).
12
+
13
+
For high-level discussions about TensorFlow, please post to [email protected], for questions about the development or internal workings of TensorFlow, or if you would like to know how to contribute to TensorFlow, please post to [email protected].
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+5-25
Original file line number
Diff line number
Diff line change
@@ -35,29 +35,12 @@ This can be done in `.mvn/jvm.config` or `MAVEN_OPTS`.
35
35
### Native Builds
36
36
37
37
By default, the build will attempt to download the existing TensorFlow binaries from the web for the platform it is running on (so you need to have an active internet connection).
38
-
If such binaries are not available for your platform, you will need to build the TensorFlow runtime library from sources, by adding the `-Dnative.build` argument to your Maven
38
+
If such binaries are not available for your platform, you will need to build the TensorFlow runtime library from sources, by appending the `-Dnative.build` argument to your Maven
39
39
command. This requires a valid environment for building TensorFlow, including the [bazel](https://bazel.build/) build tool and a few Python dependencies
40
40
(please read [TensorFlow documentation](https://www.tensorflow.org/install/source) for more details). Note that building from sources can take multiple hours on a regular laptop.
41
41
42
-
### GPU Support
43
-
44
-
Currently, due to build time constraints, the GPU binaries only support compute capacities 3.5 and 7.0.
45
-
To use with un-supported GPUs, you have to build it yourself, after changing the value [here](tensorflow-core/tensorflow-core-api/build.sh#L27),
46
-
setting the environment variable `TF_CUDA_COMPUTE_CAPABILITIES`, or configuring it in a bazel rc file (
47
-
i.e. `build --action_env TF_CUDA_COMPUTE_CAPABILITIES="6.1"`). While this is far from ideal, we are working on getting more build resources, and for
48
-
now this is the best option.
49
-
50
-
To build for GPU, pass `-Djavacpp.platform.extension=-gpu` to maven. By default, the CI options are used for the bazel build, see the above section
51
-
for more info. If you add `bazelrc` files, make sure the `TF_CUDA_COMPUTE_CAPABILITIES` value in them matches the value set elsewhere, as it will take
52
-
precedence if present.
53
-
54
-
### Apple Silicon
55
-
56
-
The TensorFlow Java project relies on [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners)
57
-
to build and distribute the native binaries for TensorFlow. Unfortunately at the moment, GitHub Actions still does not support runners with a
58
-
Apple Silicon chip (such as M1). Therefore, we cannot distribute artifacts for this platform, so they must be build locally on these systems.
59
-
60
-
Please follow the present [procedure](CONTRIBUTING.md#building) for building TensorFlow Java.
42
+
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
43
+
configure it in a bazel rc file (i.e. `build --action_env TF_CUDA_COMPUTE_CAPABILITIES="6.1"`).
61
44
62
45
### Native Crashes
63
46
@@ -115,14 +98,12 @@ patches are found in `tensorflow-core/tensorflow-core-native/external`.
115
98
- To create a new patch or update one, you can make a copy of the TensorFlow source file to change, make your change and generate a patch using `git diff <file> <file-updated>`
116
99
- If more than one file needs to be added to the patch, it's easier to clone the [TensorFlow repository](https://github.com/tensorflow/tensorflow), apply the changes and use `git diff` at the root of the tree
117
100
118
-
Once these steps have been executed, you can run `mvn install` to build the new version but make sure to delete completely the `src/gen` directory of `tensorflow-core-api` first.
119
-
120
101
### Generating Java Bindings
121
102
122
103
After upgrading the TensorFlow library, you need to regenerate all Java bindings that depends on the native code. That includes Java protos, C API bindings (JavaCPP) and
123
104
operator classes. You can trigger the regeneration of these bindings with the Maven command `mvn clean install -Pgenerating`.
124
105
125
-
This will trigger a small Bazel build of the TensorFlow sources to regenerate the Java protos, so make sure your [environment](CONTRIBUTING.md#native-builds) is setup properly.
106
+
This will also trigger a small Bazel build of the TensorFlow sources to regenerate the Java protos, so make sure your [environment](CONTRIBUTING.md#native-builds) is setup properly.
126
107
127
108
#### Operations Classification
128
109
@@ -182,5 +163,4 @@ org.tensorflow.exceptions.TensorFlowException: No gradient defined for op: ReadV
182
163
```
183
164
The description in the [linked file](https://www.tensorflow.org/code/tensorflow/cc/gradients/README.md) are accurate for adding C++ Graph gradients, which are used by our `Graph`. Examples of doing that are [tensorflow/tensorflow#46115](https://github.com/tensorflow/tensorflow/pull/46115) and [tensorflow/tensorflow#47774](https://github.com/tensorflow/tensorflow/pull/47774).
184
165
185
-
However, Tensorflow Core is in the process of migrating gradient definitions to [`c/experimental/gradients`](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/c/experimental/gradients), which will be what our eager mode uses once it has gradient support.
186
-
Anyone adding gradients is strongly encouraged to add one there as well, and eventually it should replace the legacy `cc/gradients` gradients.
166
+
You can also code and register the missing gradients in Java, using the TensorFlow Java custom gradient registration capabilities. Check at the JavaDoc of `tensorflow-core-api` for more details.
Copy file name to clipboardexpand all lines: README.md
+3-5
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,9 @@ only binaries for the followings are being **supported and distributed** by this
59
59
-`linux-x86_64`: Linux platforms on Intel chips
60
60
-`linux-x86_64-gpu`: Linux platforms on Intel chips with Cuda GPU support
61
61
-`macosx-x86_64`: MacOS X platforms on Intel chips
62
+
-`macosx-arm64`: MacOS X platforms on Apple Silicon chips
62
63
-`windows-x86_64`: Windows platforms on Intel chips
63
64
64
-
*Note: No binaries are distributed to run TensorFlow Java on machines with Apple Silicon chips (`macosx-arm64`), these
65
-
should be build from sources. See [here](CONTRIBUTING.md#apple-silicon) for more details.*
66
-
67
65
For example, for building a JAR that uses TensorFlow and is targeted to be deployed only on Linux
68
66
systems with no GPU support, you should add the following dependencies:
69
67
```xml
@@ -98,7 +96,7 @@ native dependencies as follows:
98
96
<groupId>org.tensorflow</groupId>
99
97
<artifactId>tensorflow-core-native</artifactId>
100
98
<version>0.5.0</version>
101
-
<classifier>macosx-x86_64</classifier>
99
+
<classifier>macosx-arm64</classifier>
102
100
</dependency>
103
101
<dependency>
104
102
<groupId>org.tensorflow</groupId>
@@ -116,7 +114,7 @@ Only one dependency can be added per platform, meaning that you cannot add nativ
116
114
In some cases, it might be preferable to add a single dependency that includes transitively all the artifacts
117
115
required to run TensorFlow Java on any [supported platforms](README.md#individual-dependencies)
118
116
119
-
-`tensorflow-core-platform`: Includes supports for `linux-x86_64`, `macosx-x86_64` and `windows-x86_64`
117
+
-`tensorflow-core-platform`: Includes `tensorflow-core-api`, plus native artifacts for `linux-x86_64`, `macosx-arm64`, `macosx-x86_64` and `windows-x86_64`
120
118
121
119
For example, to run TensorFlow Java on any platform for which a binary is being distributed by this project, you can
0 commit comments