Skip to content

Commit 5b0b96f

Browse files
committed
Initial Javadoc commit.
0 parents  commit 5b0b96f

9,448 files changed

Lines changed: 3033122 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug/Performance Issue
3+
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.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Build/Installation Issue
3+
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.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Documentation Issue
3+
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?**
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature Request
3+
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.**
17+
18+
**Will this change the current api? How?**
19+
20+
**Who will benefit with this feature?**
21+
22+
**Any Other info.**
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Other Issues
3+
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 discuss@tensorflow.org, 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 developers@tensorflow.org.

.github/workflows/build.yml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
name: CI build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- staging
7+
- r[0-9]+.*
8+
pull_request:
9+
branches:
10+
- master
11+
- r[0-9]+.*
12+
types: [opened, reopened, synchronize, labeled, unlabeled]
13+
env:
14+
STAGING_PROFILE_ID: 46f80d0729c92d
15+
DEPLOY_SNAPSHOT: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }}
16+
DEPLOY_RELEASE: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/r') }}
17+
jobs:
18+
check-format:
19+
if: github.event_name == 'pull_request'
20+
runs-on: ubuntu-22.04
21+
steps:
22+
- name: Configure Java
23+
uses: actions/setup-java@v2
24+
with:
25+
distribution: 'adopt'
26+
java-version: '17'
27+
- name: Checkout repository
28+
uses: actions/checkout@v1
29+
- name: Build project
30+
run: |
31+
gcc --version
32+
mvn -version
33+
mvn clean install -Pjdk17 -B -U -e -Dlint.skip=true -Dmaven.test.skip=true
34+
- name: Run format checks
35+
run: |
36+
mvn spotless:check -Pjdk17 -B -U -e
37+
prepare:
38+
runs-on: ubuntu-22.04
39+
outputs:
40+
repositoryUrl: ${{ steps.repository.outputs.repositoryUrl }}
41+
steps:
42+
- name: Create staging repository
43+
if: env.DEPLOY_RELEASE == 'true'
44+
id: staging
45+
run: |
46+
echo "Creating staging repository with profile $STAGING_PROFILE_ID"
47+
echo "<promoteRequest><data><description>Releasing TF Java - created by CI build</description></data></promoteRequest>" > request.xml
48+
curl -X POST -d @request.xml -s -o response.xml -u ${{ secrets.CI_DEPLOY_USERNAME }}:${{ secrets.CI_DEPLOY_PASSWORD }} -H "Content-Type:application/xml" \
49+
https://oss.sonatype.org/service/local/staging/profiles/$STAGING_PROFILE_ID/start
50+
export STAGING_REPOSITORY_ID=`awk -F'[<>]' '/stagedRepositoryId/{print $3}' response.xml`
51+
echo "Staging repository created: $STAGING_REPOSITORY_ID"
52+
echo "::set-output name=stagingRepositoryId::$STAGING_REPOSITORY_ID"
53+
- name: Checkout repository
54+
uses: actions/checkout@v1
55+
- name: Extract distribution repository URL
56+
id: repository
57+
run: |
58+
if [[ "${{ env.DEPLOY_RELEASE }}" = "true" ]]; then
59+
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.repository.url}" -DstagingRepositoryId=${{ steps.staging.outputs.stagingRepositoryId }}`
60+
else
61+
export REPOSITORY_URL=`mvn exec:exec -q -N -Dexec.executable='echo' -Dexec.args="\\${project.distributionManagement.snapshotRepository.url}"`
62+
fi
63+
echo "Repository URL: $REPOSITORY_URL"
64+
echo "::set-output name=repositoryUrl::$REPOSITORY_URL"
65+
linux-arm64:
66+
runs-on: ubuntu-2204-arm64-2c
67+
needs: prepare
68+
strategy:
69+
matrix:
70+
ext: [""]
71+
steps:
72+
- name: Install environment
73+
run: |
74+
sudo apt update
75+
sudo apt install -y curl wget unzip tar git gcc g++
76+
- name: Configure Java
77+
uses: actions/setup-java@v2
78+
with:
79+
distribution: 'zulu'
80+
java-version: '17'
81+
architecture: 'aarch64'
82+
- name: Checkout repository
83+
uses: actions/checkout@v1
84+
- name: Build project
85+
run: |
86+
gcc --version
87+
mvn -version
88+
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
89+
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
90+
- name: Deploy native artifact
91+
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
92+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
93+
linux-x86_64:
94+
runs-on: ubuntu-22.04
95+
needs: prepare
96+
strategy:
97+
matrix:
98+
ext: ["", -gpu]
99+
steps:
100+
- name: Configure Java
101+
uses: actions/setup-java@v2
102+
with:
103+
distribution: 'adopt'
104+
java-version: '11'
105+
- name: Checkout repository
106+
uses: actions/checkout@v1
107+
- name: Build project
108+
run: |
109+
gcc --version
110+
mvn -version
111+
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
112+
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
113+
- name: Deploy native artifact
114+
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
115+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
116+
macosx-arm64:
117+
runs-on: macos-14
118+
needs: prepare
119+
strategy:
120+
matrix:
121+
ext: [""]
122+
steps:
123+
- name: Configure Java
124+
uses: actions/setup-java@v2
125+
with:
126+
distribution: 'zulu'
127+
java-version: '17'
128+
architecture: 'arm64'
129+
- name: Checkout repository
130+
uses: actions/checkout@v1
131+
- name: Build project
132+
run: |
133+
clang --version
134+
mvn -version
135+
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
136+
mvn clean install -pl '!tensorflow-framework' -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
137+
- name: Deploy native artifact
138+
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
139+
run: mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
140+
windows-x86_64:
141+
runs-on: windows-2019
142+
needs: prepare
143+
strategy:
144+
matrix:
145+
ext: [""] #, -gpu]
146+
steps:
147+
- name: Install environment
148+
shell: cmd
149+
run: |
150+
set "PATH=C:\msys64\usr\bin;%PATH%"
151+
python -m pip install numpy six
152+
set "EXT=${{ matrix.ext }}"
153+
echo %JAVA_HOME%
154+
- name: Configure Java
155+
uses: actions/setup-java@v2
156+
with:
157+
distribution: 'adopt'
158+
java-version: '11'
159+
- name: Checkout repository
160+
uses: actions/checkout@v1
161+
- name: Build project
162+
shell: cmd
163+
run: |
164+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
165+
set "PATH=C:\msys64\usr\bin;%PATH%"
166+
echo Shorten work paths to prevent Bazel from reaching MAX_PATH limit
167+
mkdir C:\tmp
168+
set "TEST_TMPDIR=C:\tmp"
169+
set "TMPDIR=C:\tmp"
170+
set "TEMP=C:\tmp"
171+
set "TMP=C:\tmp"
172+
bash --version
173+
git --version
174+
cl
175+
call mvn -version
176+
echo ^<settings^>^<servers^>^<server^>^<id^>ossrh^</id^>^<username^>${{ secrets.CI_DEPLOY_USERNAME }}^</username^>^<password^>${{ secrets.CI_DEPLOY_PASSWORD }}^</password^>^</server^>^</servers^>^</settings^> > %USERPROFILE%\.m2\settings.xml
177+
set "SKIP_EXPORT=true"
178+
call mvn clean install -pl "!tensorflow-framework" -B -U -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }}
179+
if ERRORLEVEL 1 exit /b
180+
- name: Deploy native artifact
181+
if: env.DEPLOY_RELEASE == 'true' || env.DEPLOY_SNAPSHOT == 'true'
182+
shell: cmd
183+
run: |
184+
call mvn -f tensorflow-core/tensorflow-core-native/pom.xml deploy:deploy-file@native-only -B -e -Djavacpp.platform=${{ github.job }} -Djavacpp.platform.extension=${{ matrix.ext }} -Durl=${{ needs.prepare.outputs.repositoryUrl }}
185+
if ERRORLEVEL 1 exit /b
186+
deploy:
187+
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') }} # DEPLOY_SNAPSHOT (releases should be signed and deployed manually from local machine)
188+
needs: [linux-x86_64, windows-x86_64, macosx-arm64, linux-arm64]
189+
runs-on: ubuntu-22.04
190+
steps:
191+
- name: Configure Java
192+
uses: actions/setup-java@v2
193+
with:
194+
distribution: 'adopt'
195+
java-version: '11'
196+
- name: Checkout repository
197+
uses: actions/checkout@v1
198+
- name: Build project
199+
run: |
200+
java -version
201+
mvn -version
202+
mvn clean install -B -U -e -Pdeploying
203+
- name: Deploy snapshot artifacts
204+
run: |
205+
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
206+
mvn deploy -Pdeploying -B -e -Dmaven.test.skip=true

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.DS_Store
2+
.ipynb_checkpoints
3+
node_modules
4+
/.bazelrc.user
5+
/.tf_configure.bazelrc
6+
/**/bazel-*
7+
/bazel_pip
8+
/tools/python_bin_path.sh
9+
/tensorflow/tools/git/gen
10+
/pip_test
11+
/_python_build
12+
*.pyc
13+
__pycache__
14+
*.swp
15+
.vscode/
16+
cmake_build/
17+
tensorflow/contrib/cmake/_build/
18+
.idea/**
19+
.run
20+
/build/
21+
[Bb]uild/
22+
/tensorflow/core/util/version_info.cc
23+
/tensorflow/python/framework/fast_tensor_util.cpp
24+
Pods
25+
Podfile.lock
26+
*.pbxproj
27+
*.xcworkspacedata
28+
/*.podspec
29+
/tensorflow/lite/experimental/objc/BUILD
30+
/tensorflow/lite/experimental/swift/BUILD
31+
/tensorflow/lite/examples/ios/simple/data/*.txt
32+
/tensorflow/lite/examples/ios/simple/data/*.tflite
33+
/tensorflow/lite/gen/**
34+
/tensorflow/lite/tools/make/downloads/**
35+
xcuserdata/**
36+
/api_init_files_list.txt
37+
/estimator_api_init_files_list.txt
38+
*.whl
39+
tensorflow-core/tensorflow-core-api/downloads/
40+
41+
# Vim backups
42+
*~
43+
44+
# Patch files
45+
*.orig
46+
*.rej
47+
48+
# Android
49+
.gradle
50+
.idea
51+
*.iml
52+
local.properties
53+
gradleBuild
54+
55+
# VSCode
56+
.settings/
57+
.project
58+
.classpath
59+
60+
**/target
61+
.tf_configure.bazelrc
62+
.clwb/
63+
64+
# Deployment Files
65+
settings.xml
66+
pom.xml.asc

0 commit comments

Comments
 (0)